18963, "lydia-duncan", "[Patterns] should we support combining distributed maps? What should that look like if we do?", "2022-01-11T23:10:14Z"
This issue is part of a series of issues to design the interface for collections across serial, parallel, and distributed contexts. Our goal is to determine what we think is reasonable to support and what doesn't seem useful. Additional patterns welcome (but it would be best to put them in their own issue for discussion, likely)
var m1 = new DistributedMap(...);
var m2 = new DistributedMap(...);
...
var combo = new DistributedMap(...);
coforall loc in Locales {
on loc {
var localKeys = m1.getLocalKeys();
forall k in localKeys {
if m2.contains(k) {
// Maybe a different pattern to ensure m2.getValue is optimized for remote calls or something
combo.add(k, m1.getValue(k) + m2.getValue(k));
}
}
}
}