diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index a082829f..cb74bb94 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -8,10 +8,14 @@
-
-
+
+
+
+
+
+
@@ -50,9 +54,9 @@
+
-
diff --git a/properties b/properties
index 5c3567d5..d11c9dbd 100644
--- a/properties
+++ b/properties
@@ -4,7 +4,7 @@
"ServerUserPassword": "mprit_2011",
"OfferRegistrationOnStart": true,
"Workspace": "E:\\Tests",
- "ProjectsSearchDirectory": "E:\\BUG",
+ "ProjectsSearchDirectory": "E:\\Tests\\Downloads\\bugreport_1747139509\\test_routine_7",
"DocumentsDirectory": "C:\\Users\\misha\\Documents\\_testing_system",
"VisualiserPath": "C:\\Users\\misha\\Downloads",
"Sapfor_FPath": "E:\\_sapfor_x64\\Components\\Sapfor_F",
diff --git a/src/_VisualDVM/Constants.java b/src/_VisualDVM/Constants.java
index 0e4be1bd..e692a1ed 100644
--- a/src/_VisualDVM/Constants.java
+++ b/src/_VisualDVM/Constants.java
@@ -3,7 +3,7 @@ import Common.Utils.Vector_;
import java.util.Vector;
public class Constants {
- public static final int version = 1248;
+ public static final int version = 1249;
public static final int planner_version = 24;
public static final int testingMaxKernels = 64;
//--
diff --git a/src/_VisualDVM/Passes/All/SPF_GetAllDeclaratedArrays.java b/src/_VisualDVM/Passes/All/SPF_GetAllDeclaratedArrays.java
index 74f2357c..132258d6 100644
--- a/src/_VisualDVM/Passes/All/SPF_GetAllDeclaratedArrays.java
+++ b/src/_VisualDVM/Passes/All/SPF_GetAllDeclaratedArrays.java
@@ -31,16 +31,19 @@ public class SPF_GetAllDeclaratedArrays extends SapforAnalysis {
}
@Override
public void unpack(String packed) throws Exception {
- System.out.println("packed="+ Utils_.Brackets(packed));
ArraysJson arraysJson = Utils_.gson.fromJson(packed, ArraysJson.class);
- System.out.println("size="+arraysJson.allArrays.size());
for (ProjectArray array: arraysJson.allArrays){
array.Init();
target.declaratedArrays.put(array.id, array);
- // array.print();
+ //--
+ for (ArrayDecl decl: array.declPlaces){
+ DBProjectFile projectFile = target.db.files.get(decl.file);
+ projectFile.array_decls.add(decl);
+ }
}
- for (DBProjectFile file : target.db.files.Data.values())
+ for (DBProjectFile file : target.db.files.Data.values()) {
file.ArrayGraphTitle = "Объявлений: " + file.array_decls.size();
+ }
target.UpdateArraysCount();
}
@Override
diff --git a/src/_VisualDVM/Passes/All/SPF_GetArrayDistributionOnlyAnalysis.java b/src/_VisualDVM/Passes/All/SPF_GetArrayDistributionOnlyAnalysis.java
index 7e8b8bd1..37b99571 100644
--- a/src/_VisualDVM/Passes/All/SPF_GetArrayDistributionOnlyAnalysis.java
+++ b/src/_VisualDVM/Passes/All/SPF_GetArrayDistributionOnlyAnalysis.java
@@ -1,10 +1,13 @@
package _VisualDVM.Passes.All;
import Common.Utils.Index;
+import Common.Utils.Utils_;
import Common.Utils.Vector_;
import Common.Visual.Controls.PassControl;
+import Common.Visual.UI;
import _VisualDVM.Global;
import _VisualDVM.Passes.Sapfor.SapforAnalysis;
import _VisualDVM.ProjectData.SapforData.Regions.ParallelRegion;
+import _VisualDVM.ProjectData.SapforData.Regions.RegionsJson;
import java.util.Comparator;
import java.util.Vector;
@@ -23,12 +26,10 @@ public class SPF_GetArrayDistributionOnlyAnalysis extends SapforAnalysis {
}
@Override
protected void unpack(String packed) throws Exception {
- String[] splited = packed.split("#");
- Index idx = new Index();
- int n = Integer.parseInt(splited[idx.Inc()]);
- for (int i = 0; i < n; ++i) {
- ParallelRegion p = new ParallelRegion(splited, idx);
- target.parallelRegions.put(p.regionId, p);
+ RegionsJson regionsJson = Utils_.gson.fromJson(packed, RegionsJson.class);
+ for (ParallelRegion parallelRegion: regionsJson.allRegions){
+ parallelRegion.Init();
+ target.parallelRegions.put(parallelRegion.regionId, parallelRegion);
}
//отсортировать по имени шаблоны
target.templates.sort(Comparator.comparing(o -> o.name));
diff --git a/src/_VisualDVM/Passes/All/SPF_GetArrayDistributionOnlyRegions.java b/src/_VisualDVM/Passes/All/SPF_GetArrayDistributionOnlyRegions.java
index a243c1b2..c300f614 100644
--- a/src/_VisualDVM/Passes/All/SPF_GetArrayDistributionOnlyRegions.java
+++ b/src/_VisualDVM/Passes/All/SPF_GetArrayDistributionOnlyRegions.java
@@ -1,8 +1,10 @@
package _VisualDVM.Passes.All;
import Common.Utils.Index;
+import Common.Utils.Utils_;
import _VisualDVM.Global;
import _VisualDVM.Passes.Sapfor.SapforAnalysis;
import _VisualDVM.ProjectData.SapforData.Regions.ParallelRegion;
+import _VisualDVM.ProjectData.SapforData.Regions.RegionsJson;
public class SPF_GetArrayDistributionOnlyRegions extends SapforAnalysis {
@Override
public String phase() {
@@ -10,12 +12,10 @@ public class SPF_GetArrayDistributionOnlyRegions extends SapforAnalysis {
}
@Override
protected void unpack(String packed) throws Exception {
- String[] splited = packed.split("#");
- Index idx = new Index();
- int n = Integer.parseInt(splited[idx.Inc()]);
- for (int i = 0; i < n; ++i) {
- ParallelRegion p = new ParallelRegion(splited, idx);
- target.parallelRegions.put(p.regionId, p);
+ RegionsJson regionsJson = Utils_.gson.fromJson(packed, RegionsJson.class);
+ for (ParallelRegion parallelRegion: regionsJson.allRegions){
+ parallelRegion.Init();
+ target.parallelRegions.put(parallelRegion.regionId, parallelRegion);
}
}
@Override
diff --git a/src/_VisualDVM/ProjectData/SapforData/Arrays/AlignRule.java b/src/_VisualDVM/ProjectData/SapforData/Arrays/AlignRule.java
index c0db9f08..48e6897f 100644
--- a/src/_VisualDVM/ProjectData/SapforData/Arrays/AlignRule.java
+++ b/src/_VisualDVM/ProjectData/SapforData/Arrays/AlignRule.java
@@ -41,10 +41,8 @@ public class AlignRule {
}
public void Init(){
//--
- if (packedAlignArrayAddress !=null)
- alignArray_address = new BigInteger(packedAlignArrayAddress);
- if (packedAlignWithAddress !=null)
- alignWith_address = new BigInteger(packedAlignWithAddress);
+ alignArray_address = new BigInteger(packedAlignArrayAddress);
+ alignWith_address = new BigInteger(packedAlignWithAddress);
//--
packedAlignArrayAddress = null;
packedAlignWithAddress = null;
diff --git a/src/_VisualDVM/ProjectData/SapforData/Arrays/ProjectArray.java b/src/_VisualDVM/ProjectData/SapforData/Arrays/ProjectArray.java
index 43c3453f..59d729d2 100644
--- a/src/_VisualDVM/ProjectData/SapforData/Arrays/ProjectArray.java
+++ b/src/_VisualDVM/ProjectData/SapforData/Arrays/ProjectArray.java
@@ -154,15 +154,18 @@ public class ProjectArray extends DBObject {
//короткое имя+ функция/модуль/комон+ размерность
UniqKey = shortName + locName + dimSize;
if (packedAddress != null) address = new BigInteger(packedAddress);
- for (ArrayDecl arrayDecl : declPlaces)
+ for (ArrayDecl arrayDecl : declPlaces) {
+ arrayDecl.arrayName = shortName;
arrayDecl.file = Utils_.toW(arrayDecl.file);
+ arrayDecl.messages_presence = "OK";
+ }
//-- полей нет в json поэтому они null
regIDs = new Vector<>();
dimensions = new Vector<>();
links = new LinkedHashMap<>();
ac_current = new LinkedHashMap<>();
ac_new = new LinkedHashMap<>();
- //--
+ //--FileForm
}
public static String fill_binary(int d, String binary) {
int delta = Math.abs(binary.length() - d);
diff --git a/src/_VisualDVM/ProjectData/SapforData/Regions/ParallelRegion.java b/src/_VisualDVM/ProjectData/SapforData/Regions/ParallelRegion.java
index f3813a5b..f2f5f4b6 100644
--- a/src/_VisualDVM/ProjectData/SapforData/Regions/ParallelRegion.java
+++ b/src/_VisualDVM/ProjectData/SapforData/Regions/ParallelRegion.java
@@ -4,6 +4,7 @@ import Common.Utils.Index;
import Common.Utils.IntegerPairJson;
import Common.Utils.Pair;
import Common.Utils.Utils_;
+import Common.Visual.UI;
import _VisualDVM.Global;
import _VisualDVM.ProjectData.Files.DBProjectFile;
import _VisualDVM.ProjectData.SapforData.Arrays.AlignRule;
@@ -28,7 +29,7 @@ public class ParallelRegion extends DBObject {
@Expose
public Vector alignRules;
//----
- public Vector rules = new Vector<>();
+ public Vector rules;
public void genRules(LinkedHashMap Arrays) {
rules.clear();
int maxLen = 0;
@@ -124,12 +125,24 @@ public class ParallelRegion extends DBObject {
arraysMap = new LinkedHashMap<>();
lines = new LinkedHashMap<>();
fragments = new Vector<>();
+ rules=new Vector<>();
//--
if (packedRegionId != null)
regionId = new BigInteger(packedRegionId);
+ maxdim = 0;
for (ProjectArray array : packedArrays) {
array.Init();//имена и адреса.
arraysMap.put(array.address, array);
+ if (array.isTemplFlag==1){
+ maxdim = Math.max(maxdim, array.dimSize);
+ Global.mainModule.getProject().templates.add(array);
+ array.regIDs.add(regionId);
+ } else if (array.isLoopArrayFlag != 1) arrays_count++;
+ }
+ //---
+ for (AlignRule rule: alignRules) {
+ rule.Init();
+ rule.parent_region = this;
}
//---
for (FileRegionLinesJson fr : regionsLines) {
@@ -138,7 +151,22 @@ public class ParallelRegion extends DBObject {
fragments.add(fr.file + ": " + l.getKey() + "-" + l.getKey());
}
}
- //--
+ //---
+ //--------------------------------------------------------------
+ lines_count = 0;
+ loops_count = 0;
+ fd_count = 0;
+ fc_count = 0;
+ for (String FKey : lines.keySet()) {
+ for (IntegerPairJson L : lines.get(FKey)) {
+ lines_count += (L.getValue() - L.getKey());
+ DBProjectFile f = Global.mainModule.getProject().db.files.Data.get(FKey);
+ loops_count += f.FragmentLoopCount(L.getKey(), L.getValue());
+ fc_count += f.FragmentFunctionCallsCount(L.getKey(), L.getValue());
+ fd_count += f.FragmentFunctionDeclsCount(L.getKey(), L.getValue());
+ }
+ }
+ //---
packedRegionId = null;
packedArrays.clear();
packedArrays = null;