I don't understand the following piece of code.
val array = new Array[INT](1..1000, ([i]:Point) => 0);
val dist = Dist.makeBlock(array.region);
val distArray = DistArray.make(dist, ([i]:Point) => array(i));
This is all. The expressions in () are very confusing, but also the =>, Dist and DistArray.
Array initializers like
([i]:Point) => 0
are function literals (also called closures), and are described in section 10.3 of the X10 language specification.Dist
andDistArray
support a flexible mapping of multidimensional regions to distributed data; these classes are described in Chapter 16 of the spec.