From b3d4c7c553b1a17d045b5aab0efcce2f7b314698 Mon Sep 17 00:00:00 2001 From: Oliver Alvarado Rodriguez Date: Tue, 12 Mar 2024 14:39:16 -0400 Subject: [PATCH] changed ranges to be stored in a SymEntry --- arachne/server/BreadthFirstSearch.chpl | 16 +--------------- arachne/server/BuildGraphMsg.chpl | 2 +- arachne/server/GraphArray.chpl | 1 + 3 files changed, 3 insertions(+), 16 deletions(-) diff --git a/arachne/server/BreadthFirstSearch.chpl b/arachne/server/BreadthFirstSearch.chpl index 58ecb7e6..26c8d3f9 100644 --- a/arachne/server/BreadthFirstSearch.chpl +++ b/arachne/server/BreadthFirstSearch.chpl @@ -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. * @@ -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) { diff --git a/arachne/server/BuildGraphMsg.chpl b/arachne/server/BuildGraphMsg.chpl index 9b19f57a..906b4f05 100644 --- a/arachne/server/BuildGraphMsg.chpl +++ b/arachne/server/BuildGraphMsg.chpl @@ -67,7 +67,7 @@ module BuildGraphMsg { } } } - graph.withComp(new shared ReplicatedSymEntry(ranges):GenSymEntry, key2insert); + graph.withComp(new shared SymEntry(ranges):GenSymEntry, key2insert); } /** diff --git a/arachne/server/GraphArray.chpl b/arachne/server/GraphArray.chpl index f24b4c67..19e59892 100644 --- a/arachne/server/GraphArray.chpl +++ b/arachne/server/GraphArray.chpl @@ -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;