no message

This commit is contained in:
2025-05-10 17:15:45 +03:00
parent e1291446c8
commit c148f62198
11 changed files with 86 additions and 62 deletions

10
.idea/workspace.xml generated
View File

@@ -7,9 +7,17 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment=""> <list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Regions/FileRegionLinesJson.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Regions/RegionLinesJson.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Regions/RegionsJson.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SPF_GetAllDeclaratedArrays.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SPF_GetAllDeclaratedArrays.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SPF_ModifyArrayDistribution.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SPF_ModifyArrayDistribution.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Project/db_project_info.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/Project/db_project_info.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/Distribution/AlignRule.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/Distribution/AlignRule.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/Distribution/DataDirective.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/Distribution/DataDirective.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/ProjectArray.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/ProjectArray.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/ProjectArray.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/ProjectArray.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Regions/ParallelRegion.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Regions/ParallelRegion.java" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" /> <option name="HIGHLIGHT_CONFLICTS" value="true" />

View File

@@ -4,7 +4,7 @@
"ServerUserPassword": "mprit_2011", "ServerUserPassword": "mprit_2011",
"OfferRegistrationOnStart": true, "OfferRegistrationOnStart": true,
"Workspace": "E:\\Tests", "Workspace": "E:\\Tests",
"ProjectsSearchDirectory": "E:\\SAPFOR\\Tests\\BT_inserted", "ProjectsSearchDirectory": "E:\\BUG",
"DocumentsDirectory": "C:\\Users\\misha\\Documents\\_testing_system", "DocumentsDirectory": "C:\\Users\\misha\\Documents\\_testing_system",
"VisualiserPath": "C:\\Users\\misha\\Downloads", "VisualiserPath": "C:\\Users\\misha\\Downloads",
"Sapfor_FPath": "E:\\_sapfor_x64\\Components\\Sapfor_F", "Sapfor_FPath": "E:\\_sapfor_x64\\Components\\Sapfor_F",

View File

@@ -33,7 +33,7 @@ public class SPF_ModifyArrayDistribution extends SapforModification {
@Override @Override
public void fillFields() { public void fillFields() {
Vector<ArrayAlignmentBar> bars = new Vector<>(); Vector<ArrayAlignmentBar> bars = new Vector<>();
for (ProjectArray array : Result.arrays.values()) { for (ProjectArray array : Result.arraysMap.values()) {
if (array.canBeDistributed() && array.align_template != null) { if (array.canBeDistributed() && array.align_template != null) {
array.bar = null; array.bar = null;
ArrayAlignmentBar bar = new ArrayAlignmentBar(array); ArrayAlignmentBar bar = new ArrayAlignmentBar(array);
@@ -47,7 +47,7 @@ public class SPF_ModifyArrayDistribution extends SapforModification {
} }
@Override @Override
public void ProcessResult() { public void ProcessResult() {
for (ProjectArray array : Result.arrays.values()) { for (ProjectArray array : Result.arraysMap.values()) {
if (array.bar != null) { if (array.bar != null) {
array.bar.apply_changes(); array.bar.apply_changes();
//заполнение новых коеффициентов. //заполнение новых коеффициентов.
@@ -58,7 +58,7 @@ public class SPF_ModifyArrayDistribution extends SapforModification {
if (!dialog.ShowDialog(region.toString(), region)) if (!dialog.ShowDialog(region.toString(), region))
return false; return false;
boolean needsChange = false; boolean needsChange = false;
for (ProjectArray array : region.arrays.values()) { for (ProjectArray array : region.arraysMap.values()) {
if (array.canBeDistributed() && array.ac_need_change()) { if (array.canBeDistributed() && array.ac_need_change()) {
needsChange = true; needsChange = true;
break; break;
@@ -67,7 +67,7 @@ public class SPF_ModifyArrayDistribution extends SapforModification {
if (needsChange) { if (needsChange) {
addOpt1 = region.regionId.toString(); addOpt1 = region.regionId.toString();
Vector<String> coeffs = new Vector<>(); Vector<String> coeffs = new Vector<>();
for (ProjectArray array : region.arrays.values()) { for (ProjectArray array : region.arraysMap.values()) {
if (array.ac_new.size() > 0) { if (array.ac_new.size() > 0) {
coeffs.add(String.valueOf(array.address)); coeffs.add(String.valueOf(array.address));
for (int dim : array.ac_new.keySet()) { for (int dim : array.ac_new.keySet()) {

View File

@@ -505,7 +505,7 @@ public class db_project_info extends DBObject {
if (templates.size() > 0) { if (templates.size() > 0) {
for (ParallelRegion p : parallelRegions.Data.values()) { for (ParallelRegion p : parallelRegions.Data.values()) {
DefaultMutableTreeNode pn = new DefaultMutableTreeNode(p); DefaultMutableTreeNode pn = new DefaultMutableTreeNode(p);
p.dataDirectives.genRules(p.arrays); p.dataDirectives.genRules(p.arraysMap);
for (String r : p.dataDirectives.rules) for (String r : p.dataDirectives.rules)
pn.add(new DefaultMutableTreeNode(r)); pn.add(new DefaultMutableTreeNode(r));
maxdim = Math.max(maxdim, p.maxdim); maxdim = Math.max(maxdim, p.maxdim);

View File

@@ -43,10 +43,10 @@ public class AlignRule {
return new Pair<>(sign, buf); return new Pair<>(sign, buf);
} }
public ProjectArray getAlignArray() { public ProjectArray getAlignArray() {
return parent_region.arrays.get(alignArray_address); return parent_region.arraysMap.get(alignArray_address);
} }
public ProjectArray getAlignWith() { public ProjectArray getAlignWith() {
return parent_region.arrays.get(alignWith_address); return parent_region.arraysMap.get(alignWith_address);
} }
String genStringExpr(String letter, Pair<Integer, Integer> expr) { String genStringExpr(String letter, Pair<Integer, Integer> expr) {
String retVal = ""; String retVal = "";

View File

@@ -10,24 +10,6 @@ public class DataDirective extends Directive {
public Vector<AlignRule> alignRules; public Vector<AlignRule> alignRules;
public String rules_ = ""; public String rules_ = "";
public Vector<String> rules = new Vector<>(); public Vector<String> rules = new Vector<>();
public void genRules_(LinkedHashMap<Long, ProjectArray> Arrays) {
rules_ = "";
int maxLen = 0;
for (AlignRule a : alignRules)
maxLen = Math.max(maxLen, a.GetLenString());
LinkedHashMap<String, Vector<String>> toPrint = new LinkedHashMap<>();
for (AlignRule a : alignRules) {
if (Arrays.get(a.alignArray_address).getLocation() != ArrayLocation.parameter) {
Pair<String, String> result = a.GenRule(maxLen);
if (!toPrint.containsKey(result.getKey()))
toPrint.put(result.getKey(), new Vector<>());
toPrint.get(result.getKey()).add(result.getValue());
}
}
for (Vector<String> v : toPrint.values()) {
rules_ += String.join("\n", v);
}
}
public void genRules(LinkedHashMap<BigInteger, ProjectArray> Arrays) { public void genRules(LinkedHashMap<BigInteger, ProjectArray> Arrays) {
rules.clear(); rules.clear();
int maxLen = 0; int maxLen = 0;

View File

@@ -25,6 +25,8 @@ public class ProjectArray extends DBObject {
@Expose @Expose
public long id; public long id;
@Expose @Expose
public String packed_address;
@Expose
public String name; public String name;
@Expose @Expose
public String shortName; public String shortName;
@@ -58,10 +60,12 @@ public class ProjectArray extends DBObject {
//json------------------- //json-------------------
public String UniqKey; public String UniqKey;
public BigInteger address; public BigInteger address;
// LinkedHashMap<BigInteger, TemplateLink> templateInfo = new LinkedHashMap<>();
public void print(){ public void print(){
Vector<String> res = new Vector<>(); Vector<String> res = new Vector<>();
res.add(">"); res.add(">");
res.add("id="+id); res.add("id="+id);
res.add("packed_address="+ packed_address);
res.add("name="+name); res.add("name="+name);
res.add("shortName="+shortName); res.add("shortName="+shortName);
res.add("dimSize="+dimSize); res.add("dimSize="+dimSize);
@@ -74,7 +78,6 @@ public class ProjectArray extends DBObject {
res.add("<"); res.add("<");
System.out.println(String.join("\n",res)); System.out.println(String.join("\n",res));
} }
//-- //--
public ArrayState getState() { public ArrayState getState() {
return ArrayState.fromInt(state); return ArrayState.fromInt(state);
@@ -85,10 +88,9 @@ public class ProjectArray extends DBObject {
public ArrayLocation getLocation() { public ArrayLocation getLocation() {
return ArrayLocation.fromInt(location); return ArrayLocation.fromInt(location);
} }
//только для шаблонов. для ФИЛЬТРА управления распределением измерений. //только для шаблонов. для ФИЛЬТРА управления распределением измерений.
public Vector<TemplateDimension> dimensions = new Vector<>(); public Vector<TemplateDimension> dimensions = new Vector<>();
//---------------------------- //------
public ParallelRegion parent_region = null; //родительяская область распараллеливания. public ParallelRegion parent_region = null; //родительяская область распараллеливания.
//связи-> //связи->
public LinkedHashMap<Long, ProjectArray> links = new LinkedHashMap<>(); public LinkedHashMap<Long, ProjectArray> links = new LinkedHashMap<>();
@@ -106,8 +108,6 @@ public class ProjectArray extends DBObject {
//------------------------------------------------------------------------------------------------------> //------------------------------------------------------------------------------------------------------>
//<editor-fold desc="Функционал шаблона"> //<editor-fold desc="Функционал шаблона">
public Vector<BigInteger> regIDs = new Vector<>(); public Vector<BigInteger> regIDs = new Vector<>();
//-- //--
public ProjectArray(String[] infoF, Index idx, BigInteger address_in) { public ProjectArray(String[] infoF, Index idx, BigInteger address_in) {
id = Integer.parseInt(infoF[idx.Inc()]); //+ id = Integer.parseInt(infoF[idx.Inc()]); //+
@@ -115,7 +115,7 @@ public class ProjectArray extends DBObject {
shortName = infoF[idx.Inc()]; //+ shortName = infoF[idx.Inc()]; //+
dimSize = Integer.parseInt(infoF[idx.Inc()]); //+ dimSize = Integer.parseInt(infoF[idx.Inc()]); //+
typeSize = Integer.parseInt(infoF[idx.Inc()]); //+ typeSize = Integer.parseInt(infoF[idx.Inc()]); //+
// address = address_in; address = address_in;
state = Integer.parseInt(infoF[idx.Inc()]); //+ state = Integer.parseInt(infoF[idx.Inc()]); //+
location = Integer.parseInt(infoF[idx.Inc()]); //+ location = Integer.parseInt(infoF[idx.Inc()]); //+
locName = infoF[idx.Inc()]; //+ locName = infoF[idx.Inc()]; //+
@@ -132,12 +132,14 @@ public class ProjectArray extends DBObject {
for (int i = 0; i < sizes_size; ++i) for (int i = 0; i < sizes_size; ++i)
mappedDims.add(Integer.parseInt(infoF[idx.Inc()])); //+ mappedDims.add(Integer.parseInt(infoF[idx.Inc()])); //+
//todo удалить после перехода на json
int templateInfo_size = Integer.parseInt(infoF[idx.Inc()]); int templateInfo_size = Integer.parseInt(infoF[idx.Inc()]);
for (int i = 0; i < templateInfo_size; ++i) { for (int i = 0; i < templateInfo_size; ++i) {
BigInteger key = new BigInteger(infoF[idx.Inc()]); BigInteger key = new BigInteger(infoF[idx.Inc()]);
TemplateLink templateLink = new TemplateLink(infoF, idx); TemplateLink templateLink = new TemplateLink(infoF, idx);
// templateInfo.put(key, templateLink); // templateInfo.put(key, templateLink);
} }
//todo
String[] localSplited = infoF[idx.Inc()].split("\\|"); String[] localSplited = infoF[idx.Inc()].split("\\|");
isTemplFlag = Integer.parseInt(localSplited[0]); //+ isTemplFlag = Integer.parseInt(localSplited[0]); //+
isLoopArrayFlag = Integer.parseInt(localSplited[1]); //+ isLoopArrayFlag = Integer.parseInt(localSplited[1]); //+
@@ -147,7 +149,6 @@ public class ProjectArray extends DBObject {
String declFile = Utils_.toW(localSplited[idxPl]); String declFile = Utils_.toW(localSplited[idxPl]);
DBProjectFile file = Global.mainModule.getProject().db.files.Data.get(declFile); DBProjectFile file = Global.mainModule.getProject().db.files.Data.get(declFile);
int declLine = Integer.parseInt(localSplited[idxPl + 1]); int declLine = Integer.parseInt(localSplited[idxPl + 1]);
//declPlaces.add(new Pair<>(declFile, declLine));
ArrayDecl decl = new ArrayDecl(shortName, location, file, declLine); ArrayDecl decl = new ArrayDecl(shortName, location, file, declLine);
declPlaces.add(decl); declPlaces.add(decl);
file.array_decls.add(decl); //++ file.array_decls.add(decl); //++
@@ -158,12 +159,11 @@ public class ProjectArray extends DBObject {
Init(); Init();
} }
public void Init(){ public void Init(){
// address = packed_address !=null ? new BigInteger(packed_address):BigInteger.ONE;
//короткое имя+ функция/модуль/комон+ размерность //короткое имя+ функция/модуль/комон+ размерность
UniqKey = shortName + locName + dimSize; UniqKey = shortName + locName + dimSize;
address = BigInteger.ONE; for (ArrayDecl arrayDecl: declPlaces)
for (ArrayDecl arrayDecl: declPlaces){
arrayDecl.file = Utils_.toW(arrayDecl.file); arrayDecl.file = Utils_.toW(arrayDecl.file);
}
} }
public static String fill_binary(int d, String binary) { public static String fill_binary(int d, String binary) {
int delta = Math.abs(binary.length() - d); int delta = Math.abs(binary.length() - d);

View File

@@ -0,0 +1,12 @@
package _VisualDVM.ProjectData.SapforData.Regions;
import Common.Utils.IntegerPairJson;
import com.google.gson.annotations.Expose;
import java.util.List;
import java.util.Vector;
public class FileRegionLinesJson {
@Expose
public String file;
@Expose
public List<IntegerPairJson> lines = new Vector<>();
}

View File

@@ -1,6 +1,7 @@
package _VisualDVM.ProjectData.SapforData.Regions; package _VisualDVM.ProjectData.SapforData.Regions;
import Common.Database.Objects.DBObject; import Common.Database.Objects.DBObject;
import Common.Utils.Index; import Common.Utils.Index;
import Common.Utils.IntegerPairJson;
import Common.Utils.Pair; import Common.Utils.Pair;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import _VisualDVM.Global; import _VisualDVM.Global;
@@ -8,18 +9,30 @@ import _VisualDVM.ProjectData.Files.DBProjectFile;
import _VisualDVM.ProjectData.SapforData.Arrays.Distribution.AlignRule; import _VisualDVM.ProjectData.SapforData.Arrays.Distribution.AlignRule;
import _VisualDVM.ProjectData.SapforData.Arrays.Distribution.DataDirective; import _VisualDVM.ProjectData.SapforData.Arrays.Distribution.DataDirective;
import _VisualDVM.ProjectData.SapforData.Arrays.ProjectArray; import _VisualDVM.ProjectData.SapforData.Arrays.ProjectArray;
import com.google.gson.annotations.Expose;
import java.math.BigInteger; import java.math.BigInteger;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
import java.util.List;
import java.util.Vector; import java.util.Vector;
public class ParallelRegion extends DBObject { public class ParallelRegion extends DBObject {
//json
@Expose
public String packed_region_id;
@Expose
public String originalName;
@Expose
public List<ProjectArray> arrays=new Vector<>();
@Expose
public RegionLinesJson packed_lines;
//--
public BigInteger regionId; public BigInteger regionId;
//name in program //name in program
public String originalName;
// file -> <start, end> lines // file -> <start, end> lines
public LinkedHashMap<String, Vector<Pair<Integer, Integer>>> lines; public LinkedHashMap<String, List<IntegerPairJson>> lines;
//ключ - адрес. меняем //ключ - адрес. меняем
public LinkedHashMap<BigInteger, ProjectArray> arrays; public LinkedHashMap<BigInteger, ProjectArray> arraysMap;
//for directive creating //for directive creating
public DataDirective dataDirectives; public DataDirective dataDirectives;
public int maxdim = 0; public int maxdim = 0;
@@ -30,9 +43,8 @@ public class ParallelRegion extends DBObject {
public int fd_count = 0; public int fd_count = 0;
public int fc_count = 0; public int fc_count = 0;
public ParallelRegion(String[] splited, Index idx) { public ParallelRegion(String[] splited, Index idx) {
// regionId = Long.parseLong(splited[idx.Inc()]); regionId = new BigInteger(splited[idx.Inc()]);//+
regionId = new BigInteger(splited[idx.Inc()]); originalName = splited[idx.Inc()];//+
originalName = splited[idx.Inc()];
String[] localSplited = splited[idx.Inc()].split("\\|"); String[] localSplited = splited[idx.Inc()].split("\\|");
int lines_size = Integer.parseInt(localSplited[0]); int lines_size = Integer.parseInt(localSplited[0]);
lines = new LinkedHashMap<>(lines_size); lines = new LinkedHashMap<>(lines_size);
@@ -41,25 +53,24 @@ public class ParallelRegion extends DBObject {
for (int i = 0; i < lines_size; ++i) { for (int i = 0; i < lines_size; ++i) {
String line_file = Utils_.toW(localSplited[1]); String line_file = Utils_.toW(localSplited[1]);
int line_list_size = Integer.parseInt(localSplited[2]); int line_list_size = Integer.parseInt(localSplited[2]);
Vector<Pair<Integer, Integer>> current_lines = new Vector<>(line_list_size); Vector<IntegerPairJson> current_lines = new Vector<>(line_list_size);
for (int k = 0; k < line_list_size; ++k) { for (int k = 0; k < line_list_size; ++k) {
int first = Integer.parseInt(splited[idx.Inc()]); int first = Integer.parseInt(splited[idx.Inc()]);
if (first == 0) first++; if (first == 0) first++;
localSplited = splited[idx.Inc()].split("\\|"); localSplited = splited[idx.Inc()].split("\\|");
int second = Integer.parseInt((localSplited[0])); int second = Integer.parseInt((localSplited[0]));
current_lines.add(new Pair<>(first, second)); current_lines.add(new IntegerPairJson(first, second));
fragments.add(line_file + ": " + first + "-" + second); fragments.add(line_file + ": " + first + "-" + second);
} }
lines.put(line_file, current_lines); lines.put(line_file, current_lines);
} }
maxdim = 0; maxdim = 0;
int arrays_size = Integer.parseInt(splited[idx.Inc()]); int arrays_size = Integer.parseInt(splited[idx.Inc()]);
arrays = new LinkedHashMap<>(arrays_size); arraysMap = new LinkedHashMap<>(arrays_size);
for (int i = 0; i < arrays_size; ++i) { for (int i = 0; i < arrays_size; ++i) {
//long array_address = Long.parseLong((splited[idx.Inc()]));
BigInteger array_address = new BigInteger((splited[idx.Inc()])); BigInteger array_address = new BigInteger((splited[idx.Inc()]));
ProjectArray new_array = new ProjectArray(splited, idx, array_address); ProjectArray new_array = new ProjectArray(splited, idx, array_address);
arrays.put(array_address, new_array); arraysMap.put(array_address, new_array);
//------------------------------------------------------- //-------------------------------------------------------
if (new_array.isTemplFlag == 1) { if (new_array.isTemplFlag == 1) {
maxdim = Math.max(maxdim, new_array.dimSize); maxdim = Math.max(maxdim, new_array.dimSize);
@@ -80,7 +91,7 @@ public class ParallelRegion extends DBObject {
fd_count = 0; fd_count = 0;
fc_count = 0; fc_count = 0;
for (String FKey : lines.keySet()) { for (String FKey : lines.keySet()) {
for (Pair<Integer, Integer> L : lines.get(FKey)) { for (IntegerPairJson L : lines.get(FKey)) {
lines_count += (L.getValue() - L.getKey()); lines_count += (L.getValue() - L.getKey());
DBProjectFile f = Global.mainModule.getProject().db.files.Data.get(FKey); DBProjectFile f = Global.mainModule.getProject().db.files.Data.get(FKey);
loops_count += f.FragmentLoopCount(L.getKey(), L.getValue()); loops_count += f.FragmentLoopCount(L.getKey(), L.getValue());
@@ -91,10 +102,10 @@ public class ParallelRegion extends DBObject {
//-------------------------------------------------- //--------------------------------------------------
} }
public boolean ArrayBelongsToRegion(long id) { public boolean ArrayBelongsToRegion(long id) {
return arrays.values().stream().anyMatch(array -> array.id == id); return arraysMap.values().stream().anyMatch(array -> array.id == id);
} }
public ProjectArray getArrayById(long id) { public ProjectArray getArrayById(long id) {
for (ProjectArray array : arrays.values()) { for (ProjectArray array : arraysMap.values()) {
if (array.id == id) return array; if (array.id == id) return array;
} }
return null; return null;
@@ -110,7 +121,7 @@ public class ParallelRegion extends DBObject {
public void UpdateLoopsCount() { public void UpdateLoopsCount() {
loops_count = 0; loops_count = 0;
for (String FKey : lines.keySet()) { for (String FKey : lines.keySet()) {
for (Pair<Integer, Integer> L : lines.get(FKey)) { for (IntegerPairJson L : lines.get(FKey)) {
DBProjectFile f = Global.mainModule.getProject().db.files.Data.get(FKey); DBProjectFile f = Global.mainModule.getProject().db.files.Data.get(FKey);
loops_count += f.FragmentLoopCount(L.getKey(), L.getValue()); loops_count += f.FragmentLoopCount(L.getKey(), L.getValue());
} }
@@ -120,7 +131,7 @@ public class ParallelRegion extends DBObject {
fd_count = 0; fd_count = 0;
fc_count = 0; fc_count = 0;
for (String FKey : lines.keySet()) { for (String FKey : lines.keySet()) {
for (Pair<Integer, Integer> L : lines.get(FKey)) { for (IntegerPairJson L : lines.get(FKey)) {
DBProjectFile f = Global.mainModule.getProject().db.files.Data.get(FKey); DBProjectFile f = Global.mainModule.getProject().db.files.Data.get(FKey);
fc_count += f.FragmentFunctionCallsCount(L.getKey(), L.getValue()); fc_count += f.FragmentFunctionCallsCount(L.getKey(), L.getValue());
fd_count += f.FragmentFunctionDeclsCount(L.getKey(), L.getValue()); fd_count += f.FragmentFunctionDeclsCount(L.getKey(), L.getValue());
@@ -130,17 +141,10 @@ public class ParallelRegion extends DBObject {
public void UpdateArraysCount() { public void UpdateArraysCount() {
arrays_count = 0; arrays_count = 0;
for (String FKey : lines.keySet()) { for (String FKey : lines.keySet()) {
for (Pair<Integer, Integer> L : lines.get(FKey)) { for (IntegerPairJson L : lines.get(FKey)) {
DBProjectFile f = Global.mainModule.getProject().db.files.Data.get(FKey); DBProjectFile f = Global.mainModule.getProject().db.files.Data.get(FKey);
arrays_count += f.FragmentArraysCount(L.getKey(), L.getValue()); arrays_count += f.FragmentArraysCount(L.getKey(), L.getValue());
} }
} }
/*
if (new_array.isTemplFlag == 1) {
maxdim = Math.max(maxdim, new_array.dimSize);
Current.getProject().templates.put(new_array.address, new_array);
new_array.regIDs.add(regionId);
} else if (new_array.isLoopArrayFlag != 1) arrays_count++;
*/
} }
} }

View File

@@ -0,0 +1,9 @@
package _VisualDVM.ProjectData.SapforData.Regions;
import com.google.gson.annotations.Expose;
import java.util.List;
import java.util.Vector;
public class RegionLinesJson {
@Expose
public List<FileRegionLinesJson> allLines = new Vector<>();
}

View File

@@ -0,0 +1,9 @@
package _VisualDVM.ProjectData.SapforData.Regions;
import com.google.gson.annotations.Expose;
import java.util.List;
import java.util.Vector;
public class RegionsJson {
@Expose
public List<ParallelRegion> allRegions = new Vector<>();
}