распределение в json, еще нашел внесенный переходом баг с отображением массивов текущего файла.
This commit is contained in:
2025-05-18 18:12:30 +03:00
parent cba4425cd7
commit 41ce6527d5
9 changed files with 66 additions and 29 deletions

10
.idea/workspace.xml generated
View File

@@ -8,10 +8,14 @@
<component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/Common/Visual/UI.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/Common/Visual/UI.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Constants.java" 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$/src/_VisualDVM/Passes/All/SPF_GetArrayDistributionOnlyAnalysis.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SPF_GetArrayDistributionOnlyAnalysis.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SPF_GetArrayDistributionOnlyRegions.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SPF_GetArrayDistributionOnlyRegions.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/AlignRule.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ProjectData/SapforData/Arrays/AlignRule.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" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/FileForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/FileForm.java" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -50,9 +54,9 @@
</file-type-list>
</component>
<component name="HighlightingSettingsPerFile">
<setting file="file://$PROJECT_DIR$/src/_VisualDVM/Passes/All/ConvertCorrectnessTests.java" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishGroup.java" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishTest.java" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/src/_VisualDVM/Passes/All/ConvertCorrectnessTests.java" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/src/_VisualDVM/TestingSystem/Common/TestingServer.java" root0="FORCE_HIGHLIGHTING" />
</component>
<component name="KotlinCodeInsightWorkspaceSettings">

View File

@@ -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",

View File

@@ -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;
//--

View File

@@ -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

View File

@@ -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));

View File

@@ -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

View File

@@ -41,9 +41,7 @@ public class AlignRule {
}
public void Init(){
//--
if (packedAlignArrayAddress !=null)
alignArray_address = new BigInteger(packedAlignArrayAddress);
if (packedAlignWithAddress !=null)
alignWith_address = new BigInteger(packedAlignWithAddress);
//--
packedAlignArrayAddress = null;

View File

@@ -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);

View File

@@ -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<AlignRule> alignRules;
//----
public Vector<String> rules = new Vector<>();
public Vector<String> rules;
public void genRules(LinkedHashMap<BigInteger, ProjectArray> 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;