Link: draft DistributedMap and Aggregator by vasslitvinov · Pull Request #19554 · chapel-lang/chapel · GitHub
Merge pull request #19554 from vasslitvinov/distributed-map
draft DistributedMap and Aggregator
These draft DistributedMap and Aggregator illustrate an approach
to resolving the reference invalidation issue, following this proposal:
The sample code in
use-distributed-map.chpl computes a distributed histogram
using (a) the
bulkUpdate method and (b) a forall statement that mocks
a compiler-transformed manage or sync statement in the above proposal.
The implementation is bare-bones.
DistributedMap achieves intra-locale parallelism by using multiple instances
of the standard
parSafe=true so that they can be accessed
concurrently. Other approaches can be used, ex. the
The aggregator is designed to be usable with any "client" data structure
that implements the API indicated in the code using "API" comments.
Currently it aggregates only indices, for simplicity. It can be generalized
to any input such that the index can be extracted from each input element.
Discussed with @lydia-duncan
Modified Files: A test/library/draft/DistributedMap/Aggregator.chpl