chapel
chapel copied to clipboard
Enabling `proc sort` on distributed arrays
Currently calling sort
on a distributed array will result a warning that twoArrayRadix is not supported on distributed arrays
use BlockDist, Sort;
var a = blockDist.createArray(1..100, int);
sort(a); // warning: twoArrayRadix sort no longer handles distributed arrays. Please use TwoArrayDistributedRadixSort.twoArrayDistributedRadixSort instead (but note that it is not stable)
writeln(a);
The reason sort
no longer handles distributed arrays is that previously any program that has use Sort
would result in use BlockDist
, and the support was removed as a easy fix for that.
We should enable sort
on distributed arrays without requiring all programs that use Sort
to use BlockDist