diff --git a/modules/dists/BlockCycDist.chpl b/modules/dists/BlockCycDist.chpl index a98877184df1..e4dd38461de6 100644 --- a/modules/dists/BlockCycDist.chpl +++ b/modules/dists/BlockCycDist.chpl @@ -23,7 +23,7 @@ prototype module BlockCycDist { // // BlockCyclic Distribution // -// BlockCyclic BlockCyclicDom BlockCyclicArr +// BlockCyclicImpl BlockCyclicDom BlockCyclicArr // // LocBlockCyclic LocBlockCyclicDom LocBlockCyclicArr // @@ -63,11 +63,11 @@ proc _ensureTuple(arg) { //////////////////////////////////////////////////////////////////////////////// -// BlockCyclic Distribution Class +// BlockCyclicImpl Distribution Class // /* -This Block-Cyclic distribution maps maps blocks of indices to locales in a +The ``blockCycDist`` distribution maps blocks of indices to locales in a round-robin pattern according to a given block size and start index. Formally, consider a Block-Cyclic distribution with: @@ -111,12 +111,12 @@ to the ID of the locale to which it is mapped. const Space = {1..8, 1..8}; const D: domain(2) - dmapped BlockCyclic(startIdx=Space.lowBound,blocksize=(2,3)) + dmapped blockCycDist(startIdx=Space.lowBound,blocksize=(2,3)) = Space; var A: [D] int; forall a in A do - a = a.locale.id; + a = a.here.id; writeln(A); @@ -136,11 +136,11 @@ When run on 6 locales, the output is: **Initializer Arguments** -The ``BlockCyclic`` class initializer is defined as follows: +The ``blockCycDist`` initializer is defined as follows: .. code-block:: chapel - proc BlockCyclic.init( + proc blockCycDist.init( startIdx, blocksize, targetLocales: [] locale = Locales, @@ -172,7 +172,7 @@ of tasks on each Locale for data parallelism. The ``rank`` and ``idxType`` arguments are inferred from the ``startIdx`` argument unless explicitly set. They must match the rank and index type of the domains -"dmapped" using that BlockCyclic instance. +"dmapped" using that blockCycDist instance. **Data-Parallel Iteration** @@ -182,7 +182,107 @@ executes each iteration on the locale where that iteration's index is mapped to. */ -class BlockCyclic : BaseDist, writeSerializable { + + +record blockCycDist: writeSerializable { + param rank: int; + type idxType = int; + + forwarding const chpl_distHelp: chpl_PrivatizedDistHelper(unmanaged BlockCyclicImpl(rank, idxType)); + + proc init(startIdx, + blocksize, + targetLocales: [] locale = Locales, + dataParTasksPerLocale=getDataParTasksPerLocale(), + param rank = _determineRankFromArg(startIdx), + type idxType = _determineIdxTypeFromArg(startIdx)) { + const value = new unmanaged BlockCyclicImpl(startIdx, blocksize, + targetLocales, + dataParTasksPerLocale, + rank, idxType); + this.rank = rank; + this.idxType = idxType; + this.chpl_distHelp = new chpl_PrivatizedDistHelper( + if _isPrivatized(value) + then _newPrivatizedClass(value) + else nullPid, + value); + } + + proc init(_pid : int, _instance, _unowned : bool) { + this.rank = _instance.rank; + this.idxType = _instance.idxType; + this.chpl_distHelp = new chpl_PrivatizedDistHelper(_pid, + _instance, + _unowned); + } + + proc init(value) { + this.rank = value.rank; + this.idxType = value.idxType; + this.chpl_distHelp = new chpl_PrivatizedDistHelper( + if _isPrivatized(value) + then _newPrivatizedClass(value) + else nullPid, + _to_unmanaged(value)); + } + + // Note: This does not handle the case where the desired type of 'this' + // does not match the type of 'other'. That case is handled by the compiler + // via coercions. + proc init=(const ref other : blockCycDist(?)) { + this.init(other._value.dsiClone()); + } + + proc clone() { + return new blockCycDist(this._value.dsiClone()); + } + + @chpldoc.nodoc + inline operator ==(d1: blockCycDist(?), d2: blockCycDist(?)) { + if (d1._value == d2._value) then + return true; + return d1._value.dsiEqualDMaps(d2._value); + } + + @chpldoc.nodoc + inline operator !=(d1: blockCycDist(?), d2: blockCycDist(?)) { + return !(d1 == d2); + } + + proc writeThis(x) { + chpl_distHelp.writeThis(x); + } + + proc serialize(writer, ref serializer) throws { + writeThis(writer); + } +} + + +@chpldoc.nodoc +@unstable(category="experimental", reason="assignment between distributions is currently unstable due to lack of testing") +operator =(ref a: blockCycDist(?), b: blockCycDist(?)) { + if a._value == nil { + __primitive("move", a, chpl__autoCopy(b.clone(), definedConst=false)); + } else { + if a._value.type != b._value.type then + compilerError("type mismatch in distribution assignment"); + if a._value == b._value { + // do nothing + } else + a._value.dsiAssign(b._value); + if _isPrivatized(a._instance) then + _reprivatize(a._value); + } +} + + +@deprecated("'BlockCyclic' is deprecated, please use 'blockCycDist' instead") +type BlockCyclic = blockCycDist; + + +class BlockCyclicImpl : BaseDist, writeSerializable { param rank: int; type idxType = int; @@ -246,7 +346,7 @@ class BlockCyclic : BaseDist, writeSerializable { } // copy initializer for privatization - proc init(param rank: int, type idxType, other: unmanaged BlockCyclic(rank, idxType)) { + proc init(param rank: int, type idxType, other: unmanaged BlockCyclicImpl(rank, idxType)) { this.rank = rank; this.idxType = idxType; lowIdx = other.lowIdx; @@ -258,7 +358,7 @@ class BlockCyclic : BaseDist, writeSerializable { } proc dsiClone() { - return new unmanaged BlockCyclic(lowIdx, blocksize, targetLocales, dataParTasksPerLocale); + return new unmanaged BlockCyclicImpl(lowIdx, blocksize, targetLocales, dataParTasksPerLocale); } override proc dsiDestroyDist() { @@ -268,7 +368,7 @@ class BlockCyclic : BaseDist, writeSerializable { } } - proc dsiEqualDMaps(that: BlockCyclic(?)) { + proc dsiEqualDMaps(that: BlockCyclicImpl(?)) { // // TODO: In retrospect, I think that this equality check // is too simple. Since a distribution distributes the @@ -290,7 +390,7 @@ class BlockCyclic : BaseDist, writeSerializable { } } -proc BlockCyclic._locsize { +proc BlockCyclicImpl._locsize { var ret : rank*int; for param i in 0..rank-1 { ret(i) = targetLocDom.dim(i).sizeAs(int); @@ -301,7 +401,7 @@ proc BlockCyclic._locsize { // // create a new rectangular domain over this distribution // -override proc BlockCyclic.dsiNewRectangularDom(param rank: int, type idxType, +override proc BlockCyclicImpl.dsiNewRectangularDom(param rank: int, type idxType, param strides: strideKind, inds) { if idxType != this.idxType then compilerError("BlockCyclic domain index type does not match distribution's"); @@ -318,9 +418,9 @@ override proc BlockCyclic.dsiNewRectangularDom(param rank: int, type idxType, // // output distribution // -proc BlockCyclic.writeThis(x) throws { - x.writeln("BlockCyclic"); - x.writeln("-------"); +proc BlockCyclicImpl.writeThis(x) throws { + x.writeln("blockCycDist"); + x.writeln("------------"); x.writeln("distributes: ", lowIdx, "..."); x.writeln("in chunks of: ", blocksize); x.writeln("across locales: ", targetLocales); @@ -329,18 +429,18 @@ proc BlockCyclic.writeThis(x) throws { for locid in targetLocDom do x.writeln(" [", locid, "] ", locDist(locid)); } -override proc BlockCyclic.serialize(writer, ref serializer) throws { +override proc BlockCyclicImpl.serialize(writer, ref serializer) throws { writeThis(writer); } // // convert an index into a locale value // -proc BlockCyclic.dsiIndexToLocale(ind: idxType) where rank == 1 { +proc BlockCyclicImpl.dsiIndexToLocale(ind: idxType) where rank == 1 { return targetLocales(idxToLocaleInd(ind)); } -proc BlockCyclic.dsiIndexToLocale(ind: rank*idxType) { +proc BlockCyclicImpl.dsiIndexToLocale(ind: rank*idxType) { return targetLocales(idxToLocaleInd(ind)); } @@ -348,7 +448,7 @@ proc BlockCyclic.dsiIndexToLocale(ind: rank*idxType) { // compute what chunk of inds is owned by a given locale -- assumes // it's being called on the locale in question // -proc BlockCyclic.getStarts(inds, locid) { +proc BlockCyclicImpl.getStarts(inds, locid) { // use domain slicing to get the intersection between what the // locale owns and the domain's index set // @@ -403,17 +503,17 @@ proc BlockCyclic.getStarts(inds, locid) { // someone else can help me remember it (since it was probably someone // else's suggestion). // -proc BlockCyclic.idxToLocaleInd(ind: idxType) where rank == 1 { +proc BlockCyclicImpl.idxToLocaleInd(ind: idxType) where rank == 1 { const ind0 = ind - lowIdx(0); // compilerError((ind0/blocksize(0)%targetLocDom.dim(0).type:string); return (ind0 / blocksize(0)) % targetLocDom.dim(0).size; } -proc BlockCyclic.idxToLocaleInd(ind: rank*idxType) where rank == 1 { +proc BlockCyclicImpl.idxToLocaleInd(ind: rank*idxType) where rank == 1 { return idxToLocaleInd(ind(0)); } -proc BlockCyclic.idxToLocaleInd(ind: rank*idxType) where rank != 1 { +proc BlockCyclicImpl.idxToLocaleInd(ind: rank*idxType) where rank != 1 { var locInd: rank*int; for param i in 0..rank-1 { const ind0 = ind(i) - lowIdx(i); @@ -422,7 +522,7 @@ proc BlockCyclic.idxToLocaleInd(ind: rank*idxType) where rank != 1 { return locInd; } -proc BlockCyclic.init(other: BlockCyclic, privatizeData, +proc BlockCyclicImpl.init(other: BlockCyclicImpl, privatizeData, param rank = other.rank, type idxType = other.idxType) { this.rank = rank; this.idxType = idxType; @@ -434,14 +534,14 @@ proc BlockCyclic.init(other: BlockCyclic, privatizeData, dataParTasksPerLocale = privatizeData[3]; } -override proc BlockCyclic.dsiSupportsPrivatization() param do return true; +override proc BlockCyclicImpl.dsiSupportsPrivatization() param do return true; -proc BlockCyclic.dsiGetPrivatizeData() { +proc BlockCyclicImpl.dsiGetPrivatizeData() { return (lowIdx, blocksize, targetLocDom.dims(), dataParTasksPerLocale); } -proc BlockCyclic.dsiPrivatize(privatizeData) { - return new unmanaged BlockCyclic(_to_unmanaged(this), privatizeData); +proc BlockCyclicImpl.dsiPrivatize(privatizeData) { + return new unmanaged BlockCyclicImpl(_to_unmanaged(this), privatizeData); } //////////////////////////////////////////////////////////////////////////////// @@ -506,7 +606,7 @@ class BlockCyclicDom: BaseRectangularDom(?) { // // LEFT LINK: a pointer to the parent distribution // - const dist: unmanaged BlockCyclic(rank, idxType); + const dist: unmanaged BlockCyclicImpl(rank, idxType); // // DOWN LINK: an array of local domain class descriptors -- set up in @@ -743,6 +843,13 @@ proc BlockCyclicDom.dsiReprivatize(other, reprivatizeData) { whole = other.whole; } +proc BlockCyclicDom.dsiGetDist() { + if _isPrivatized(dist) then + return new blockCycDist(dist.pid, dist, _unowned=true); + else + return new blockCycDist(nullPid, dist, _unowned=true); +} + //////////////////////////////////////////////////////////////////////////////// // BlockCyclic Local Domain Class @@ -1058,7 +1165,7 @@ proc BlockCyclicArr.dsiTargetLocales() const ref { proc BlockCyclicDom.dsiTargetLocales() const ref { return dist.targetLocales; } -proc BlockCyclic.dsiTargetLocales() const ref { +proc BlockCyclicImpl.dsiTargetLocales() const ref { return targetLocales; } diff --git a/modules/dists/ReplicatedDist.chpl b/modules/dists/ReplicatedDist.chpl index e6ef2087e7bf..cfa45361a3f6 100644 --- a/modules/dists/ReplicatedDist.chpl +++ b/modules/dists/ReplicatedDist.chpl @@ -96,7 +96,7 @@ distribution. **Initializer Arguments** -The ``replicatedDist`` class initializer is defined as follows: +The ``replicatedDist`` initializer is defined as follows: .. code-block:: chapel diff --git a/modules/dists/dims/BlockCycDim.chpl b/modules/dists/dims/BlockCycDim.chpl index 72e4a7848c02..0ecd0beed1fc 100644 --- a/modules/dists/dims/BlockCycDim.chpl +++ b/modules/dists/dims/BlockCycDim.chpl @@ -45,7 +45,7 @@ This Block-Cyclic dimension specifier is for use with the :class:`DimensionalDist2D` distribution. It specifies the mapping of indices in its dimension -that would be produced by a 1D :class:`~BlockCycDist.BlockCyclic` distribution. +that would be produced by a 1D :class:`~BlockCycDist.blockCycDist` distribution. **Initializer Arguments** @@ -66,7 +66,7 @@ The arguments are as follows: to be distributed over ``lowIdx``, ``blockSize`` are the counterparts to ``startIdx`` and ``blocksize`` - in the :class:`~BlockCycDist.BlockCyclic` distribution + in the :class:`~BlockCycDist.blockCycDist` distribution ``cycleSizePos`` is used internally by the implementation and should not be specified by the user code diff --git a/test/arrays/ferguson/array-initialization-patterns/array-initialization-patterns-dists.chpl b/test/arrays/ferguson/array-initialization-patterns/array-initialization-patterns-dists.chpl index 99f426da8194..db2201666569 100644 --- a/test/arrays/ferguson/array-initialization-patterns/array-initialization-patterns-dists.chpl +++ b/test/arrays/ferguson/array-initialization-patterns/array-initialization-patterns-dists.chpl @@ -65,7 +65,7 @@ proc makeInitialArray() { } else if distType == DistType.cyclic { return cyclicDist.createArray(1..1, int); } else if distType == DistType.blockcyclic { - var D = {1..1} dmapped BlockCyclic(startIdx=(1,), (3,)); + var D = {1..1} dmapped blockCycDist(startIdx=(1,), (3,)); var ret: [D] int; return ret; } else if distType == DistType.replicated { diff --git a/test/arrays/ferguson/array-initialization-patterns/post-alloc-dists.chpl b/test/arrays/ferguson/array-initialization-patterns/post-alloc-dists.chpl index cb422e8d804d..a3c40fa022c6 100644 --- a/test/arrays/ferguson/array-initialization-patterns/post-alloc-dists.chpl +++ b/test/arrays/ferguson/array-initialization-patterns/post-alloc-dists.chpl @@ -22,7 +22,7 @@ proc makeA() { } else if distType == DistType.cyclic { return cyclicDist.createArray(1..1, int); } else if distType == DistType.blockcyclic { - var D = {1..1} dmapped BlockCyclic(startIdx=(1,), (3,)); + var D = {1..1} dmapped blockCycDist(startIdx=(1,), (3,)); var ret: [D] int; return ret; } else if distType == DistType.replicated { diff --git a/test/deprecated/dmapType.chpl b/test/deprecated/dmapType.chpl index 15df80198dd7..b2092ce0619a 100644 --- a/test/deprecated/dmapType.chpl +++ b/test/deprecated/dmapType.chpl @@ -62,3 +62,14 @@ config var n = 10, addLeaks=false; writeln(Dist2.type:string); } } + +{ + use BlockCycDist; + var Dist = new dmap(new BlockCyclic(1, 2)); + var Dom = {1..n} dmapped Dist; + var A: [Dom] real; + writeln(A); + const Dist2: dmap(BlockCyclic(1)) = new BlockCyclic(1, 2); + writeln(Dist2.type:string); +} + diff --git a/test/deprecated/dmapType.good b/test/deprecated/dmapType.good index e08434586fd1..7e2c6ab74126 100644 --- a/test/deprecated/dmapType.good +++ b/test/deprecated/dmapType.good @@ -14,6 +14,9 @@ dmapType.chpl:54: warning: 'Private' is deprecated, please use 'privateDist' ins dmapType.chpl:57: warning: 'Private' is deprecated, please use 'privateDist' instead dmapType.chpl:61: warning: 'Private' is deprecated, please use 'privateDist' instead dmapType.chpl:61: warning: 'Private' is deprecated, please use 'privateDist' instead +dmapType.chpl:68: warning: 'BlockCyclic' is deprecated, please use 'blockCycDist' instead +dmapType.chpl:72: warning: 'BlockCyclic' is deprecated, please use 'blockCycDist' instead +dmapType.chpl:72: warning: 'BlockCyclic' is deprecated, please use 'blockCycDist' instead dmapType.chpl:4: warning: The use of 'dmap' is deprecated for this distribution; please replace 'new dmap(new ())' with 'new ()' dmapType.chpl:8: warning: The use of 'dmap' is deprecated for this distribution; please replace 'dmap(())' with '()' dmapType.chpl:14: warning: The use of 'dmap' is deprecated for this distribution; please replace 'new dmap(new ())' with 'new ()' @@ -24,6 +27,8 @@ dmapType.chpl:34: warning: The use of 'dmap' is deprecated for this distribution dmapType.chpl:38: warning: The use of 'dmap' is deprecated for this distribution; please replace 'dmap(())' with '()' dmapType.chpl:57: warning: The use of 'dmap' is deprecated for this distribution; please replace 'new dmap(new ())' with 'new ()' dmapType.chpl:61: warning: The use of 'dmap' is deprecated for this distribution; please replace 'dmap(())' with '()' +dmapType.chpl:68: warning: The use of 'dmap' is deprecated for this distribution; please replace 'new dmap(new ())' with 'new ()' +dmapType.chpl:72: warning: The use of 'dmap' is deprecated for this distribution; please replace 'dmap(())' with '()' 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 blockDist(1,int(64),unmanaged DefaultDist) 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 @@ -33,3 +38,5 @@ replicatedDist 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 stencilDist(1,int(64),false) foo got privateDist +0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 +blockCycDist(1,int(64)) diff --git a/test/distributions/bharshbarg/arrOfArrDmap.chpl b/test/distributions/bharshbarg/arrOfArrDmap.chpl index 815950f464c3..d8d8caa666d0 100644 --- a/test/distributions/bharshbarg/arrOfArrDmap.chpl +++ b/test/distributions/bharshbarg/arrOfArrDmap.chpl @@ -22,6 +22,6 @@ var CyclicSpace = Dom dmapped cyclicDist(startIdx=Dom.low); test(CyclicSpace); writeln("Success: Cyclic"); -var BCSpace = Dom dmapped BlockCyclic(startIdx=Dom.low, blocksize=2); +var BCSpace = Dom dmapped blockCycDist(startIdx=Dom.low, blocksize=2); test(BCSpace); writeln("Success: BlockCyclic"); diff --git a/test/distributions/bharshbarg/blockCyclic/indexing.chpl b/test/distributions/bharshbarg/blockCyclic/indexing.chpl index eac6a4b50075..5c13d2d1f00d 100644 --- a/test/distributions/bharshbarg/blockCyclic/indexing.chpl +++ b/test/distributions/bharshbarg/blockCyclic/indexing.chpl @@ -9,7 +9,7 @@ proc test(Dom, bs) { if debug then writeln("### Testing ", Dom, " with blocksize ", bs, " ###"); const start = if isTuple(Dom.low) then Dom.low else (Dom.low,); - const Space = Dom dmapped BlockCyclic(startIdx=start, blocksize=bs); + const Space = Dom dmapped blockCycDist(startIdx=start, blocksize=bs); var A : [Space] int; forall i in Space with (ref A) do A[i] = here.id + 1; diff --git a/test/distributions/bharshbarg/blockCyclic/oldIndexingError.chpl b/test/distributions/bharshbarg/blockCyclic/oldIndexingError.chpl index 9ff34af15a03..4e31a7c69a47 100644 --- a/test/distributions/bharshbarg/blockCyclic/oldIndexingError.chpl +++ b/test/distributions/bharshbarg/blockCyclic/oldIndexingError.chpl @@ -1,7 +1,7 @@ use BlockCycDist; var Dom = {1..8, 1..9, 1..4}; -var Space = Dom dmapped BlockCyclic(startIdx=Dom.low, blocksize=(2, 3, 2)); +var Space = Dom dmapped blockCycDist(startIdx=Dom.low, blocksize=(2, 3, 2)); var A : [Space] int; A = 1; diff --git a/test/distributions/bharshbarg/subQuery.chpl b/test/distributions/bharshbarg/subQuery.chpl index f2612de09b84..81d3cd7416d2 100644 --- a/test/distributions/bharshbarg/subQuery.chpl +++ b/test/distributions/bharshbarg/subQuery.chpl @@ -14,7 +14,7 @@ test(B); const C = Space dmapped cyclicDist(startIdx = Space.low); test(C); -const BC = Space dmapped BlockCyclic(startIdx = Space.low, blocksize = (2,2)); +const BC = Space dmapped blockCycDist(startIdx = Space.low, blocksize = (2,2)); test(BC); const SC = Space dmapped stencilDist(Space, fluff=(1,1)); diff --git a/test/distributions/bradc/blkCyc/blkCyc.chpl b/test/distributions/bradc/blkCyc/blkCyc.chpl index 2b83d2d91d96..2f3f16ba1943 100644 --- a/test/distributions/bradc/blkCyc/blkCyc.chpl +++ b/test/distributions/bradc/blkCyc/blkCyc.chpl @@ -2,7 +2,7 @@ use BlockCycDist; config const n = 25; -var MyBlkCyc = new dmap(new BlockCyclic(startIdx=(1,), blocksize=(4,))); +var MyBlkCyc = new blockCycDist(startIdx=(1,), blocksize=(4,)); writeln("Declaring D:"); var D: domain(1) dmapped MyBlkCyc = {1..n}; diff --git a/test/distributions/bradc/blkCyc/blkCyc2d.chpl b/test/distributions/bradc/blkCyc/blkCyc2d.chpl index 3bb7fa7fc6ec..617256478814 100644 --- a/test/distributions/bradc/blkCyc/blkCyc2d.chpl +++ b/test/distributions/bradc/blkCyc/blkCyc2d.chpl @@ -2,7 +2,7 @@ use BlockCycDist; config const m = 25, n = 35; -var MyBlkCyc = new dmap(new BlockCyclic(startIdx=(1,0), blocksize=(4, 8))); +var MyBlkCyc = new blockCycDist(startIdx=(1,0), blocksize=(4, 8)); writeln("Declaring D:"); var D: domain(2) dmapped MyBlkCyc = {1..m, 0..n}; diff --git a/test/distributions/bradc/blkCyc/blkCycSliceOOB.chpl b/test/distributions/bradc/blkCyc/blkCycSliceOOB.chpl index 5b9365b6e3f6..307bfe2f2697 100644 --- a/test/distributions/bradc/blkCyc/blkCycSliceOOB.chpl +++ b/test/distributions/bradc/blkCyc/blkCycSliceOOB.chpl @@ -3,7 +3,7 @@ use BlockCycDist; config const n = 10, blkSize=8; proc main() { - const MatVecSpace = {1..n, 1..n+1} dmapped BlockCyclic(startIdx=(1,1), (8,8)); + const MatVecSpace = {1..n, 1..n+1} dmapped blockCycDist(startIdx=(1,1), (8,8)); var Ab: [MatVecSpace] real; foo(Ab[.., n+1..n+1]); diff --git a/test/distributions/bradc/blkCyc/loopBlkCyc.chpl b/test/distributions/bradc/blkCyc/loopBlkCyc.chpl index 01845172baa4..d4d88efe46b3 100644 --- a/test/distributions/bradc/blkCyc/loopBlkCyc.chpl +++ b/test/distributions/bradc/blkCyc/loopBlkCyc.chpl @@ -4,7 +4,7 @@ config const n = 25; enum XO {O, X}; -var MyBlkCyc = new dmap(new BlockCyclic(startIdx=(1,), blocksize=(4,))); +var MyBlkCyc = new blockCycDist(startIdx=(1,), blocksize=(4,)); var D: domain(1) dmapped MyBlkCyc = {1..n}; diff --git a/test/distributions/bradc/blkCyc/sliceBlkCyc.chpl b/test/distributions/bradc/blkCyc/sliceBlkCyc.chpl index 94c2448ee822..a68d983a80df 100644 --- a/test/distributions/bradc/blkCyc/sliceBlkCyc.chpl +++ b/test/distributions/bradc/blkCyc/sliceBlkCyc.chpl @@ -4,7 +4,7 @@ config const n = 25; enum XO {O, X}; -var MyBlkCyc = new dmap(new BlockCyclic(startIdx=(1,), blocksize=(4,))); +var MyBlkCyc = new blockCycDist(startIdx=(1,), blocksize=(4,)); var D: domain(1) dmapped MyBlkCyc = {1..n}; var A: [D] XO; diff --git a/test/distributions/bradc/blkCyc/weirdcase.chpl b/test/distributions/bradc/blkCyc/weirdcase.chpl index c5eba2dd2a91..db502696a389 100644 --- a/test/distributions/bradc/blkCyc/weirdcase.chpl +++ b/test/distributions/bradc/blkCyc/weirdcase.chpl @@ -2,7 +2,7 @@ use BlockCycDist; var n = 100; -const BlkCycDist = new dmap(new BlockCyclic(startIdx=(1,1), blocksize=(5,3))); +const BlkCycDist = new blockCycDist(startIdx=(1,1), blocksize=(5,3)); var D: domain(2) dmapped BlkCycDist = {1..100, 1..100}; diff --git a/test/distributions/bradc/distEquality.chpl b/test/distributions/bradc/distEquality.chpl index e966288e30fe..fa1dea45274d 100644 --- a/test/distributions/bradc/distEquality.chpl +++ b/test/distributions/bradc/distEquality.chpl @@ -53,13 +53,13 @@ writeln(); -const BC1 = Space dmapped BlockCyclic(startIdx=Space.low, +const BC1 = Space dmapped blockCycDist(startIdx=Space.low, blocksize=(2, 3)); -const BC2 = Space dmapped BlockCyclic(startIdx=(-1,-1), +const BC2 = Space dmapped blockCycDist(startIdx=(-1,-1), blocksize=(2,3)); -const BC3 = Space dmapped BlockCyclic(startIdx=Space.low, +const BC3 = Space dmapped blockCycDist(startIdx=Space.low, blocksize=(3,2)); -const BC4 = Space dmapped BlockCyclic(startIdx=Space.low, +const BC4 = Space dmapped blockCycDist(startIdx=Space.low, blocksize=(2,3), targetLocales=OneLocOnly); @@ -79,7 +79,7 @@ writeln(BC3.distribution == BC4.distribution); writeln(BC4.distribution == BC4.distribution); -writeln(BC1.distribution == (Space dmapped BlockCyclic(startIdx=Space.low, +writeln(BC1.distribution == (Space dmapped blockCycDist(startIdx=Space.low, blocksize=(2,3))).distribution); writeln(); diff --git a/test/distributions/bradc/passDistDomsToFns.chpl b/test/distributions/bradc/passDistDomsToFns.chpl index 2b98c7729f11..a359f348dde1 100644 --- a/test/distributions/bradc/passDistDomsToFns.chpl +++ b/test/distributions/bradc/passDistDomsToFns.chpl @@ -18,7 +18,7 @@ proc fooC(X:[CyclicSpace] int) { } -const BlkCycSpace = Space dmapped BlockCyclic(startIdx=Space.low, +const BlkCycSpace = Space dmapped blockCycDist(startIdx=Space.low, blocksize=(2, 3)); var BCA: [BlkCycSpace] int; fooBC(BCA); diff --git a/test/distributions/engin/blockcyclic.chpl b/test/distributions/engin/blockcyclic.chpl index d2c917f42783..9d2a58c33370 100644 --- a/test/distributions/engin/blockcyclic.chpl +++ b/test/distributions/engin/blockcyclic.chpl @@ -4,7 +4,7 @@ use BlockCycDist; config const N = 4; const space = {0..#N, 0..#N, 0..#N}; -const ParentDom = space dmapped BlockCyclic(space.low, blocksize=(1,2,3)); +const ParentDom = space dmapped blockCycDist(space.low, blocksize=(1,2,3)); // const ParentDom = space dmapped blockDist(space); var arr: [ParentDom] int; diff --git a/test/distributions/robust/arithmetic/driver.chpl b/test/distributions/robust/arithmetic/driver.chpl index 61c2c7a220b3..c66879a7d5c2 100644 --- a/test/distributions/robust/arithmetic/driver.chpl +++ b/test/distributions/robust/arithmetic/driver.chpl @@ -52,11 +52,11 @@ proc setupDistributions(param DT : DistType) { } if DT == DistType.blockcyclic { return ( - new dmap(new BlockCyclic(startIdx=(0,), blocksize=(3,))), - new dmap(new BlockCyclic(startIdx=(0,0), blocksize=(3,3))), - new dmap(new BlockCyclic(startIdx=(0,0,0), blocksize=(3,3,3))), - new dmap(new BlockCyclic(startIdx=(0,0,0,0), blocksize=(3,3,3,3))), - new dmap(new BlockCyclic(startIdx=(0:int(32),0:int(32)), blocksize=(2:int(32),3:int(32)))) + new blockCycDist(startIdx=(0,), blocksize=(3,)), + new blockCycDist(startIdx=(0,0), blocksize=(3,3)), + new blockCycDist(startIdx=(0,0,0), blocksize=(3,3,3)), + new blockCycDist(startIdx=(0,0,0,0), blocksize=(3,3,3,3)), + new blockCycDist(startIdx=(0:int(32),0:int(32)), blocksize=(2:int(32),3:int(32))) ); } if DT == DistType.replicated { @@ -70,11 +70,11 @@ proc setupDistributions(param DT : DistType) { } if DT == DistType.stencil { return ( - new dmap(new stencilDist(rank=1, boundingBox=Space1)), - new dmap(new stencilDist(rank=2, boundingBox=Space2)), - new dmap(new stencilDist(rank=3, boundingBox=Space3)), - new dmap(new stencilDist(rank=4, boundingBox=Space4)), - new dmap(new stencilDist(rank=2, idxType=int(32), boundingBox=Space2D32)) + new stencilDist(rank=1, boundingBox=Space1), + new stencilDist(rank=2, boundingBox=Space2), + new stencilDist(rank=3, boundingBox=Space3), + new stencilDist(rank=4, boundingBox=Space4), + new stencilDist(rank=2, idxType=int(32), boundingBox=Space2D32) ); } halt("unexpected 'distType': ", DT); diff --git a/test/distributions/robust/arithmetic/resizing/resizeFromOtherLocale.chpl b/test/distributions/robust/arithmetic/resizing/resizeFromOtherLocale.chpl index cb4e1c0d091a..032812f9fbfc 100644 --- a/test/distributions/robust/arithmetic/resizing/resizeFromOtherLocale.chpl +++ b/test/distributions/robust/arithmetic/resizing/resizeFromOtherLocale.chpl @@ -38,7 +38,7 @@ proc buildSpace(Dom) { return Dom dmapped stencilDist(boundingBox={1..3}); } else if distType == DistType.blockcyclic { - return Dom dmapped BlockCyclic(startIdx=1, blocksize=2); + return Dom dmapped blockCycDist(startIdx=1, blocksize=2); } else { compilerError("Compiling with unknown DistType."); diff --git a/test/distributions/vass/blkcyc1d-1.chpl b/test/distributions/vass/blkcyc1d-1.chpl index 69413d99528d..491220e4e2d0 100644 --- a/test/distributions/vass/blkcyc1d-1.chpl +++ b/test/distributions/vass/blkcyc1d-1.chpl @@ -1,7 +1,7 @@ use BlockCycDist; -var d1: domain(1) dmapped BlockCyclic(startIdx=1, blocksize=5) = {1..5}; -var d2: domain(1) dmapped BlockCyclic(startIdx=(2,), blocksize=(6,)) = {2..7}; +var d1: domain(1) dmapped blockCycDist(startIdx=1, blocksize=5) = {1..5}; +var d2: domain(1) dmapped blockCycDist(startIdx=(2,), blocksize=(6,)) = {2..7}; writeln(d1); writeln(d2); diff --git a/test/io/ferguson/json-distributed-arrays.chpl b/test/io/ferguson/json-distributed-arrays.chpl index 3e9886a3dcde..4359e6dad354 100644 --- a/test/io/ferguson/json-distributed-arrays.chpl +++ b/test/io/ferguson/json-distributed-arrays.chpl @@ -65,7 +65,7 @@ var expectfile = openMemFile(); { writeln("Testing block cyclic array"); const Space = {1..5}; - var D = Space dmapped BlockCyclic(startIdx=Space.low,blocksize=2); + var D = Space dmapped blockCycDist(startIdx=Space.low,blocksize=2); var A:[D] int; A = 1..5; diff --git a/test/library/draft/DistributedList/DistributedList.chpl b/test/library/draft/DistributedList/DistributedList.chpl index 1032872f28ca..6dae7e1b35ab 100644 --- a/test/library/draft/DistributedList/DistributedList.chpl +++ b/test/library/draft/DistributedList/DistributedList.chpl @@ -496,7 +496,7 @@ module DistributedList { proc ref toArray(): [] eltType { this.lockAll(); const dom = {0..