Skip to content

Commit

Permalink
Merge pull request #106 from Bears-R-Us/ranges_to_sym_entry
Browse files Browse the repository at this point in the history
changed ranges to be stored in a SymEntry
  • Loading branch information
zhihuidu authored Mar 12, 2024
2 parents 5fc15eb + ee66aaf commit 090d791
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 16 deletions.
16 changes: 1 addition & 15 deletions arachne/server/BreadthFirstSearch.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,6 @@ module BreadthFirstSearch {
use ServerConfig;
use AryUtil;

proc completeCopy(const ref arg) {
var result = arg;
coforall loc in Locales do on loc do result = arg;
return result;
}

proc getRangesType() type {
var tempD = {0..numLocales-1} dmapped replicatedDist();
var temp : [tempD] (int,locale,int);
return borrowed ReplicatedSymEntry(temp.type);
}

/**
* Breadth-first search for shared-memory (one locale) systems.
*
Expand Down Expand Up @@ -95,9 +83,7 @@ module BreadthFirstSearch {
const ref src = toSymEntry(graph.getComp("SRC_SDI"),int).a;
const ref dst = toSymEntry(graph.getComp("DST_SDI"),int).a;
const ref seg = toSymEntry(graph.getComp("SEGMENTS_SDI"),int).a;

// Uses getRangesType() defined in this file for a specific replicated array.
var ranges = completeCopy(((graph.getComp("RANGES_SDI")):getRangesType()).a);
const ref ranges = toSymEntry(graph.getComp("RANGES_SDI"),(int,locale,int)).a;

// Add the root to the locale that owns it and update size & depth.
for lc in find_locs(root, ranges) {
Expand Down
2 changes: 1 addition & 1 deletion arachne/server/BuildGraphMsg.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ module BuildGraphMsg {
}
}
}
graph.withComp(new shared ReplicatedSymEntry(ranges):GenSymEntry, key2insert);
graph.withComp(new shared SymEntry(ranges):GenSymEntry, key2insert);
}

/**
Expand Down
1 change: 1 addition & 0 deletions arachne/server/GraphArray.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ module GraphArray {
}
}

@deprecated("Use Arkouda SymEntry instead, this can be adapted for SparseSymEntry above")
class ReplicatedSymEntry : GenSymEntry {
var a;
proc etype type do return a.eltType;
Expand Down

0 comments on commit 090d791

Please sign in to comment.