x10.array
Class Dist

x10.lang.Object
  extended by x10.array.Dist
All Implemented Interfaces:
Any
Direct Known Subclasses:
PeriodicDist

abstract public class Dist
extends Object
implements x10.lang. Fun_0_1<Point,Place>, Iterable<Point>

Declaration: Dist extends x10.lang.Object implements (a1:x10.array.Point{self.rank==this(:x10.array.Dist).region.rank})=>x10.lang.Place, x10.lang.Iterable[x10.array.Point{self.rank==this(:x10.array.Dist).region.rank}].

A distributution supports distributed arrays by providing a mapping
from Points to Places.  Equivalently, a distribution may be defined
as a mapping from Places to Regions.  The Dist class provides a set
of factory methods for constructing various distributions.  There
are a set of methods supporting algebraic operations on
distributions, such as union, intersection, difference, and so on.


Field Summary
 Region region
          Property.
 
Constructor Summary
protected Dist(Region region)
          Declaration: this(x10.array.Region): x10.array.Dist{self.region==region}. Construct a distribution over the specified region.
 
Method Summary
 Int rank()
          The rank of this distribution.
static Dist makeUnique()
          Declaration: makeUnique(): x10.array.Dist{self.region.rank==1}. Create a distribution over a rank-1 region that maps every point in the region to a distinct place, and which maps some point in the region to every place.
static Dist makeConstant(Region r)
          Declaration: makeConstant(r:x10.array.Region): x10.array.Dist{self.region==r}. Create a distribution over the specified region that maps every point in the region to here.
static Dist make(Region r)
          Declaration: make(r:x10.array.Region): x10.array.Dist{self.region==r}. Create a distribution over the specified region that maps every point in the region to here.
static Dist makeCyclic(Region r, Int axis)
          Declaration: makeCyclic(r:x10.array.Region,axis:x10.lang.Int): x10.array.Dist{self.region==r}. Create a distribution over the specified region that varies in place only along the specified axis, and maps the ith coordinate along that axis to place i%Place.NUM_PLACES.
static Dist makeBlock(Region r, Int axis)
          Declaration: makeBlock(r:x10.array.Region,axis:x10.lang.Int): x10.array.Dist{self.region==r}. Create a distribution over the specified region that varies in place only along the zeroth axis, and maps the ith coordinate along that axis to place i%Place.NUM_PLACES.
static Dist makeBlockBlock(Region r, Int axis0, Int axis1)
          Declaration: makeBlockBlock(r:x10.array.Region,axis0:x10.lang.Int,axis1:x10.lang.Int): x10.array.Dist{self.region==r}. Creates a block, block distribution across all places.
static Dist makeBlock(Region r)
          Declaration: makeBlock(r:x10.array.Region): x10.array.Dist{self.region==r, x10.array.PlaceGroup.WORLD!=null}. Create a distribution over the specified region that varies in place only along the 0-th axis.
static Dist makeBlockCyclic(Region r, Int axis, Int blockSize)
          Declaration: makeBlockCyclic(r:x10.array.Region,axis:x10.lang.Int,blockSize:x10.lang.Int): x10.array.Dist{self.region==r}. Create a distribution over the specified region that varies in place only along the specified axis.
static Dist makeUnique(PlaceGroup pg)
          Declaration: makeUnique(pg:x10.array.PlaceGroup): x10.array.Dist{self.region.rank==1}. Create a distribution over a rank-1 region that maps every point in the region to a place in pg, and which maps some point in the region to every place in ps.
static Dist makeConstant(Region r, Place p)
          Declaration: makeConstant(r:x10.array.Region,p:x10.lang.Place): x10.array.Dist{self.region==r}. Create a distribution over the specified region that maps every point in the region to the specified place.
static Dist makeCyclic(Region r, Int axis, PlaceGroup pg)
          Declaration: makeCyclic(r:x10.array.Region,axis:x10.lang.Int,pg:x10.array.PlaceGroup): x10.array.Dist{self.region==r}. Create a distribution over the specified region that varies in place only along the specified axis, and maps the ith coordinate along that axis to place ps(i%ps.length).
static Dist makeBlock(Region r, Int axis, PlaceGroup pg)
          Declaration: makeBlock(r:x10.array.Region,axis:x10.lang.Int,pg:x10.array.PlaceGroup): x10.array.Dist{self.region==r}. Create a distribution over the specified region that varies in place only along the specified axis.
static void makeBlockCyclic(Region r, Int axis, Int blockSize, PlaceGroup pg)
          Create a distribution over the specified region that varies in place only along the specified axis.
abstract  PlaceGroup places()
          The PlaceGroup over which the distribuiton is defined
abstract  Int numPlaces()
          How many places are included in the distribution?
abstract  Iterable<Region> regions()
          Declaration: regions(): x10.lang.Iterable[x10.array.Region{self.rank==this(:x10.array.Dist).region.rank}].
abstract  Region get(Place p)
          Declaration: get(p:x10.lang.Place): x10.array.Region{self.rank==this(:x10.array.Dist).region.rank}. Return the region consisting of points which this distribution maps to the specified place.
 Region operator()(Place p)
          Declaration: operator()(p:x10.lang.Place): x10.array.Region{self.rank==this(:x10.array.Dist).region.rank}. Return the region consisting of points which this distribution maps to the specified place.
abstract  Place operator()(Point pt)
          Declaration: operator()(pt:x10.array.Point{self.rank==this(:x10.array.Dist).region.rank}): x10.lang.Place. Return the place which this distribution maps the specified point to.
 Place operator()(Int i0)
          Declaration: operator()(i0:x10.lang.Int){this(:x10.array.Dist).region.rank==1}: x10.lang.Place. Return the place which this distribution maps the specified index to.
 Place operator()(Int i0, Int i1)
          Declaration: operator()(i0:x10.lang.Int,i1:x10.lang.Int){this(:x10.array.Dist).region.rank==2}: x10.lang.Place. Return the place which this distribution maps the specified pair of indices to.
 Place operator()(Int i0, Int i1, Int i2)
          Declaration: operator()(i0:x10.lang.Int,i1:x10.lang.Int,i2:x10.lang.Int){this(:x10.array.Dist).region.rank==3}: x10.lang.Place. Return the place which this distribution maps the specified triple of indices to.
 Place operator()(Int i0, Int i1, Int i2, Int i3)
          Declaration: operator()(i0:x10.lang.Int,i1:x10.lang.Int,i2:x10.lang.Int,i3:x10.lang.Int){this(:x10.array.Dist).region.rank==4}: x10.lang.Place. Return the place which this distribution maps the specified quartet of indices to.
abstract  Int offset(Point pt)
          Declaration: offset(pt:x10.array.Point{self.rank==this(:x10.array.Dist).region.rank}): x10.lang.Int. Return the offset in linearized place-local storage of the given point.
 Int offset(Int i0)
          Declaration: offset(i0:x10.lang.Int){this(:x10.array.Dist).region.rank==1}: x10.lang.Int. Return the offset in linearized place-local storage of the point [i0] Throw a BadPlaceException if the given point is not mapped to the current place.
 Int offset(Int i0, Int i1)
          Declaration: offset(i0:x10.lang.Int,i1:x10.lang.Int){this(:x10.array.Dist).region.rank==2}: x10.lang.Int. Return the offset in linearized place-local storage of the point [i0,i1].
 Int offset(Int i0, Int i1, Int i2)
          Declaration: offset(i0:x10.lang.Int,i1:x10.lang.Int,i2:x10.lang.Int){this(:x10.array.Dist).region.rank==3}: x10.lang.Int. Return the offset in linearized place-local storage of the point [i0,i1,i2].
 Int offset(Int i0, Int i1, Int i2, Int i3)
          Declaration: offset(i0:x10.lang.Int,i1:x10.lang.Int,i2:x10.lang.Int,i3:x10.lang.Int){this(:x10.array.Dist).region.rank==4}: x10.lang.Int. Return the offset in linearized place-local storage of the point [i0,i1,i2,i3].
abstract  Int maxOffset()
          
 Iterator<Point> iterator()
          Declaration: iterator(): x10.lang.Iterator[x10.array.Point{self.rank==this(:x10.array.Dist).region.rank}]. Return an iterator for the underlying region of this distribution.
abstract  Dist restriction(Region r)
          Declaration: restriction(r:x10.array.Region{self.rank==this(:x10.array.Dist).region.rank}): x10.array.Dist{self.region.rank==this(:x10.array.Dist).region.rank}. Return the distribution defined over r, which must be contained in this.region, and which maps every point in its region to the same place as this distribution.
 Boolean isSubdistribution(Dist that)
          Declaration: isSubdistribution(that:x10.array.Dist{self.region.rank==this(:x10.array.Dist).region.rank}): x10.lang.Boolean. Return true iff that.region is contained in this.region, and that distribution maps every point to the same place as this distribution.
 Boolean equals(Any thatObj)
          Return true iff that is a distribution and both distributions are defined over equal regions and place groups, and map every point in said region to the same place.
abstract  Dist restriction(Place p)
          Declaration: restriction(p:x10.lang.Place): x10.array.Dist{self.region.rank==this(:x10.array.Dist).region.rank}. Return the distribution restricted to those points which it maps to the specified place.
 Boolean contains(Point p)
          Return true iff this.region contains p.
 Dist operator|(Region r)
          Declaration: operator|(r:x10.array.Region{self.rank==this(:x10.array.Dist).region.rank}): x10.array.Dist{self.region.rank==this(:x10.array.Dist).region.rank}. Restrict this distribution to the specified region.
 Dist operator|(Place p)
          Declaration: operator|(p:x10.lang.Place): x10.array.Dist{self.region.rank==this(:x10.array.Dist).region.rank}. Restrict this distribution to the specified place.
 String toString()
          Subtract the specified region from this distribution.
protected static void raiseBoundsError(Int i0)
          
protected static void raiseBoundsError(Int i0, Int i1)
          
protected static void raiseBoundsError(Int i0, Int i1, Int i2)
          
protected static void raiseBoundsError(Int i0, Int i1, Int i2, Int i3)
          
protected static void raiseBoundsError(Point pt)
          
protected static void raisePlaceError(Int i0)
          
protected static void raisePlaceError(Int i0, Int i1)
          
protected static void raisePlaceError(Int i0, Int i1, Int i2)
          
protected static void raisePlaceError(Int i0, Int i1, Int i2, Int i3)
          
protected static void raisePlaceError(Point pt)
          
 Dist x10$array$Dist$$x10$array$Dist$this()
          Declaration: x10$array$Dist$$x10$array$Dist$this(): x10.array.Dist{self==this(:x10.array.Dist)}. A distributution supports distributed arrays by providing a mapping from Points to Places.
 
Methods inherited from class x10.lang.Object
equals, hashCode, toString, typeName, x10$lang$Object$$x10$lang$Object$this
 
Methods inherited from interface x10.lang. Fun_0_1
operator()
 
Methods inherited from interface x10.lang.Iterable
iterator
 
Methods inherited from interface x10.lang.Any
toString, typeName, equals, hashCode
 

Field Detail

region

public final Region region
Property.

Constructor Detail

Dist

protected Dist(Region region)
Declaration: this(x10.array.Region): x10.array.Dist{self.region==region}.
Construct a distribution over the specified region.

Method Detail

rank

public final Int rank()
The rank of this distribution.


makeUnique

public static Dist makeUnique()
Declaration: makeUnique(): x10.array.Dist{self.region.rank==1}.
Create a distribution over a rank-1 region that maps every
point in the region to a distinct place, and which maps some
point in the region to every place.

Returns:
a "unique" distribution over all places.

makeConstant

public static Dist makeConstant(Region r)
Declaration: makeConstant(r:x10.array.Region): x10.array.Dist{self.region==r}.
Create a distribution over the specified region that maps
every point in the region to here.

Parameters:
r - the given region
Returns:
a "constant" distribution over r.

make

public static Dist make(Region r)
Declaration: make(r:x10.array.Region): x10.array.Dist{self.region==r}.
Create a distribution over the specified region that maps
every point in the region to here.

Parameters:
r - the given region
Returns:
a "constant" distribution over r.
See Also:
makeConstant(Region)

makeCyclic

public static Dist makeCyclic(Region r,
                              Int axis)
Declaration: makeCyclic(r:x10.array.Region,axis:x10.lang.Int): x10.array.Dist{self.region==r}.
Create a distribution over the specified region that varies in
place only along the specified axis, and maps the ith
coordinate along that axis to place i%Place.NUM_PLACES.

Parameters:
r - the given region
axis - the dimension to cycle over
Returns:
a "cyclic" distribution over r.

makeBlock

public static Dist makeBlock(Region r,
                             Int axis)
Declaration: makeBlock(r:x10.array.Region,axis:x10.lang.Int): x10.array.Dist{self.region==r}.
Create a distribution over the specified region that varies in
place only along the zeroth axis, and maps the ith
coordinate along that axis to place i%Place.NUM_PLACES.

Parameters:
r - the given region
r - the given region
axis - the dimension to block over
Returns:
a "cyclic" distribution over r, cycling over the zeroth axis. public static def makeCyclic(r:Region):Dist(r) = makeBlockCyclic(r, 0, 1); / Create a distribution over the specified region that varies in place only along the specified axis. It divides the coordinates along that axis into Place.MAX_PLACES blocks, and assigns successive blocks to successive places. If the number of coordinates in the axis does not divide evenly into the number of blocks, then the first (max(axis)-min(axis)+1)%Place.MAX_PLACES blocks will be assigned one more coordinate than the remaining blocks.

makeBlockBlock

public static Dist makeBlockBlock(Region r,
                                  Int axis0,
                                  Int axis1)
Declaration: makeBlockBlock(r:x10.array.Region,axis0:x10.lang.Int,axis1:x10.lang.Int): x10.array.Dist{self.region==r}.
Creates a block, block distribution across all places.
The coordinates are split along axis0 into M divisions such that M is the minimum of:
  - 2^q where q is the next integer above log2(P) / 2
  - the length of axis0
and split along axis1 into N divisions such that M
(N-1) <= P <= M
N.
Thus there are M
N blocks of size (axis0/M, axis1/N).
The blocks are not necessarily of integer size in either dimension.
Places 0..(M
N-P) are each assigned two such blocks, contiguous in axis0.
The remaining places are assigned a single block.
Block min and max coordinates are rounded to create subregions for each place,
e.g. a block [1.0..1.5,2.25..2.75] is rounded to a subregion [1..2,2..2].

Parameters:
r - the given region
axis0 - the first dimension to block over
axis1 - the second dimension to block over
Returns:
a "block,block" distribution over r.

makeBlock

public static Dist makeBlock(Region r)
Declaration: makeBlock(r:x10.array.Region): x10.array.Dist{self.region==r, x10.array.PlaceGroup.WORLD!=null}.
Create a distribution over the specified region that varies in
place only along the 0-th axis. It divides the coordinates
along the 0-th axis into Place.MAX_PLACES blocks, and assigns
successive blocks to successive places.  If the number of coordinates
in the axis does not divide evenly into the number of blocks, then
the first (max(axis)-min(axis)+1)%Place.MAX_PLACES blocks will be assigned
one more coordinate than the remaining blocks.

Parameters:
r - the given region
Returns:
a "block" distribution over r.

makeBlockCyclic

public static Dist makeBlockCyclic(Region r,
                                   Int axis,
                                   Int blockSize)
Declaration: makeBlockCyclic(r:x10.array.Region,axis:x10.lang.Int,blockSize:x10.lang.Int): x10.array.Dist{self.region==r}.
Create a distribution over the specified region that varies in
place only along the specified axis. It divides the coordinates
along that axis into blocks of the specified size, and assigns
block i to place i%Place.MAX_PLACES.

Parameters:
r - the given region
axis - the dimension to block over
blockSize - the size of the block
Returns:
a "block-cyclic" distribution over r.

makeUnique

public static Dist makeUnique(PlaceGroup pg)
Declaration: makeUnique(pg:x10.array.PlaceGroup): x10.array.Dist{self.region.rank==1}.
Create a distribution over a rank-1 region that maps every
point in the region to a place in pg, and which maps some
point in the region to every place in ps.

Parameters:
pg - the set of places
Returns:
a "unique" distribution over the places in ps

makeConstant

public static Dist makeConstant(Region r,
                                Place p)
Declaration: makeConstant(r:x10.array.Region,p:x10.lang.Place): x10.array.Dist{self.region==r}.
Create a distribution over the specified region that maps
every point in the region to the specified place.

Parameters:
r - the given region
p - the given place
Returns:
a "constant" distribution over r that maps to p.

makeCyclic

public static Dist makeCyclic(Region r,
                              Int axis,
                              PlaceGroup pg)
Declaration: makeCyclic(r:x10.array.Region,axis:x10.lang.Int,pg:x10.array.PlaceGroup): x10.array.Dist{self.region==r}.
Create a distribution over the specified region that varies in
place only along the specified axis, and maps the ith
coordinate along that axis to place ps(i%ps.length).

Parameters:
r - the given region
axis - the dimension to cycle over
pg - the PlaceGroup over which to distribute the region
Returns:
a "cyclic" distribution over r, cycling over the places in ps.

makeBlock

public static Dist makeBlock(Region r,
                             Int axis,
                             PlaceGroup pg)
Declaration: makeBlock(r:x10.array.Region,axis:x10.lang.Int,pg:x10.array.PlaceGroup): x10.array.Dist{self.region==r}.
Create a distribution over the specified region that varies in
place only along the specified axis. It divides the coordinates
along that axis into pg.numPlaces() blocks, and assigns successive
blocks to successive places in pg. If the number of coordinates
in the axis does not divide evenly into the number of places in pg, then
the first (max(axis)-min(axis)+1)%pg.numPlaces() blocks will be assigned
one more coordinate than the remaining blocks.

Parameters:
r - the given region
axis - the dimension to block over
pg - the PlaceGroup over which to distribute the region
Returns:
a "block" distribution over r, blocking over the places in ps.

makeBlockCyclic

public static void makeBlockCyclic(Region r,
                                   Int axis,
                                   Int blockSize,
                                   PlaceGroup pg)
Create a distribution over the specified region that varies in place only along the specified axis. It divides the coordinates along that axis into blocks of the specified size, and assigns block i to place ps(i%ps.length).

Parameters:
r - the given region
axis - the dimension to block over
blockSize - the size of the block
pg - the PlaceGroup over which to distribute the region

places

public abstract PlaceGroup places()
The PlaceGroup over which the distribuiton is defined


numPlaces

public abstract Int numPlaces()
How many places are included in the distribution?


regions

public abstract Iterable<Region> regions()
Declaration: regions(): x10.lang.Iterable[x10.array.Region{self.rank==this(:x10.array.Dist).region.rank}].

Returns:
an object that implements Iterable[Region] that can be used to iterate over the set of Regions that this distribution maps some point to.

get

public abstract Region get(Place p)
Declaration: get(p:x10.lang.Place): x10.array.Region{self.rank==this(:x10.array.Dist).region.rank}.
Return the region consisting of points which this distribution
maps to the specified place.

Parameters:
p - the given place
Returns:
the region that this distribution maps to p.

operator()

public Region operator()(Place p)
Declaration: operator()(p:x10.lang.Place): x10.array.Region{self.rank==this(:x10.array.Dist).region.rank}.
Return the region consisting of points which this distribution
maps to the specified place.  This is a shorthave for get(p).

Parameters:
p - the given place
Returns:
the region that this distribution maps to p.

operator()

public abstract Place operator()(Point pt)
Declaration: operator()(pt:x10.array.Point{self.rank==this(:x10.array.Dist).region.rank}): x10.lang.Place.
Return the place which this distribution maps the specified point to.

Parameters:
pt - the given point
Returns:
the place that this distribution maps pt to.

operator()

public Place operator()(Int i0)
Declaration: operator()(i0:x10.lang.Int){this(:x10.array.Dist).region.rank==1}: x10.lang.Place.
Return the place which this distribution maps the specified index to.
Only applies to one-dimensional distributions.
Functionally equivalent to indexing the distribution via a one-dimensional point.

Parameters:
i0 - the given index in the first dimension
Returns:
the place that this distribution maps the given index to.
See Also:
operator(Point)

operator()

public Place operator()(Int i0,
                        Int i1)
Declaration: operator()(i0:x10.lang.Int,i1:x10.lang.Int){this(:x10.array.Dist).region.rank==2}: x10.lang.Place.
Return the place which this distribution maps the specified pair of indices to.
Only applies to two-dimensional distributions.
Functionally equivalent to indexing the distribution via a two-dimensional point.

Parameters:
i0 - the given index in the first dimension
i1 - the given index in the second dimension
Returns:
the place that this distribution maps the given pair of indices to.
See Also:
operator(Point)

operator()

public Place operator()(Int i0,
                        Int i1,
                        Int i2)
Declaration: operator()(i0:x10.lang.Int,i1:x10.lang.Int,i2:x10.lang.Int){this(:x10.array.Dist).region.rank==3}: x10.lang.Place.
Return the place which this distribution maps the specified triple of indices to.
Only applies to three-dimensional distributions.
Functionally equivalent to indexing the distribution via a three-dimensional point.

Parameters:
i0 - the given index in the first dimension
i1 - the given index in the second dimension
i2 - the given index in the third dimension
Returns:
the place that this distribution maps the given triple of indices to.
See Also:
operator(Point)

operator()

public Place operator()(Int i0,
                        Int i1,
                        Int i2,
                        Int i3)
Declaration: operator()(i0:x10.lang.Int,i1:x10.lang.Int,i2:x10.lang.Int,i3:x10.lang.Int){this(:x10.array.Dist).region.rank==4}: x10.lang.Place.
Return the place which this distribution maps the specified quartet of indices to.
Only applies to four-dimensional distributions.
Functionally equivalent to indexing the distribution via a four-dimensional point.

Parameters:
i0 - the given index in the first dimension
i1 - the given index in the second dimension
i2 - the given index in the third dimension
i3 - the given index in the fourth dimension
Returns:
the place that this distribution maps the given quartet of indices to.
See Also:
operator(Point)

offset

public abstract Int offset(Point pt)
Declaration: offset(pt:x10.array.Point{self.rank==this(:x10.array.Dist).region.rank}): x10.lang.Int.
Return the offset in linearized place-local storage of the given point.
Throw a BadPlaceException if the given point is not mapped to
the current place.  Primarily intended to be used by the DistArray implementation,
but may be useful for other data structures as well that need to associate
Points in a Distribution with a dense, zero-based numbering.

Parameters:
pt - the given point
Returns:
the storage offset assigned to pt by this distribution

offset

public Int offset(Int i0)
Declaration: offset(i0:x10.lang.Int){this(:x10.array.Dist).region.rank==1}: x10.lang.Int.
Return the offset in linearized place-local storage of the point [i0]
Throw a BadPlaceException if the given point is not mapped to
the current place.  Primarily intended to be used by the DistArray implementation,
but may be useful for other data structures as well that need to associate
Points in a Distribution with a dense, zero-based numbering.

Only applies to one-dimensional distributions.

Parameters:
i0 - the given index in the first dimension
Returns:
the storage offset assigned to [i0] by this distribution
See Also:
offset(Point)

offset

public Int offset(Int i0,
                  Int i1)
Declaration: offset(i0:x10.lang.Int,i1:x10.lang.Int){this(:x10.array.Dist).region.rank==2}: x10.lang.Int.
Return the offset in linearized place-local storage of the point [i0,i1].
Throw a BadPlaceException if the given point is not mapped to
the current place.  Primarily intended to be used by the DistArray implementation,
but may be useful for other data structures as well that need to associate
Points in a Distribution with a dense, zero-based numbering.

Only applies to two-dimensional distributions.

Parameters:
i0 - the given index in the first dimension
i1 - the given index in the second dimension
Returns:
the storage offset assigned to [i0,i1] by this distribution
See Also:
offset(Point)

offset

public Int offset(Int i0,
                  Int i1,
                  Int i2)
Declaration: offset(i0:x10.lang.Int,i1:x10.lang.Int,i2:x10.lang.Int){this(:x10.array.Dist).region.rank==3}: x10.lang.Int.
Return the offset in linearized place-local storage of the point [i0,i1,i2].
Throw a BadPlaceException if the given point is not mapped to
the current place.  Primarily intended to be used by the DistArray implementation,
but may be useful for other data structures as well that need to associate
Points in a Distribution with a dense, zero-based numbering.

Only applies to three-dimensional distributions.

Parameters:
i0 - the given index in the first dimension
i1 - the given index in the second dimension
i2 - the given index in the third dimension
Returns:
the storage offset assigned to [i0,i1,i2] by this distribution
See Also:
offset(Point)

offset

public Int offset(Int i0,
                  Int i1,
                  Int i2,
                  Int i3)
Declaration: offset(i0:x10.lang.Int,i1:x10.lang.Int,i2:x10.lang.Int,i3:x10.lang.Int){this(:x10.array.Dist).region.rank==4}: x10.lang.Int.
Return the offset in linearized place-local storage of the point [i0,i1,i2,i3].
Throw a BadPlaceException if the given point is not mapped to
the current place.  Primarily intended to be used by the DistArray implementation,
but may be useful for other data structures as well that need to associate
Points in a Distribution with a dense, zero-based numbering.

Only applies to four-dimensional distributions.

Parameters:
i0 - the given index in the first dimension
i1 - the given index in the second dimension
i2 - the given index in the third dimension
i3 - the given index in the fourth dimension
Returns:
the storage offset assigned to [i0,i1,i2,i3] by this distribution
See Also:
offset(Point)

maxOffset

public abstract Int maxOffset()

Returns:
the maximum value returned by the offset method for the current place for any possible argument Point
See Also:
offset(Point)

iterator

public Iterator<Point> iterator()
Declaration: iterator(): x10.lang.Iterator[x10.array.Point{self.rank==this(:x10.array.Dist).region.rank}].
Return an iterator for the underlying region of this distribution.
Supports the syntax

  (for p:Point in d)
      ... p ...

Returns:
an iterator over the points in the region of this distribution.
See Also:
x10.lang.Iterable[T]#iterator()

restriction

public abstract Dist restriction(Region r)
Declaration: restriction(r:x10.array.Region{self.rank==this(:x10.array.Dist).region.rank}): x10.array.Dist{self.region.rank==this(:x10.array.Dist).region.rank}.
Return the distribution defined over r, which must be
contained in this.region, and which maps every point in its
region to the same place as this distribution.
Functionally equivalent to intersection(Region).

Parameters:
r - the given region
Returns:
the restriction of this distribution to r.

isSubdistribution

public Boolean isSubdistribution(Dist that)
Declaration: isSubdistribution(that:x10.array.Dist{self.region.rank==this(:x10.array.Dist).region.rank}): x10.lang.Boolean.
Return true iff that.region is contained in this.region, and
that distribution maps every point to the same place as this
distribution.

Parameters:
that - the given distribution
Returns:
true if that is a sub-distribution of this distribution.

equals

public Boolean equals(Any thatObj)
Return true iff that is a distribution and both distributions are defined over equal regions and place groups, and map every point in said region to the same place.

Parameters:
that - the given distribution
Returns:
true if that is equal to this distribution.

restriction

public abstract Dist restriction(Place p)
Declaration: restriction(p:x10.lang.Place): x10.array.Dist{self.region.rank==this(:x10.array.Dist).region.rank}.
Return the distribution restricted to those points which it
maps to the specified place.

Parameters:
p - the given place
Returns:
the portion of this distribution that maps to p.

contains

public Boolean contains(Point p)
Return true iff this.region contains p.

Parameters:
p - the given point
Returns:
true if this distribution contains p.

operator|

public Dist operator|(Region r)
Declaration: operator|(r:x10.array.Region{self.rank==this(:x10.array.Dist).region.rank}): x10.array.Dist{self.region.rank==this(:x10.array.Dist).region.rank}.
Restrict this distribution to the specified region.

Parameters:
r - the given region
Returns:
the restriction of this distribution to r.

operator|

public Dist operator|(Place p)
Declaration: operator|(p:x10.lang.Place): x10.array.Dist{self.region.rank==this(:x10.array.Dist).region.rank}.
Restrict this distribution to the specified place.

Parameters:
p - the given place
Returns:
the region that this distribution maps to p.

toString

public String toString()
Subtract the specified region from this distribution.

Parameters:
r - the given region
Returns:
the difference of this distribution and r. public operator this - (r:Region(rank)):Dist(rank) = difference(r);

raiseBoundsError

protected static void raiseBoundsError(Int i0)


raiseBoundsError

protected static void raiseBoundsError(Int i0,
                                       Int i1)


raiseBoundsError

protected static void raiseBoundsError(Int i0,
                                       Int i1,
                                       Int i2)


raiseBoundsError

protected static void raiseBoundsError(Int i0,
                                       Int i1,
                                       Int i2,
                                       Int i3)


raiseBoundsError

protected static void raiseBoundsError(Point pt)


raisePlaceError

protected static void raisePlaceError(Int i0)


raisePlaceError

protected static void raisePlaceError(Int i0,
                                      Int i1)


raisePlaceError

protected static void raisePlaceError(Int i0,
                                      Int i1,
                                      Int i2)


raisePlaceError

protected static void raisePlaceError(Int i0,
                                      Int i1,
                                      Int i2,
                                      Int i3)


raisePlaceError

protected static void raisePlaceError(Point pt)


x10$array$Dist$$x10$array$Dist$this

public final Dist x10$array$Dist$$x10$array$Dist$this()
Declaration: x10$array$Dist$$x10$array$Dist$this(): x10.array.Dist{self==this(:x10.array.Dist)}.
A distributution supports distributed arrays by providing a mapping
from Points to Places.  Equivalently, a distribution may be defined
as a mapping from Places to Regions.  The Dist class provides a set
of factory methods for constructing various distributions.  There
are a set of methods supporting algebraic operations on
distributions, such as union, intersection, difference, and so on.