From 430ad67306bffabc65f9fe043c118964b451d373 Mon Sep 17 00:00:00 2001 From: Vassily Litvinov Date: Wed, 19 Jul 2023 16:29:50 -0700 Subject: [PATCH 1/8] Range+domain deprecations: * deprecate range.boundsCheck() w/o replacement https://github.com/chapel-lang/chapel/issues/17125#issuecomment-1086304215 * deprecate domain.dist, instead use domain.distribution https://github.com/Cray/chapel-private/issues/4886#issuecomment-1569193824 * deprecate assignment between unbounded ranges for idxTypes such that assignment between bounded ranges would be disallowed https://github.com/chapel-lang/chapel/issues/22559 Signed-off-by: Vassily Litvinov --- modules/internal/ChapelDomain.chpl | 5 +++++ modules/internal/ChapelRange.chpl | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/modules/internal/ChapelDomain.chpl b/modules/internal/ChapelDomain.chpl index e64c04a4e4ba..479dbc2e5dcf 100644 --- a/modules/internal/ChapelDomain.chpl +++ b/modules/internal/ChapelDomain.chpl @@ -1160,8 +1160,13 @@ module ChapelDomain { /* Return the domain map that implements this domain */ pragma "return not owned" + @deprecated("domain.dist is deprecated, please use domain.distribution instead") proc dist do return _getDistribution(_value.dist); + /* Return the domain map that implements this domain */ + pragma "return not owned" + proc distribution do return _getDistribution(_value.dist); + /* Return the number of dimensions in this domain */ proc rank param { if this.isRectangular() || this.isSparse() then diff --git a/modules/internal/ChapelRange.chpl b/modules/internal/ChapelRange.chpl index 1efc9ccdeedf..0cfa1f164d13 100644 --- a/modules/internal/ChapelRange.chpl +++ b/modules/internal/ChapelRange.chpl @@ -332,6 +332,11 @@ module ChapelRange { compilerError("initializing a range with strideKind.", strides:string, " from a range with strideKind.", s:string); + if isDeprecatedUnboundedAssignment(idxType, other.idxType, bounds) then + compilerWarning("initializing an unbounded range with idxType ", + idxType:string, " from an unbounded range with idxType ", + other.idxType:string, " is deprecated"); + param isEnumBool = isFiniteIdxType(idxType); type bt = other.chpl_integralIdxType; const low = if isEnumBool && !other.hasLowBound() @@ -991,6 +996,14 @@ module ChapelRange { return canResolve("=", toVar, fromVar); } + private proc isDeprecatedUnboundedAssignment(type to, type from, + param bounds) param { + // an assignment may be deprecated only between unbounded ranges + if bounds != boundKind.neither then return false; + // assignment is deprecated if it would be illegal between bounded ranges + return !assignIdxIsLegal(to, from, boundKind.both); + } + private proc verifyAppropriateStide(param strides, stride) { if strides.isPositive() then assert(stride > 0); if strides.isNegative() then assert(stride < 0); @@ -1700,6 +1713,7 @@ private inline proc rangeCastHelper(r, type t) throws { ``false`` otherwise. Returns ``false`` if either range is ambiguously aligned. */ + @deprecated("range.boundsCheck() is deprecated, consider using range.contains() instead") inline proc range.boundsCheck(other: range(?e,?b,?s)) where b == boundKind.neither { @@ -1714,6 +1728,7 @@ private inline proc rangeCastHelper(r, type t) throws { } @chpldoc.nodoc + @deprecated("range.boundsCheck() is deprecated, consider using range.contains() instead") inline proc range.boundsCheck(other: range(?e,?b,?s)) { if ! this.isAligned() || ! other.isAligned() @@ -1729,6 +1744,7 @@ private inline proc rangeCastHelper(r, type t) throws { } /* Returns ``true`` if ``other`` is contained in this range and ``false`` otherwise. */ + @deprecated("range.boundsCheck() is deprecated, please use range.contains() instead") inline proc range.boundsCheck(other: idxType) do return contains(other); @@ -2052,6 +2068,12 @@ private inline proc rangeCastHelper(r, type t) throws { compilerError("assigning to a range with strideKind.", r1.strides:string, " from a range with strideKind.", r2.strides:string, " without an explicit cast"); + + if isDeprecatedUnboundedAssignment(r1.idxType, r2.idxType, r2.bounds) then + compilerWarning("assignment to an unbounded range with idxType ", + r1.idxType:string, " from an unbounded range with idxType ", + r2.idxType:string, " is deprecated"); + r1._low = r2._low: r1.chpl_integralIdxType; r1._high = r2._high: r1.chpl_integralIdxType; From 3b36cef5837c4ef8f6da7ea3ff1204bf965ab70f Mon Sep 17 00:00:00 2001 From: Vassily Litvinov Date: Wed, 19 Jul 2023 18:25:42 -0700 Subject: [PATCH 2/8] Internal uses of boundsCheck -> chpl_boundsCheck Signed-off-by: Vassily Litvinov --- modules/internal/BytesStringCommon.chpl | 8 ++++---- modules/internal/ChapelArray.chpl | 8 ++++---- modules/internal/ChapelRange.chpl | 8 ++++++++ 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/modules/internal/BytesStringCommon.chpl b/modules/internal/BytesStringCommon.chpl index e3470680d628..fa6c257df24b 100644 --- a/modules/internal/BytesStringCommon.chpl +++ b/modules/internal/BytesStringCommon.chpl @@ -375,7 +375,7 @@ module BytesStringCommon { // byteIndex const intR = r:range(int, r.bounds, r.strides); if boundsChecking { - if !x.byteIndices.boundsCheck(intR) { + if !x.byteIndices.chpl_boundsCheck(intR) { halt("range ", r, " out of bounds for " + t:string + " with length ", x.numBytes); } @@ -394,7 +394,7 @@ module BytesStringCommon { // if the low bound of the range is within the byteIndices of the // string, it must be the initial byte of a codepoint if r.hasLowBound() && - x.byteIndices.boundsCheck(r.lowBound:int) && + x.byteIndices.contains(r.lowBound:int) && !isInitialByte(x.byte[r.lowBound:int]) { throw new CodepointSplitError( "Byte-based string slice is not aligned to codepoint boundaries. " + @@ -403,7 +403,7 @@ module BytesStringCommon { // if the "high bound of the range plus one" is within the byteIndices // of the string, that index must be the initial byte of a codepoint if r.hasHighBound() && - x.byteIndices.boundsCheck(r.highBound:int+1) && + x.byteIndices.contains(r.highBound:int+1) && !isInitialByte(x.byte[r.highBound:int+1]) { throw new CodepointSplitError( "Byte-based string slice is not aligned to codepoint boundaries. " + @@ -431,7 +431,7 @@ module BytesStringCommon { // codepointIdx const intR = r:range(int, r.bounds, r.strides); if boundsChecking { - if !x.indices.boundsCheck(intR) { + if !x.indices.chpl_boundsCheck(intR) { halt("range ", r, " out of bounds for string with length ", x.size); } } diff --git a/modules/internal/ChapelArray.chpl b/modules/internal/ChapelArray.chpl index 033b8aa6152b..ac42b25fbacf 100644 --- a/modules/internal/ChapelArray.chpl +++ b/modules/internal/ChapelArray.chpl @@ -1021,7 +1021,7 @@ module ChapelArray { } var dimstr = ""; for param i in 0..rank-1 { - if !value.dom.dsiDim(i).boundsCheck(indices(i)) { + if !value.dom.dsiDim(i).contains(indices(i)) { if dimstr == "" { dimstr = "out of bounds in dimension " + i:string + " because index " + indices(i):string + @@ -1061,7 +1061,7 @@ module ChapelArray { if this.isRectangular() { var ok = true; for param i in 0..rank-1 { - ok &&= value.dom.dsiDim(i).boundsCheck(ranges(i)); + ok &&= value.dom.dsiDim(i).chpl_boundsCheck(ranges(i)); } if ok == false { if rank == 1 { @@ -1081,7 +1081,7 @@ module ChapelArray { } var dimstr = ""; for param i in 0..rank-1 { - if !value.dom.dsiDim(i).boundsCheck(ranges(i)) { + if !value.dom.dsiDim(i).chpl_boundsCheck(ranges(i)) { if dimstr == "" { dimstr = "out of bounds in dimension " + i:string + " because slice index " + ranges(i):string + @@ -1394,7 +1394,7 @@ module ChapelArray { @chpldoc.nodoc proc checkRankChange(args) { for param i in 0..args.size-1 do - if !_value.dom.dsiDim(i).boundsCheck(args(i)) then + if !_value.dom.dsiDim(i).chpl_boundsCheck(args(i)) then halt("array slice out of bounds in dimension ", i, ": ", args(i)); } diff --git a/modules/internal/ChapelRange.chpl b/modules/internal/ChapelRange.chpl index 0cfa1f164d13..bd39a642fc53 100644 --- a/modules/internal/ChapelRange.chpl +++ b/modules/internal/ChapelRange.chpl @@ -1730,6 +1730,9 @@ private inline proc rangeCastHelper(r, type t) throws { @chpldoc.nodoc @deprecated("range.boundsCheck() is deprecated, consider using range.contains() instead") inline proc range.boundsCheck(other: range(?e,?b,?s)) + do return this.chpl_boundsCheck(other); + + inline proc range.chpl_boundsCheck(other: range(?e,?b,?s)) { if ! this.isAligned() || ! other.isAligned() then return false; @@ -1748,6 +1751,11 @@ private inline proc rangeCastHelper(r, type t) throws { inline proc range.boundsCheck(other: idxType) do return contains(other); + // used in checkRankChange(args) where each args(i) can be + // either a range or an individual index + inline proc range.chpl_boundsCheck(other: idxType) do + return contains(other); + //################################################################################ //# Member functions From 197584b4b5d302c1f4f90463b90bac6601ebde59 Mon Sep 17 00:00:00 2001 From: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com> Date: Wed, 26 Jul 2023 18:32:12 -0500 Subject: [PATCH 3/8] Fix ChapelRange bugs - untested bug with isFiniteIndexType() -> isFiniteIdxType(idxType) - Added missing chpl_boundsCheck overload Signed-off-by: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com> --- modules/internal/ChapelRange.chpl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/internal/ChapelRange.chpl b/modules/internal/ChapelRange.chpl index bd39a642fc53..07379815b874 100644 --- a/modules/internal/ChapelRange.chpl +++ b/modules/internal/ChapelRange.chpl @@ -1081,7 +1081,7 @@ module ChapelRange { } inline proc range.chpl_alignedLowAsIntForIter { - if !hasUnitStride() && !hasLowBound() && isFiniteIndexType() { + if !hasUnitStride() && !hasLowBound() && isFiniteIdxType(idxType) { return helpAlignLow(chpl__idxToInt(lowBoundForIter(this)), _alignment, stride); } else { return alignedLowAsInt; @@ -1715,6 +1715,9 @@ private inline proc rangeCastHelper(r, type t) throws { */ @deprecated("range.boundsCheck() is deprecated, consider using range.contains() instead") inline proc range.boundsCheck(other: range(?e,?b,?s)) + do return this.chpl_boundsCheck(other); + + inline proc range.chpl_boundsCheck(other: range(?e,?b,?s)) where b == boundKind.neither { if chpl__singleValIdxType(idxType) { @@ -1727,11 +1730,6 @@ private inline proc rangeCastHelper(r, type t) throws { return true; } - @chpldoc.nodoc - @deprecated("range.boundsCheck() is deprecated, consider using range.contains() instead") - inline proc range.boundsCheck(other: range(?e,?b,?s)) - do return this.chpl_boundsCheck(other); - inline proc range.chpl_boundsCheck(other: range(?e,?b,?s)) { if ! this.isAligned() || ! other.isAligned() From 67b47a4bb3f8bdfbe81d90a90aaa8f34ae76238b Mon Sep 17 00:00:00 2001 From: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com> Date: Wed, 26 Jul 2023 18:43:50 -0500 Subject: [PATCH 4/8] .dist -> .distribution changes done by deprecation script Signed-off-by: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com> --- modules/dists/BlockDist.chpl | 2 +- modules/dists/CyclicDist.chpl | 2 +- modules/dists/StencilDist.chpl | 2 +- modules/internal/ChapelArray.chpl | 20 +++--- modules/internal/ChapelAutoLocalAccess.chpl | 2 +- modules/packages/LinearAlgebra.chpl | 12 ++-- modules/packages/Sort.chpl | 4 +- modules/standard/CTypes.chpl | 8 +-- .../rankChange/rankChangeEqualDMaps.chpl | 2 +- test/chplvis/benchmarks-hpcc/fft-vdb.chpl | 8 +-- .../delete-free/lifetimes/arr-dom.chpl | 2 +- test/deprecated/CyclicStridable.chpl | 2 +- .../bharshbarg/forwardDomDist.chpl | 4 +- .../bharshbarg/stridedBoundingBox.chpl | 2 +- test/distributions/bharshbarg/subQuery.chpl | 2 +- test/distributions/block/remoteOwnership.chpl | 2 +- test/distributions/bradc/distEquality.chpl | 66 +++++++++---------- test/distributions/bradc/layoutEquality.chpl | 10 +-- test/distributions/bradc/layoutEquality2.chpl | 40 +++++------ .../bradc/where/dispatchBasedOnDist.chpl | 8 +-- .../distributions/cyclic/remoteOwnership.chpl | 2 +- test/distributions/ferguson/islayout.chpl | 12 ++-- .../test_array_of_distributed_array1.chpl | 6 +- .../arithmetic/basics/test_reshape.chpl | 6 +- .../slicing/test_domain_slicing1.chpl | 2 +- .../trivial/test_domain_plus_minus_index.chpl | 2 +- .../arithmetic/trivial/test_dot_dist.chpl | 10 +-- .../arithmetic/trivial/test_dot_domain.chpl | 10 +-- .../arithmetic/trivial/test_dot_expand.chpl | 2 +- .../stencil/remoteOwnership.chpl | 2 +- test/distributions/sungeun/equality.chpl | 4 +- .../DistributedList/DistributedList.chpl | 6 +- .../library/standard/MemMove/moveInitBad.chpl | 2 +- .../taskPar/sungeun/barrier/basic.chpl | 2 +- .../taskPar/sungeun/barrier/commDiags.chpl | 4 +- .../taskPar/sungeun/barrier/reuse.chpl | 2 +- .../taskPar/sungeun/barrier/split-phase.chpl | 2 +- test/reductions/partial/CSimpl.chpl | 2 +- test/reductions/partial/DRimpl.chpl | 2 +- .../release/examples/benchmarks/hpcc/fft.chpl | 8 +-- test/studies/bale/toposort/toposort.chpl | 4 +- ...cholesky_symmetric_index_ranges_block.chpl | 2 +- ...l_cholesky_symmetric_index_ranges_alt.chpl | 2 +- .../elemental_cholesky_symmetric_strided.chpl | 2 +- ...tal_cholesky_unsymmetric_index_ranges.chpl | 2 +- test/studies/hpcc/FFT/diten/fft.chpl | 4 +- .../PTRANS/jglewis/ptrans_2011-blkcyc.chpl | 2 +- .../hpcc/PTRANS/jglewis/ptrans_2011.chpl | 2 +- test/studies/hpcc/RA/diten/doupdates.chpl | 2 +- test/studies/hpcc/RA/diten/ra.chpl | 4 +- .../main/SSCA2_Modules/SSCA2_kernels.chpl | 8 +-- 51 files changed, 161 insertions(+), 161 deletions(-) diff --git a/modules/dists/BlockDist.chpl b/modules/dists/BlockDist.chpl index 7fb4728022c4..23848ee1f914 100644 --- a/modules/dists/BlockDist.chpl +++ b/modules/dists/BlockDist.chpl @@ -1208,7 +1208,7 @@ proc BlockArr.dsiDynamicFastFollowCheck(lead: []) do proc BlockArr.dsiDynamicFastFollowCheck(lead: domain) { // TODO: Should this return true for domains with the same shape? - return lead.dist.dsiEqualDMaps(this.dom.dist) && lead._value.whole == this.dom.whole; + return lead.distribution.dsiEqualDMaps(this.dom.distribution) && lead._value.whole == this.dom.whole; } iter BlockArr.these(param tag: iterKind, followThis, param fast: bool = false) ref where tag == iterKind.follower { diff --git a/modules/dists/CyclicDist.chpl b/modules/dists/CyclicDist.chpl index f7cc4db6daed..be514b7f6cc4 100644 --- a/modules/dists/CyclicDist.chpl +++ b/modules/dists/CyclicDist.chpl @@ -963,7 +963,7 @@ proc CyclicArr.dsiDynamicFastFollowCheck(lead: []) do return this.dsiDynamicFastFollowCheck(lead.domain); proc CyclicArr.dsiDynamicFastFollowCheck(lead: domain) { - return lead.dist.dsiEqualDMaps(this.dom.dist) && lead._value.whole == this.dom.whole; + return lead.distribution.dsiEqualDMaps(this.dom.distribution) && lead._value.whole == this.dom.whole; } iter CyclicArr.these(param tag: iterKind, followThis, param fast: bool = false) ref where tag == iterKind.follower { diff --git a/modules/dists/StencilDist.chpl b/modules/dists/StencilDist.chpl index adb4b297b29a..0573de04231e 100644 --- a/modules/dists/StencilDist.chpl +++ b/modules/dists/StencilDist.chpl @@ -1295,7 +1295,7 @@ proc StencilArr.dsiDynamicFastFollowCheck(lead: []) do return this.dsiDynamicFastFollowCheck(lead.domain); proc StencilArr.dsiDynamicFastFollowCheck(lead: domain) { - return lead.dist.dsiEqualDMaps(this.dom.dist) && lead._value.whole == this.dom.whole; + return lead.distribution.dsiEqualDMaps(this.dom.distribution) && lead._value.whole == this.dom.whole; } iter StencilArr.these(param tag: iterKind, followThis, param fast: bool = false) ref where tag == iterKind.follower { diff --git a/modules/internal/ChapelArray.chpl b/modules/internal/ChapelArray.chpl index ac42b25fbacf..29e2fca9c8f8 100644 --- a/modules/internal/ChapelArray.chpl +++ b/modules/internal/ChapelArray.chpl @@ -1516,7 +1516,7 @@ module ChapelArray { // change this in the future when we have better syntax for // indicating a generic domain map).. // - if (formalDom.dist._value.type != unmanaged DefaultDist) { + if (formalDom.distribution._value.type != unmanaged DefaultDist) { // // First, at compile-time, check that the domain's types are // the same: @@ -1528,10 +1528,10 @@ module ChapelArray { // Then, at run-time, check that the domain map's values are // the same (do this only if the runtime checks argument is true). // - if (runtimeChecks && formalDom.dist != this.domain.dist) then + if (runtimeChecks && formalDom.distribution != this.domain.distribution) then halt("Domain map mismatch passing array argument:\n", - " Formal domain map is: ", formalDom.dist, "\n", - " Actual domain map is: ", this.domain.dist); + " Formal domain map is: ", formalDom.distribution, "\n", + " Actual domain map is: ", this.domain.distribution); } // @@ -1608,8 +1608,8 @@ module ChapelArray { pragma "no auto destroy" const updom = {(...newDims)}; - const redist = new unmanaged ArrayViewReindexDist(downDistPid = this.domain.dist._pid, - downDistInst=this.domain.dist._instance, + const redist = new unmanaged ArrayViewReindexDist(downDistPid = this.domain.distribution._pid, + downDistInst=this.domain.distribution._instance, updom = updom._value, downdomPid = dom.pid, downdomInst = dom); @@ -2453,7 +2453,7 @@ module ChapelArray { } if isSubtype(eltType, _domain) { const ref lhsDist = chpl__distributionFromDomainRuntimeType(eltType); - const ref rhsDist = elt.dist; + const ref rhsDist = elt.distribution; if lhsDist._instance != rhsDist._instance { runtimeTypesDiffer = true; } @@ -3165,7 +3165,7 @@ module ChapelArray { proc chpl__initCopy(const ref rhs: domain, definedConst: bool) where rhs.isRectangular() { - var lhs = new _domain(rhs.dist, rhs.rank, rhs.idxType, rhs.strides, + var lhs = new _domain(rhs.distribution, rhs.rank, rhs.idxType, rhs.strides, rhs.dims(), definedConst=definedConst); return lhs; } @@ -3174,7 +3174,7 @@ module ChapelArray { proc chpl__initCopy(const ref rhs: domain, definedConst: bool) where rhs.isAssociative() { - var lhs = new _domain(rhs.dist, rhs.idxType, rhs.parSafe, + var lhs = new _domain(rhs.distribution, rhs.idxType, rhs.parSafe, definedConst=definedConst); // No need to lock this domain since it's not exposed anywhere yet. // No need to handle arrays over this domain either for the same reason. @@ -3186,7 +3186,7 @@ module ChapelArray { proc chpl__initCopy(const ref rhs: domain, definedConst: bool) where rhs.isSparse() { - var lhs = new _domain(rhs.dist, rhs.parentDom, definedConst=definedConst); + var lhs = new _domain(rhs.distribution, rhs.parentDom, definedConst=definedConst); // No need to lock this domain since it's not exposed anywhere yet. // No need to handle arrays over this domain either for the same reason. lhs._instance.dsiAssignDomain(rhs, lhsPrivate=true); diff --git a/modules/internal/ChapelAutoLocalAccess.chpl b/modules/internal/ChapelAutoLocalAccess.chpl index 726cd6976b4f..198729d04cd0 100644 --- a/modules/internal/ChapelAutoLocalAccess.chpl +++ b/modules/internal/ChapelAutoLocalAccess.chpl @@ -67,7 +67,7 @@ module ChapelAutoLocalAccess { return true; // or at least if they were distributed the same way - if accessBase.domain.dist == loopDomain.dist then return true; + if accessBase.domain.distribution == loopDomain.distribution then return true; // if we are iterating over a rectangular that's: // 1. not remote diff --git a/modules/packages/LinearAlgebra.chpl b/modules/packages/LinearAlgebra.chpl index 9615fac6efd0..beba19f7ee8f 100644 --- a/modules/packages/LinearAlgebra.chpl +++ b/modules/packages/LinearAlgebra.chpl @@ -961,10 +961,10 @@ proc isDistributed(a) param { else if a.domain.isSparse() { // TODO: is there a better way to check for distributed sparse domains? use BlockDist; - return isSubtype(a.domain.dist.type, Block); + return isSubtype(a.domain.distribution.type, Block); } else { - return !isSubtype(a.domain.dist.type, DefaultDist); + return !isSubtype(a.domain.distribution.type, DefaultDist); } } @@ -2607,7 +2607,7 @@ proc isLocalArr(A: [?D]) param : bool { @chpldoc.nodoc /* Returns ``true`` if the domain is dense N-dimensional non-distributed domain. */ proc isLocalDom(D: domain) param : bool { - return D.dist.type == defaultDist.type; + return D.distribution.type == defaultDist.type; } // TODO: Add this to public interface eventually @@ -2631,7 +2631,7 @@ proc type _array.rank param { @chpldoc.nodoc /* Returns ``true`` if the domain is ``DefaultSparse`` */ private proc isDefaultSparseDom(D: domain) param { - return isSubtype(_to_borrowed(D.dist.type), DefaultDist) && D.isSparse(); + return isSubtype(_to_borrowed(D.distribution.type), DefaultDist) && D.isSparse(); } @chpldoc.nodoc @@ -3481,11 +3481,11 @@ module Sparse { @chpldoc.nodoc /* Returns ``true`` if the array is dmapped to ``CS`` layout. */ - proc isCSArr(A: []) param { return isCSType(A.domain.dist.type); } + proc isCSArr(A: []) param { return isCSType(A.domain.distribution.type); } @chpldoc.nodoc /* Returns ``true`` if the domain is dmapped to ``CS`` layout. */ - proc isCSDom(D: domain) param { return isCSType(D.dist.type); } + proc isCSDom(D: domain) param { return isCSType(D.distribution.type); } } // submodule LinearAlgebra.Sparse diff --git a/modules/packages/Sort.chpl b/modules/packages/Sort.chpl index 7142b95ce41d..dab1ac8d4954 100644 --- a/modules/packages/Sort.chpl +++ b/modules/packages/Sort.chpl @@ -3030,8 +3030,8 @@ module TwoArrayPartitioning { // Compute the regions on the same locale as the first, last // elements in the bin. - const firstLoc = A.domain.dist.idxToLocale(binStart); - const lastLoc = A.domain.dist.idxToLocale(binEnd); + const firstLoc = A.domain.distribution.idxToLocale(binStart); + const lastLoc = A.domain.distribution.idxToLocale(binEnd); const onFirstLoc = A.localSubdomain(firstLoc)[binStart..binEnd]; const onLastLoc = A.localSubdomain(lastLoc)[binStart..binEnd]; var theLocale = firstLoc; diff --git a/modules/standard/CTypes.chpl b/modules/standard/CTypes.chpl index a0482d793377..984ce6abc2a7 100644 --- a/modules/standard/CTypes.chpl +++ b/modules/standard/CTypes.chpl @@ -769,7 +769,7 @@ module CTypes { :returns: a pointer to the array's elements */ inline proc c_ptrTo(arr: []): c_ptr(arr.eltType) { - if (!arr.isRectangular() || !arr.domain.dist._value.dsiIsLayout()) then + if (!arr.isRectangular() || !arr.domain.distribution._value.dsiIsLayout()) then compilerError("Only single-locale rectangular arrays support c_ptrTo() at present"); if (arr._value.locale != here) then @@ -790,7 +790,7 @@ module CTypes { disallows direct modification of the pointee. */ inline proc c_ptrToConst(const arr: []): c_ptrConst(arr.eltType) { - if (!arr.isRectangular() || !arr.domain.dist._value.dsiIsLayout()) then + if (!arr.isRectangular() || !arr.domain.distribution._value.dsiIsLayout()) then compilerError("Only single-locale rectangular arrays support c_ptrToConst() at present"); if (arr._value.locale != here) then @@ -1018,7 +1018,7 @@ module CTypes { of the array. The returned pointer will be invalid if the array is freed. */ inline proc c_addrOf(arr: []) { - if (!arr.isRectangular() || !arr.domain.dist._value.dsiIsLayout()) then + if (!arr.isRectangular() || !arr.domain.distribution._value.dsiIsLayout()) then compilerError("Only single-locale rectangular arrays support c_addrOf() at present"); if (arr._value.locale != here) then @@ -1035,7 +1035,7 @@ module CTypes { disallows direct modification of the pointee. */ inline proc c_addrOfConst(arr: []) { - if (!arr.isRectangular() || !arr.domain.dist._value.dsiIsLayout()) then + if (!arr.isRectangular() || !arr.domain.distribution._value.dsiIsLayout()) then compilerError("Only single-locale rectangular arrays support c_addrOfConst() at present"); if (arr._value.locale != here) then diff --git a/test/arrays/rankChange/rankChangeEqualDMaps.chpl b/test/arrays/rankChange/rankChangeEqualDMaps.chpl index 8131af74caaf..5d703981a905 100644 --- a/test/arrays/rankChange/rankChangeEqualDMaps.chpl +++ b/test/arrays/rankChange/rankChangeEqualDMaps.chpl @@ -1,7 +1,7 @@ use BlockDist; proc test(a, b) { - writeln(a.domain.dist == b.domain.dist); + writeln(a.domain.distribution == b.domain.distribution); } var space = {0..9, 0..9}; diff --git a/test/chplvis/benchmarks-hpcc/fft-vdb.chpl b/test/chplvis/benchmarks-hpcc/fft-vdb.chpl index 8c07ecee6104..a182974ca56c 100644 --- a/test/chplvis/benchmarks-hpcc/fft-vdb.chpl +++ b/test/chplvis/benchmarks-hpcc/fft-vdb.chpl @@ -158,7 +158,7 @@ proc dfft(A: [?ADom], W, cyclicPhase) { // lo.. by str #num == lo, lo+str, lo+2*str, ... lo+(num-1)*str // forall lo in bankStart..#str do - on ADom.dist.idxToLocale(lo) do + on ADom.distribution.idxToLocale(lo) do local do butterfly(wk1, wk2, wk3, A.localSlice(lo..by str #radix)); // @@ -173,7 +173,7 @@ proc dfft(A: [?ADom], W, cyclicPhase) { // loop in parallel over the high bank, computing butterflies // forall lo in bankStart+span..#str do - on ADom.dist.idxToLocale(lo) do + on ADom.distribution.idxToLocale(lo) do local do butterfly(wk1, wk2, wk3, A.localSlice(lo.. by str #radix)); } } @@ -189,7 +189,7 @@ proc dfft(A: [?ADom], W, cyclicPhase) { // if (str*radix == numElements) { forall lo in 0..#str do - on ADom.dist.idxToLocale(lo) do + on ADom.distribution.idxToLocale(lo) do local do butterfly(1.0, 1.0, 1.0, A.localSlice(lo.. by str # radix)); } // @@ -197,7 +197,7 @@ proc dfft(A: [?ADom], W, cyclicPhase) { // else forall lo in 0..#str do - on ADom.dist.idxToLocale(lo) do + on ADom.distribution.idxToLocale(lo) do local { const a = A(lo), b = A(lo+str); diff --git a/test/classes/delete-free/lifetimes/arr-dom.chpl b/test/classes/delete-free/lifetimes/arr-dom.chpl index d1a6038a62b4..abdf572b2c25 100644 --- a/test/classes/delete-free/lifetimes/arr-dom.chpl +++ b/test/classes/delete-free/lifetimes/arr-dom.chpl @@ -11,7 +11,7 @@ proc badReturnBorrowedArrayDom() { proc badReturnBorrowedArrayDomDist() { var A:[1..10] int; - return A.domain.dist; + return A.domain.distribution; // A and its elements are destroyed here } diff --git a/test/deprecated/CyclicStridable.chpl b/test/deprecated/CyclicStridable.chpl index 6feddc06e7c3..4310b8c7db6b 100644 --- a/test/deprecated/CyclicStridable.chpl +++ b/test/deprecated/CyclicStridable.chpl @@ -962,7 +962,7 @@ proc CyclicArr.dsiDynamicFastFollowCheck(lead: []) do return this.dsiDynamicFastFollowCheck(lead.domain); proc CyclicArr.dsiDynamicFastFollowCheck(lead: domain) { - return lead.dist.dsiEqualDMaps(this.dom.dist) && lead._value.whole == this.dom.whole; + return lead.distribution.dsiEqualDMaps(this.dom.distribution) && lead._value.whole == this.dom.whole; } iter CyclicArr.these(param tag: iterKind, followThis, param fast: bool = false) ref where tag == iterKind.follower { diff --git a/test/distributions/bharshbarg/forwardDomDist.chpl b/test/distributions/bharshbarg/forwardDomDist.chpl index ccf673752bbd..853682a8fffb 100644 --- a/test/distributions/bharshbarg/forwardDomDist.chpl +++ b/test/distributions/bharshbarg/forwardDomDist.chpl @@ -11,8 +11,8 @@ proc DefaultAssociativeDom.printTableSize() { proc main() { var DR = {1..20}; var BD = DR dmapped Block(DR); - writeln(BD.dist.type:string, ".printBB()"); - BD.dist.printBB(); + writeln(BD.distribution.type:string, ".printBB()"); + BD.distribution.printBB(); writeln(); var DA = {1, 3, 5, 6, 7, 42}; diff --git a/test/distributions/bharshbarg/stridedBoundingBox.chpl b/test/distributions/bharshbarg/stridedBoundingBox.chpl index c95c6b617472..17ac6a837088 100644 --- a/test/distributions/bharshbarg/stridedBoundingBox.chpl +++ b/test/distributions/bharshbarg/stridedBoundingBox.chpl @@ -3,4 +3,4 @@ use BlockDist; var Dom = {1..20, 1..20} by 2; var Space = Dom dmapped Block(Dom); writeln(Space); -writeln("boundingBox = ", Space.dist._value.boundingBox); +writeln("boundingBox = ", Space.distribution._value.boundingBox); diff --git a/test/distributions/bharshbarg/subQuery.chpl b/test/distributions/bharshbarg/subQuery.chpl index ae67a984a4c0..4ec2148ca634 100644 --- a/test/distributions/bharshbarg/subQuery.chpl +++ b/test/distributions/bharshbarg/subQuery.chpl @@ -26,7 +26,7 @@ proc test(Dist) { forall d in Data do d = here.id; // check targetLocales - for (distloc, domloc, arrloc) in zip(Dist.dist.targetLocales(), + for (distloc, domloc, arrloc) in zip(Dist.distribution.targetLocales(), Dist.targetLocales(), Data.targetLocales()) { assert( distloc == domloc ); diff --git a/test/distributions/block/remoteOwnership.chpl b/test/distributions/block/remoteOwnership.chpl index d19009cdb5eb..28805e8a4b70 100644 --- a/test/distributions/block/remoteOwnership.chpl +++ b/test/distributions/block/remoteOwnership.chpl @@ -42,7 +42,7 @@ if (numLocales == 4) { proc testit(D, A) { writeln("Testing domain D: ", D); - writeln("Mapped to locales:\n", D.dist.targetLocales()); + writeln("Mapped to locales:\n", D.distribution.targetLocales()); testit(D); writeln(); diff --git a/test/distributions/bradc/distEquality.chpl b/test/distributions/bradc/distEquality.chpl index 6b19f52f982d..e2f802634406 100644 --- a/test/distributions/bradc/distEquality.chpl +++ b/test/distributions/bradc/distEquality.chpl @@ -11,16 +11,16 @@ const B3 = Space dmapped Block(boundingBox=Space, targetLocales=OneLocOnly); writeln("Block comparisons:"); -writeln(B1.dist == B1.dist); -writeln(B1.dist == B2.dist); -writeln(B1.dist == B3.dist); +writeln(B1.distribution == B1.distribution); +writeln(B1.distribution == B2.distribution); +writeln(B1.distribution == B3.distribution); -writeln(B2.dist == B2.dist); -writeln(B2.dist == B3.dist); +writeln(B2.distribution == B2.distribution); +writeln(B2.distribution == B3.distribution); -writeln(B3.dist == B3.dist); +writeln(B3.distribution == B3.distribution); -writeln(B1.dist == (Space dmapped Block(boundingBox=Space)).dist); +writeln(B1.distribution == (Space dmapped Block(boundingBox=Space)).distribution); writeln(); @@ -32,22 +32,22 @@ const C4 = Space dmapped Cyclic(startIdx=Space.low, targetLocales=OneLocOnly); writeln("Cyclic comparisons:"); -writeln(C1.dist == C1.dist); -writeln(C1.dist == C2.dist); // tricky, but equal on 2x2 locales since 3==1, mod 2 +writeln(C1.distribution == C1.distribution); +writeln(C1.distribution == C2.distribution); // tricky, but equal on 2x2 locales since 3==1, mod 2 -writeln(C1.dist == C3.dist); -writeln(C1.dist == C4.dist); +writeln(C1.distribution == C3.distribution); +writeln(C1.distribution == C4.distribution); -writeln(C2.dist == C2.dist); -writeln(C2.dist == C3.dist); -writeln(C2.dist == C4.dist); +writeln(C2.distribution == C2.distribution); +writeln(C2.distribution == C3.distribution); +writeln(C2.distribution == C4.distribution); -writeln(C3.dist == C3.dist); -writeln(C3.dist == C4.dist); +writeln(C3.distribution == C3.distribution); +writeln(C3.distribution == C4.distribution); -writeln(C4.dist == C4.dist); +writeln(C4.distribution == C4.distribution); -writeln(C1.dist == (Space dmapped Cyclic(startIdx=Space.low)).dist); +writeln(C1.distribution == (Space dmapped Cyclic(startIdx=Space.low)).distribution); writeln(); @@ -65,21 +65,21 @@ const BC4 = Space dmapped BlockCyclic(startIdx=Space.low, writeln("Block-Cyclic comparisons:"); -writeln(BC1.dist == BC1.dist); -writeln(BC1.dist == BC2.dist); -writeln(BC1.dist == BC3.dist); -writeln(BC1.dist == BC4.dist); +writeln(BC1.distribution == BC1.distribution); +writeln(BC1.distribution == BC2.distribution); +writeln(BC1.distribution == BC3.distribution); +writeln(BC1.distribution == BC4.distribution); -writeln(BC2.dist == BC2.dist); -writeln(BC2.dist == BC3.dist); -writeln(BC2.dist == BC4.dist); +writeln(BC2.distribution == BC2.distribution); +writeln(BC2.distribution == BC3.distribution); +writeln(BC2.distribution == BC4.distribution); -writeln(BC3.dist == BC3.dist); -writeln(BC3.dist == BC4.dist); +writeln(BC3.distribution == BC3.distribution); +writeln(BC3.distribution == BC4.distribution); -writeln(BC4.dist == BC4.dist); +writeln(BC4.distribution == BC4.distribution); -writeln(BC1.dist == (Space dmapped BlockCyclic(startIdx=Space.low, +writeln(BC1.distribution == (Space dmapped BlockCyclic(startIdx=Space.low, blocksize=(2,3))).dist); writeln(); @@ -92,9 +92,9 @@ const R2 = Space dmapped Replicated(targetLocales=OneLocOnly1D); writeln("Replicated comparisons:"); -writeln(R1.dist == R1.dist); -writeln(R1.dist == R2.dist); +writeln(R1.distribution == R1.distribution); +writeln(R1.distribution == R2.distribution); -writeln(R2.dist == R2.dist); +writeln(R2.distribution == R2.distribution); -writeln(R2.dist == (Space dmapped Replicated(targetLocales=OneLocOnly1D)).dist); \ No newline at end of file +writeln(R2.distribution == (Space dmapped Replicated(targetLocales=OneLocOnly1D)).distribution); diff --git a/test/distributions/bradc/layoutEquality.chpl b/test/distributions/bradc/layoutEquality.chpl index f13868c335e2..07e942700403 100644 --- a/test/distributions/bradc/layoutEquality.chpl +++ b/test/distributions/bradc/layoutEquality.chpl @@ -12,11 +12,11 @@ var DE2: domain(color); var DS1: sparse subdomain(D1); var DS2: sparse subdomain(D2); -writeln(D1.dist == D1.dist); -writeln(D1.dist == D2.dist); -writeln(D1.dist == DA1.dist); -writeln(D1.dist == DE1.dist); -writeln(D1.dist == DS1.dist); +writeln(D1.distribution == D1.distribution); +writeln(D1.distribution == D2.distribution); +writeln(D1.distribution == DA1.distribution); +writeln(D1.distribution == DE1.distribution); +writeln(D1.distribution == DS1.distribution); // TODO: Once this is a passing future, should // add more tests of different equalities down diff --git a/test/distributions/bradc/layoutEquality2.chpl b/test/distributions/bradc/layoutEquality2.chpl index aea1bfabbf2f..caca639c1a3b 100644 --- a/test/distributions/bradc/layoutEquality2.chpl +++ b/test/distributions/bradc/layoutEquality2.chpl @@ -9,39 +9,39 @@ var DS2: sparse subdomain(D2); var DS_CSR1: sparse subdomain(D1) dmapped CS(); var DS_CSR2: sparse subdomain(D2) dmapped CS(); -writeln(DS1.dist == DS1.dist); -writeln(DS1.dist == DS2.dist); -writeln(DS1.dist == DS_CSR1.dist); -writeln(DS1.dist == DS_CSR2.dist); +writeln(DS1.distribution == DS1.distribution); +writeln(DS1.distribution == DS2.distribution); +writeln(DS1.distribution == DS_CSR1.distribution); +writeln(DS1.distribution == DS_CSR2.distribution); writeln(); -writeln(DS2.dist == DS2.dist); -writeln(DS2.dist == DS_CSR1.dist); -writeln(DS2.dist == DS_CSR2.dist); +writeln(DS2.distribution == DS2.distribution); +writeln(DS2.distribution == DS_CSR1.distribution); +writeln(DS2.distribution == DS_CSR2.distribution); writeln(); -writeln(DS_CSR1.dist == DS_CSR1.dist); -writeln(DS_CSR1.dist == DS_CSR2.dist); +writeln(DS_CSR1.distribution == DS_CSR1.distribution); +writeln(DS_CSR1.distribution == DS_CSR2.distribution); writeln(); -writeln(DS_CSR2.dist == DS_CSR2.dist); +writeln(DS_CSR2.distribution == DS_CSR2.distribution); writeln(); -writeln(DS1.dist != DS1.dist); -writeln(DS1.dist != DS2.dist); -writeln(DS1.dist != DS_CSR1.dist); -writeln(DS1.dist != DS_CSR2.dist); +writeln(DS1.distribution != DS1.distribution); +writeln(DS1.distribution != DS2.distribution); +writeln(DS1.distribution != DS_CSR1.distribution); +writeln(DS1.distribution != DS_CSR2.distribution); writeln(); -writeln(DS2.dist != DS2.dist); -writeln(DS2.dist != DS_CSR1.dist); -writeln(DS2.dist != DS_CSR2.dist); +writeln(DS2.distribution != DS2.distribution); +writeln(DS2.distribution != DS_CSR1.distribution); +writeln(DS2.distribution != DS_CSR2.distribution); writeln(); -writeln(DS_CSR1.dist != DS_CSR1.dist); -writeln(DS_CSR1.dist != DS_CSR2.dist); +writeln(DS_CSR1.distribution != DS_CSR1.distribution); +writeln(DS_CSR1.distribution != DS_CSR2.distribution); writeln(); -writeln(DS_CSR2.dist != DS_CSR2.dist); +writeln(DS_CSR2.distribution != DS_CSR2.distribution); writeln(); diff --git a/test/distributions/bradc/where/dispatchBasedOnDist.chpl b/test/distributions/bradc/where/dispatchBasedOnDist.chpl index 64f30e7ea834..f3f704f3215f 100644 --- a/test/distributions/bradc/where/dispatchBasedOnDist.chpl +++ b/test/distributions/bradc/where/dispatchBasedOnDist.chpl @@ -6,11 +6,11 @@ var DCyc: domain(1) dmapped Cyclic(startIdx=1) = {1..10}; var ABlk: [DBlk] real; var ACyc: [DCyc] real; -proc domproc(D: domain) where isSubtype(D.dist.type, Block) { +proc domproc(D: domain) where isSubtype(D.distribution.type, Block) { writeln("In the domproc() for Block"); } -proc domproc(D: domain) where isSubtype(D.dist.type, Cyclic) { +proc domproc(D: domain) where isSubtype(D.distribution.type, Cyclic) { writeln("In the domproc() for Cyclic"); } @@ -18,12 +18,12 @@ proc arrproc(A: []) where isBlockArr(A) { writeln("In the arrproc() for Block"); } -proc arrproc(A: []) where isSubtype(A.domain.dist.type, Cyclic) { +proc arrproc(A: []) where isSubtype(A.domain.distribution.type, Cyclic) { writeln("In the arrproc() for Cyclic"); } proc isBlockArr(A) param { - return isSubtype(A.domain.dist.type, Block); + return isSubtype(A.domain.distribution.type, Block); } domproc(DBlk); diff --git a/test/distributions/cyclic/remoteOwnership.chpl b/test/distributions/cyclic/remoteOwnership.chpl index be27bb6e198e..fe4966eb35e0 100644 --- a/test/distributions/cyclic/remoteOwnership.chpl +++ b/test/distributions/cyclic/remoteOwnership.chpl @@ -42,7 +42,7 @@ if (numLocales == 4) { proc testit(D, A) { writeln("Testing domain D: ", D); - writeln("Mapped to locales:\n", D.dist.targetLocales()); + writeln("Mapped to locales:\n", D.distribution.targetLocales()); testit(D); writeln(); diff --git a/test/distributions/ferguson/islayout.chpl b/test/distributions/ferguson/islayout.chpl index 0615fb27f548..fb3d33d786a4 100644 --- a/test/distributions/ferguson/islayout.chpl +++ b/test/distributions/ferguson/islayout.chpl @@ -22,19 +22,19 @@ proc main() { var A:[1..3, 1..3] int; // check DR - assert(A.domain.dist.dsiIsLayout()); + assert(A.domain.distribution.dsiIsLayout()); // check slice - assert(A[1..3,1..2].domain.dist.dsiIsLayout()); + assert(A[1..3,1..2].domain.distribution.dsiIsLayout()); // check rank-change - assert(A[..,1].domain.dist.dsiIsLayout()); - assert(A[1..3,1].domain.dist.dsiIsLayout()); + assert(A[..,1].domain.distribution.dsiIsLayout()); + assert(A[1..3,1].domain.distribution.dsiIsLayout()); // check reindex - assert(A.reindex({0..2,0..2}).domain.dist.dsiIsLayout()); + assert(A.reindex({0..2,0..2}).domain.distribution.dsiIsLayout()); // check external array var ptr:c_ptr(int) = allocate(int, 1, clear=true); var B = makeArrayFromPtr(ptr, 1); - assert(B.domain.dist.dsiIsLayout()); + assert(B.domain.distribution.dsiIsLayout()); //make array from ptr creates an array that borrows the buffer. So, the //allocation needs to be cleaned up using the pointer. diff --git a/test/distributions/robust/arithmetic/basics/test_array_of_distributed_array1.chpl b/test/distributions/robust/arithmetic/basics/test_array_of_distributed_array1.chpl index 7b17d531c531..745cfc6663f0 100644 --- a/test/distributions/robust/arithmetic/basics/test_array_of_distributed_array1.chpl +++ b/test/distributions/robust/arithmetic/basics/test_array_of_distributed_array1.chpl @@ -9,6 +9,6 @@ for i in 1..3 do for i in 1..3 do writeln(AA1D(i)); -writeln(dist_eq(AA1D(1).domain.dist, Dist1D)); -writeln(dist_eq(AA1D(2).domain.dist, Dist1D)); -writeln(dist_eq(AA1D(3).domain.dist, Dist1D)); +writeln(dist_eq(AA1D(1).domain.distribution, Dist1D)); +writeln(dist_eq(AA1D(2).domain.distribution, Dist1D)); +writeln(dist_eq(AA1D(3).domain.distribution, Dist1D)); diff --git a/test/distributions/robust/arithmetic/basics/test_reshape.chpl b/test/distributions/robust/arithmetic/basics/test_reshape.chpl index 35169ae38285..836bca45e52a 100644 --- a/test/distributions/robust/arithmetic/basics/test_reshape.chpl +++ b/test/distributions/robust/arithmetic/basics/test_reshape.chpl @@ -20,9 +20,9 @@ var A4 = reshape(A3, {1..24}); writeln(A4); -writeln(dist_eq(A1.domain.dist, D1.dist)); -writeln(dist_eq(A2.domain.dist, D2.dist)); -writeln(dist_eq(A3.domain.dist, D3.dist)); +writeln(dist_eq(A1.domain.distribution, D1.distribution)); +writeln(dist_eq(A2.domain.distribution, D2.distribution)); +writeln(dist_eq(A3.domain.distribution, D3.distribution)); // since DefaultDist is a singleton, neq would return false if distType == DistType.default then diff --git a/test/distributions/robust/arithmetic/slicing/test_domain_slicing1.chpl b/test/distributions/robust/arithmetic/slicing/test_domain_slicing1.chpl index 36b2e0974361..1c1d01e1955e 100644 --- a/test/distributions/robust/arithmetic/slicing/test_domain_slicing1.chpl +++ b/test/distributions/robust/arithmetic/slicing/test_domain_slicing1.chpl @@ -12,4 +12,4 @@ var A: [D] int; for e in A do e = next(); writeln(A); -writeln(dist_eq(A.domain.dist, Dist2D)); +writeln(dist_eq(A.domain.distribution, Dist2D)); diff --git a/test/distributions/robust/arithmetic/trivial/test_domain_plus_minus_index.chpl b/test/distributions/robust/arithmetic/trivial/test_domain_plus_minus_index.chpl index 790871a8f6dc..11d63840b6d1 100644 --- a/test/distributions/robust/arithmetic/trivial/test_domain_plus_minus_index.chpl +++ b/test/distributions/robust/arithmetic/trivial/test_domain_plus_minus_index.chpl @@ -14,4 +14,4 @@ var A: [Dom2D.translate(1, 1)] int; writeln(A); for i in A.domain do writeln(i); -writeln(dist_eq(A.domain.dist, Dist2D)); +writeln(dist_eq(A.domain.distribution, Dist2D)); diff --git a/test/distributions/robust/arithmetic/trivial/test_dot_dist.chpl b/test/distributions/robust/arithmetic/trivial/test_dot_dist.chpl index e55a74286a87..3031798098a8 100644 --- a/test/distributions/robust/arithmetic/trivial/test_dot_dist.chpl +++ b/test/distributions/robust/arithmetic/trivial/test_dot_dist.chpl @@ -1,10 +1,10 @@ use driver_domains; -writeln(dist_eq(Dom1D.dist, Dist1D)); -writeln(dist_eq(Dom2D.dist, Dist2D)); -writeln(dist_eq(Dom3D.dist, Dist3D)); -writeln(dist_eq(Dom4D.dist, Dist4D)); -writeln(dist_eq(Dom2D32.dist, Dist2D32)); +writeln(dist_eq(Dom1D.distribution, Dist1D)); +writeln(dist_eq(Dom2D.distribution, Dist2D)); +writeln(dist_eq(Dom3D.distribution, Dist3D)); +writeln(dist_eq(Dom4D.distribution, Dist4D)); +writeln(dist_eq(Dom2D32.distribution, Dist2D32)); // since DefaultDist is a singleton, neq would return false if distType == DistType.default then diff --git a/test/distributions/robust/arithmetic/trivial/test_dot_domain.chpl b/test/distributions/robust/arithmetic/trivial/test_dot_domain.chpl index 13780e3fdd03..9cad94289a36 100644 --- a/test/distributions/robust/arithmetic/trivial/test_dot_domain.chpl +++ b/test/distributions/robust/arithmetic/trivial/test_dot_domain.chpl @@ -5,11 +5,11 @@ writeln(A2D.domain); writeln(A3D.domain); writeln(A4D.domain); writeln(A2D32.domain); -writeln(dist_eq(A1D.domain.dist, Dist1D)); -writeln(dist_eq(A2D.domain.dist, Dist2D)); -writeln(dist_eq(A3D.domain.dist, Dist3D)); -writeln(dist_eq(A4D.domain.dist, Dist4D)); -writeln(dist_eq(A2D32.domain.dist, Dist2D32)); +writeln(dist_eq(A1D.domain.distribution, Dist1D)); +writeln(dist_eq(A2D.domain.distribution, Dist2D)); +writeln(dist_eq(A3D.domain.distribution, Dist3D)); +writeln(dist_eq(A4D.domain.distribution, Dist4D)); +writeln(dist_eq(A2D32.domain.distribution, Dist2D32)); // since DefaultDist is a singleton, neq would return false if distType == DistType.default then diff --git a/test/distributions/robust/arithmetic/trivial/test_dot_expand.chpl b/test/distributions/robust/arithmetic/trivial/test_dot_expand.chpl index 500377350a07..fbdf0b37d8d3 100644 --- a/test/distributions/robust/arithmetic/trivial/test_dot_expand.chpl +++ b/test/distributions/robust/arithmetic/trivial/test_dot_expand.chpl @@ -8,7 +8,7 @@ proc foo(Dom, Dist) { e = 2; writeln(A); - writeln(dist_eq(A.domain.dist, Dist)); + writeln(dist_eq(A.domain.distribution, Dist)); } foo(Dom1D, Dist1D); diff --git a/test/distributions/stencil/remoteOwnership.chpl b/test/distributions/stencil/remoteOwnership.chpl index f76bb8e23e57..22a6cb3f47a6 100644 --- a/test/distributions/stencil/remoteOwnership.chpl +++ b/test/distributions/stencil/remoteOwnership.chpl @@ -42,7 +42,7 @@ if (numLocales == 4) { proc testit(D, A) { writeln("Testing domain D: ", D); - writeln("Mapped to locales:\n", D.dist.targetLocales()); + writeln("Mapped to locales:\n", D.distribution.targetLocales()); testit(D); writeln(); diff --git a/test/distributions/sungeun/equality.chpl b/test/distributions/sungeun/equality.chpl index 7517360ce1e4..ee47c4c9ee33 100644 --- a/test/distributions/sungeun/equality.chpl +++ b/test/distributions/sungeun/equality.chpl @@ -13,6 +13,6 @@ writeln(d3==d4); writeln(d3!=d4); var dom = {1..1} dmapped Block({1..10}); -writeln(d3==dom.dist); -writeln(d3!=dom.dist); +writeln(d3==dom.distribution); +writeln(d3!=dom.distribution); diff --git a/test/library/draft/DistributedList/DistributedList.chpl b/test/library/draft/DistributedList/DistributedList.chpl index fb61ccf13717..3b79f6ca3956 100644 --- a/test/library/draft/DistributedList/DistributedList.chpl +++ b/test/library/draft/DistributedList/DistributedList.chpl @@ -79,7 +79,7 @@ module DistributedList { } proc init(arr: [?d] ?t, param blockSize=DefaultBlockSize) - where d.rank == 1 && d.hasUnitStride() && d.dist._value.dsiIsLayout() + where d.rank == 1 && d.hasUnitStride() && d.distribution._value.dsiIsLayout() { this.eltType = t; this.blockSize = blockSize; @@ -151,7 +151,7 @@ module DistributedList { // append a group of elements to the end of the list proc ref append(x: [?d] eltType): range(d.idxType) - where d.rank == 1 && d.hasUnitStride() && d.dist._value.dsiIsLayout() + where d.rank == 1 && d.hasUnitStride() && d.distribution._value.dsiIsLayout() { this.lockAll(); defer this.unlockAll(); @@ -264,7 +264,7 @@ module DistributedList { // insert an array of elements. shift all subsequent elements 'd.size' slots to the right proc ref insert(idx: int, arr: [?d] eltType): bool - where d.rank == 1 && d.hasUnitStride() && d.dist._value.dsiIsLayout() + where d.rank == 1 && d.hasUnitStride() && d.distribution._value.dsiIsLayout() { this.lockAll(); defer this.unlockAll(); if this.boundsCheck(idx) { diff --git a/test/library/standard/MemMove/moveInitBad.chpl b/test/library/standard/MemMove/moveInitBad.chpl index 7265c5823ec1..8bcb29fd7dda 100644 --- a/test/library/standard/MemMove/moveInitBad.chpl +++ b/test/library/standard/MemMove/moveInitBad.chpl @@ -3,7 +3,7 @@ use MemMove; var n: nothing; var A: [1..3] real; var D = {1..3}; -var dist = D.dist; +var dist = D.distribution; var i: int; var r: real; diff --git a/test/parallel/taskPar/sungeun/barrier/basic.chpl b/test/parallel/taskPar/sungeun/barrier/basic.chpl index 1f659761f4eb..bca79afe9edc 100644 --- a/test/parallel/taskPar/sungeun/barrier/basic.chpl +++ b/test/parallel/taskPar/sungeun/barrier/basic.chpl @@ -18,7 +18,7 @@ proc remoteTest(b: barrier, numRemoteTasks) { const barSpace = 0..#numRemoteTasks; var A: [{barSpace} dmapped new dmap(new Block({barSpace}))] int = barSpace; var B: [{barSpace} dmapped new dmap(new Block({barSpace}))] int = -1; - coforall t in barSpace do on A.domain.dist.idxToLocale(t) { + coforall t in barSpace do on A.domain.distribution.idxToLocale(t) { B[t] = A[t]; b.barrier(); if t==0 then writeln(B); diff --git a/test/parallel/taskPar/sungeun/barrier/commDiags.chpl b/test/parallel/taskPar/sungeun/barrier/commDiags.chpl index 966023d4828e..dbce67830446 100644 --- a/test/parallel/taskPar/sungeun/barrier/commDiags.chpl +++ b/test/parallel/taskPar/sungeun/barrier/commDiags.chpl @@ -18,7 +18,7 @@ proc remoteTestBasic(b, numRemoteTasks) { { // block keeps above variables alive resetCommDiagnostics(); startCommDiagnostics(); - coforall t in barSpace do on A.domain.dist.idxToLocale(t) { + coforall t in barSpace do on A.domain.distribution.idxToLocale(t) { B[t] = A[t]; b.barrier(); } @@ -35,7 +35,7 @@ proc remoteTestSplitPhase(b: barrier, numRemoteTasks) { { // block keeps above variables alive resetCommDiagnostics(); startCommDiagnostics(); - coforall t in barSpace do on A.domain.dist.idxToLocale(t) { + coforall t in barSpace do on A.domain.distribution.idxToLocale(t) { B[t] = A[t]; b.notify(); b.wait(); diff --git a/test/parallel/taskPar/sungeun/barrier/reuse.chpl b/test/parallel/taskPar/sungeun/barrier/reuse.chpl index 7344819856b8..9a14014bb01f 100644 --- a/test/parallel/taskPar/sungeun/barrier/reuse.chpl +++ b/test/parallel/taskPar/sungeun/barrier/reuse.chpl @@ -26,7 +26,7 @@ proc remoteTest(b: barrier, numRemoteTasks) { const barSpace = 0..#numRemoteTasks; var A: [{barSpace} dmapped new dmap(new Block({barSpace}))] int = barSpace; var B: [{barSpace} dmapped new dmap(new Block({barSpace}))] int = -1; - coforall t in barSpace do on A.domain.dist.idxToLocale(t) { + coforall t in barSpace do on A.domain.distribution.idxToLocale(t) { B[t] = A[t]; for i in 1..numRemoteTasks { if i%2 { diff --git a/test/parallel/taskPar/sungeun/barrier/split-phase.chpl b/test/parallel/taskPar/sungeun/barrier/split-phase.chpl index f9954255a722..9cd5fe8e6382 100644 --- a/test/parallel/taskPar/sungeun/barrier/split-phase.chpl +++ b/test/parallel/taskPar/sungeun/barrier/split-phase.chpl @@ -23,7 +23,7 @@ proc remoteTest(b: barrier, numRemoteTasks) { const barSpace = 0..#numRemoteTasks; var A: [{barSpace} dmapped new dmap(new Block({barSpace}))] int = barSpace; var B: [{barSpace} dmapped new dmap(new Block({barSpace}))] int = -1; - coforall t in barSpace do on A.domain.dist.idxToLocale(t) { + coforall t in barSpace do on A.domain.distribution.idxToLocale(t) { B[t] = A[t]; b.notify(); if t!=barSpace.high { diff --git a/test/reductions/partial/CSimpl.chpl b/test/reductions/partial/CSimpl.chpl index 3f68958311b4..ec9222c5dc1d 100644 --- a/test/reductions/partial/CSimpl.chpl +++ b/test/reductions/partial/CSimpl.chpl @@ -12,7 +12,7 @@ proc plusPRinto(ref RES,DOM,FEXPR) throws { defer { delete OP; } - DOM.dist._value.dsiPartialReduceInto(RES, OP, DOM, FEXPR); + DOM.distribution._value.dsiPartialReduceInto(RES, OP, DOM, FEXPR); } // At the moment, this is an exact copy of DefaultDist.dsiPartialReduce() diff --git a/test/reductions/partial/DRimpl.chpl b/test/reductions/partial/DRimpl.chpl index f75b9e9b8784..4cfe9c6019cb 100644 --- a/test/reductions/partial/DRimpl.chpl +++ b/test/reductions/partial/DRimpl.chpl @@ -6,7 +6,7 @@ use utilities; proc plusPR(DIMS,ARR) throws { const OP = new unmanaged SumReduceScanOp(eltType=ARR.eltType); defer { delete OP; } - return ARR.domain.dist.dsiPartialReduce(OP, DIMS, ARR); + return ARR.domain.distribution.dsiPartialReduce(OP, DIMS, ARR); } proc DefaultDist.dsiPartialReduce(const perElemOp, const resDimSpec, diff --git a/test/release/examples/benchmarks/hpcc/fft.chpl b/test/release/examples/benchmarks/hpcc/fft.chpl index 9cd0c4d9b6bb..6159c3ce8d51 100644 --- a/test/release/examples/benchmarks/hpcc/fft.chpl +++ b/test/release/examples/benchmarks/hpcc/fft.chpl @@ -154,7 +154,7 @@ proc dfft(A: [?ADom], W, cyclicPhase) { // lo.. by str #num == lo, lo+str, lo+2*str, ... lo+(num-1)*str // forall lo in bankStart..#str do - on ADom.dist.idxToLocale(lo) do + on ADom.distribution.idxToLocale(lo) do local do butterfly(wk1, wk2, wk3, A.localSlice(lo..by str #radix)); // @@ -169,7 +169,7 @@ proc dfft(A: [?ADom], W, cyclicPhase) { // loop in parallel over the high bank, computing butterflies // forall lo in bankStart+span..#str do - on ADom.dist.idxToLocale(lo) do + on ADom.distribution.idxToLocale(lo) do local do butterfly(wk1, wk2, wk3, A.localSlice(lo.. by str #radix)); } } @@ -185,7 +185,7 @@ proc dfft(A: [?ADom], W, cyclicPhase) { // if (str*radix == numElements) { forall lo in 0..#str do - on ADom.dist.idxToLocale(lo) do + on ADom.distribution.idxToLocale(lo) do local do butterfly(1.0, 1.0, 1.0, A.localSlice(lo.. by str # radix)); } // @@ -193,7 +193,7 @@ proc dfft(A: [?ADom], W, cyclicPhase) { // else forall lo in 0..#str do - on ADom.dist.idxToLocale(lo) do + on ADom.distribution.idxToLocale(lo) do local { const a = A(lo), b = A(lo+str); diff --git a/test/studies/bale/toposort/toposort.chpl b/test/studies/bale/toposort/toposort.chpl index 678db335ab9b..0bf30e586270 100644 --- a/test/studies/bale/toposort/toposort.chpl +++ b/test/studies/bale/toposort/toposort.chpl @@ -1015,7 +1015,7 @@ where D.rank == 2 } if count == 1 { - workQueue.add( row, D.dist.dsiIndexToLocale( (row,minCol) ) ); + workQueue.add( row, D.distribution.dsiIndexToLocale( (row,minCol) ) ); } rowCount[row].write( count ); @@ -1091,7 +1091,7 @@ where D.rank == 2 // if previousRowCount = 2 (ie rowCount[row] == 1) if previousRowCount == 2 { if enableRuntimeDebugging && debugTopo then writeln( "Queueing ", row); - workQueue.add( row, D.dist.dsiIndexToLocale( (row,minCol) ) ); + workQueue.add( row, D.distribution.dsiIndexToLocale( (row,minCol) ) ); } } } diff --git a/test/studies/cholesky/jglewis/version2/elemental/block_distribution/elemental_cholesky_symmetric_index_ranges_block.chpl b/test/studies/cholesky/jglewis/version2/elemental/block_distribution/elemental_cholesky_symmetric_index_ranges_block.chpl index 6ada4e0be085..d9ea95f4c5c9 100644 --- a/test/studies/cholesky/jglewis/version2/elemental/block_distribution/elemental_cholesky_symmetric_index_ranges_block.chpl +++ b/test/studies/cholesky/jglewis/version2/elemental/block_distribution/elemental_cholesky_symmetric_index_ranges_block.chpl @@ -94,7 +94,7 @@ module elemental_cholesky_symmetric_index_ranges_block { // processor grid from A's distribution // -------------------------------------------- - const A_locale_grid = A.domain.dist.targetLocales(); // block version + const A_locale_grid = A.domain.distribution.targetLocales(); // block version const A_grid_domain = A_locale_grid.domain, n_processors = A_grid_domain.size; diff --git a/test/studies/cholesky/jglewis/version2/elemental/elemental_cholesky_symmetric_index_ranges_alt.chpl b/test/studies/cholesky/jglewis/version2/elemental/elemental_cholesky_symmetric_index_ranges_alt.chpl index e9777d4f6fa4..afe36706ea52 100644 --- a/test/studies/cholesky/jglewis/version2/elemental/elemental_cholesky_symmetric_index_ranges_alt.chpl +++ b/test/studies/cholesky/jglewis/version2/elemental/elemental_cholesky_symmetric_index_ranges_alt.chpl @@ -90,7 +90,7 @@ module elemental_cholesky_symmetric_index_ranges_alt { // processor grid from A's distribution // -------------------------------------------- - const A_locale_grid = A.domain.dist.targetLocales(); + const A_locale_grid = A.domain.distribution.targetLocales(); const A_grid_domain = A_locale_grid.domain; assert ( A_grid_domain.low == (0,0) ); diff --git a/test/studies/cholesky/jglewis/version2/elemental/strided/elemental_cholesky_symmetric_strided.chpl b/test/studies/cholesky/jglewis/version2/elemental/strided/elemental_cholesky_symmetric_strided.chpl index c59f3bb21007..08b4d452fa06 100644 --- a/test/studies/cholesky/jglewis/version2/elemental/strided/elemental_cholesky_symmetric_strided.chpl +++ b/test/studies/cholesky/jglewis/version2/elemental/strided/elemental_cholesky_symmetric_strided.chpl @@ -94,7 +94,7 @@ module elemental_cholesky_symmetric_strided { // processor grid from A's distribution // -------------------------------------------- - const A_locale_grid = A.domain.dist.targetLocales(); + const A_locale_grid = A.domain.distribution.targetLocales(); const A_grid_domain = A_locale_grid.domain, n_processors = A_grid_domain.size; diff --git a/test/studies/cholesky/jglewis/version2/elemental/unsymmetric_indices/elemental_cholesky_unsymmetric_index_ranges.chpl b/test/studies/cholesky/jglewis/version2/elemental/unsymmetric_indices/elemental_cholesky_unsymmetric_index_ranges.chpl index 1253a7a9d4f9..3902307ee84a 100644 --- a/test/studies/cholesky/jglewis/version2/elemental/unsymmetric_indices/elemental_cholesky_unsymmetric_index_ranges.chpl +++ b/test/studies/cholesky/jglewis/version2/elemental/unsymmetric_indices/elemental_cholesky_unsymmetric_index_ranges.chpl @@ -84,7 +84,7 @@ module elemental_cholesky_unsymmetric_index_ranges { // processor grid from A's distribution // -------------------------------------------- - const A_locale_grid = A.domain.dist.targetLocales(); + const A_locale_grid = A.domain.distribution.targetLocales(); const A_grid_domain = A_locale_grid.domain, n_processors = A_grid_domain.size; diff --git a/test/studies/hpcc/FFT/diten/fft.chpl b/test/studies/hpcc/FFT/diten/fft.chpl index a54c3ad94557..88e5a8adab55 100644 --- a/test/studies/hpcc/FFT/diten/fft.chpl +++ b/test/studies/hpcc/FFT/diten/fft.chpl @@ -135,7 +135,7 @@ proc dfft(A: [?ADom], W, phase) { // lo.. by str #num == lo, lo+str, lo+2*str, ... lo+(num-1)*str // forall lo in bankStart..#str { - on ADom.dist.idxToLocale(lo) { + on ADom.distribution.idxToLocale(lo) { local { butterfly(wk1, wk2, wk3, A.localSlice(lo..by str #radix)); } @@ -153,7 +153,7 @@ proc dfft(A: [?ADom], W, phase) { // loop in parallel over the high bank, computing butterflies // forall lo in bankStart+span..#str { - on ADom.dist.idxToLocale(lo) { + on ADom.distribution.idxToLocale(lo) { local { butterfly(wk1, wk2, wk3, A.localSlice(lo.. by str #radix)); } diff --git a/test/studies/hpcc/PTRANS/jglewis/ptrans_2011-blkcyc.chpl b/test/studies/hpcc/PTRANS/jglewis/ptrans_2011-blkcyc.chpl index 5166204eb141..5d1708fa37cc 100644 --- a/test/studies/hpcc/PTRANS/jglewis/ptrans_2011-blkcyc.chpl +++ b/test/studies/hpcc/PTRANS/jglewis/ptrans_2011-blkcyc.chpl @@ -274,7 +274,7 @@ module HPCC_PTRANS { // processor grid from A's distribution // -------------------------------------------- - const C_locale_grid = C.domain.dist.targetLocales(); // block version + const C_locale_grid = C.domain.distribution.targetLocales(); // block version const C_grid_domain = C_locale_grid.domain, n_processors = C_grid_domain.size; diff --git a/test/studies/hpcc/PTRANS/jglewis/ptrans_2011.chpl b/test/studies/hpcc/PTRANS/jglewis/ptrans_2011.chpl index ffe13c53dcde..6764f2bbf5b4 100644 --- a/test/studies/hpcc/PTRANS/jglewis/ptrans_2011.chpl +++ b/test/studies/hpcc/PTRANS/jglewis/ptrans_2011.chpl @@ -273,7 +273,7 @@ module HPCC_PTRANS { // processor grid from A's distribution // -------------------------------------------- - const C_locale_grid = C.domain.dist.targetLocales(); // block version + const C_locale_grid = C.domain.distribution.targetLocales(); // block version const C_grid_domain = C_locale_grid.domain, n_processors = C_grid_domain.size; diff --git a/test/studies/hpcc/RA/diten/doupdates.chpl b/test/studies/hpcc/RA/diten/doupdates.chpl index acf01f5f39b2..baaf76a98098 100644 --- a/test/studies/hpcc/RA/diten/doupdates.chpl +++ b/test/studies/hpcc/RA/diten/doupdates.chpl @@ -13,7 +13,7 @@ proc doUpdates(A, nu) { t(i) = A(start+i-1); } } - on T.domain.dist.idxToLocale(t(0) & indexMask) { + on T.domain.distribution.idxToLocale(t(0) & indexMask) { var tt = t; local { for i in 0..#nu { diff --git a/test/studies/hpcc/RA/diten/ra.chpl b/test/studies/hpcc/RA/diten/ra.chpl index a4112fed6d4b..f02e59ffea7d 100644 --- a/test/studies/hpcc/RA/diten/ra.chpl +++ b/test/studies/hpcc/RA/diten/ra.chpl @@ -120,7 +120,7 @@ proc main() { // pending for that locale. // forall (_, r) in zip(Updates, RAStream()) { - var loc = T.domain.dist.idxToLocale(r&indexMask); + var loc = T.domain.distribution.idxToLocale(r&indexMask); if loc == here { T(r&indexMask) ^= r; } else { @@ -182,7 +182,7 @@ proc verifyResults() { // Reverse the updates by recomputing them // forall (_, r) in zip(Updates, RAStream()) do - on T.domain.dist.idxToLocale(r & indexMask) do + on T.domain.distribution.idxToLocale(r & indexMask) do T(r & indexMask) ^= r; // diff --git a/test/studies/ssca2/main/SSCA2_Modules/SSCA2_kernels.chpl b/test/studies/ssca2/main/SSCA2_Modules/SSCA2_kernels.chpl index 933afb38bce1..c721b43d84a0 100644 --- a/test/studies/ssca2/main/SSCA2_Modules/SSCA2_kernels.chpl +++ b/test/studies/ssca2/main/SSCA2_Modules/SSCA2_kernels.chpl @@ -273,7 +273,7 @@ module SSCA2_kernels if PRINT_TIMING_STATISTICS then sw.start (); - forall s in starting_vertices do on vertex_domain.dist.idxToLocale(s) { + forall s in starting_vertices do on vertex_domain.distribution.idxToLocale(s) { const shere = here.id; @@ -329,7 +329,7 @@ module SSCA2_kernels const AL = Active_Level[here.id]!; AL.Members.clear(); AL.next!.Members.clear(); - if vertex_domain.dist.idxToLocale(s) == here { + if vertex_domain.distribution.idxToLocale(s) == here { // Establish the initial level sets for the breadth-first // traversal from s AL.Members.add(s); @@ -387,7 +387,7 @@ module SSCA2_kernels const AL = Active_Level[here.id]!; forall u in AL.Members do { - forall v in G.FilteredNeighbors(u) do on vertex_domain.dist.idxToLocale(v) { + forall v in G.FilteredNeighbors(u) do on vertex_domain.distribution.idxToLocale(v) { var dist_temp: real; f3(BCaux, v, u, current_distance_c, Active_Level, dist_temp); if VALIDATE_BC && dist_temp != 0 then @@ -456,7 +456,7 @@ module SSCA2_kernels for current_distance in 2 .. graph_diameter by -1 { curr_Level = curr_Level.previous!; - for u in curr_Level.Members do on vertex_domain.dist.idxToLocale(u) { + for u in curr_Level.Members do on vertex_domain.distribution.idxToLocale(u) { f4(BCaux, Between_Cent$, u); } From 48ceb205b6bd08d7d27ca876a399e5c550bb4eac Mon Sep 17 00:00:00 2001 From: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com> Date: Wed, 26 Jul 2023 18:45:57 -0500 Subject: [PATCH 5/8] .dist -> .distribution for ChapelDomain and manually fixing erroneous replacements by script Signed-off-by: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com> --- modules/dists/BlockDist.chpl | 2 +- modules/dists/CyclicDist.chpl | 2 +- modules/dists/StencilDist.chpl | 2 +- modules/internal/ChapelDomain.chpl | 40 +++++++++++----------- test/deprecated/CyclicStridable.chpl | 2 +- test/distributions/bradc/distEquality.chpl | 2 +- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/modules/dists/BlockDist.chpl b/modules/dists/BlockDist.chpl index 23848ee1f914..d3358b21ade8 100644 --- a/modules/dists/BlockDist.chpl +++ b/modules/dists/BlockDist.chpl @@ -1208,7 +1208,7 @@ proc BlockArr.dsiDynamicFastFollowCheck(lead: []) do proc BlockArr.dsiDynamicFastFollowCheck(lead: domain) { // TODO: Should this return true for domains with the same shape? - return lead.distribution.dsiEqualDMaps(this.dom.distribution) && lead._value.whole == this.dom.whole; + return lead.distribution.dsiEqualDMaps(this.dom.dist) && lead._value.whole == this.dom.whole; } iter BlockArr.these(param tag: iterKind, followThis, param fast: bool = false) ref where tag == iterKind.follower { diff --git a/modules/dists/CyclicDist.chpl b/modules/dists/CyclicDist.chpl index be514b7f6cc4..663e4b602f8b 100644 --- a/modules/dists/CyclicDist.chpl +++ b/modules/dists/CyclicDist.chpl @@ -963,7 +963,7 @@ proc CyclicArr.dsiDynamicFastFollowCheck(lead: []) do return this.dsiDynamicFastFollowCheck(lead.domain); proc CyclicArr.dsiDynamicFastFollowCheck(lead: domain) { - return lead.distribution.dsiEqualDMaps(this.dom.distribution) && lead._value.whole == this.dom.whole; + return lead.distribution.dsiEqualDMaps(this.dom.dist) && lead._value.whole == this.dom.whole; } iter CyclicArr.these(param tag: iterKind, followThis, param fast: bool = false) ref where tag == iterKind.follower { diff --git a/modules/dists/StencilDist.chpl b/modules/dists/StencilDist.chpl index 0573de04231e..9626f6277040 100644 --- a/modules/dists/StencilDist.chpl +++ b/modules/dists/StencilDist.chpl @@ -1295,7 +1295,7 @@ proc StencilArr.dsiDynamicFastFollowCheck(lead: []) do return this.dsiDynamicFastFollowCheck(lead.domain); proc StencilArr.dsiDynamicFastFollowCheck(lead: domain) { - return lead.distribution.dsiEqualDMaps(this.dom.distribution) && lead._value.whole == this.dom.whole; + return lead.distribution.dsiEqualDMaps(this.dom.dist) && lead._value.whole == this.dom.whole; } iter StencilArr.these(param tag: iterKind, followThis, param fast: bool = false) ref where tag == iterKind.follower { diff --git a/modules/internal/ChapelDomain.chpl b/modules/internal/ChapelDomain.chpl index 479dbc2e5dcf..4499be0c4843 100644 --- a/modules/internal/ChapelDomain.chpl +++ b/modules/internal/ChapelDomain.chpl @@ -163,18 +163,18 @@ module ChapelDomain { proc chpl__convertValueToRuntimeType(dom: domain) type where isSubtype(dom._value.type, BaseRectangularDom) { - return chpl__buildDomainRuntimeType(dom.dist, dom._value.rank, + return chpl__buildDomainRuntimeType(dom.distribution, dom._value.rank, dom._value.idxType, dom._value.strides); } proc chpl__convertValueToRuntimeType(dom: domain) type where isSubtype(dom._value.type, BaseAssociativeDom) { - return chpl__buildDomainRuntimeType(dom.dist, dom._value.idxType, dom._value.parSafe); + return chpl__buildDomainRuntimeType(dom.distribution, dom._value.idxType, dom._value.parSafe); } proc chpl__convertValueToRuntimeType(dom: domain) type where isSubtype(dom._value.type, BaseSparseDom) { - return chpl__buildSparseDomainRuntimeType(dom.dist, dom._value.parentDom); + return chpl__buildSparseDomainRuntimeType(dom.distribution, dom._value.parentDom); } proc chpl__convertValueToRuntimeType(dom: domain) type { @@ -349,7 +349,7 @@ module ChapelDomain { for param i in 0..dom.rank-1 do ranges(i) = ranges(i) # counts(i); - return new _domain(dom.dist, dom.rank, dom.idxType, dom.strides, ranges); + return new _domain(dom.distribution, dom.rank, dom.idxType, dom.strides, ranges); } @chpldoc.nodoc @@ -808,7 +808,7 @@ module ChapelDomain { var t = _makeIndexTuple(a.rank, b, "step", expand=true); for param i in 0..a.rank-1 do r(i) = a.dim(i) by t(i); - return new _domain(a.dist, a.rank, a._value.idxType, newStrides, r); + return new _domain(a.distribution, a.rank, a._value.idxType, newStrides, r); } @chpldoc.nodoc @@ -818,7 +818,7 @@ module ChapelDomain { var r: a.rank*range(a._value.idxType, boundKind.both, newStrides); for param i in 0..a.rank-1 do r(i) = a.dim(i) by b; - return new _domain(a.dist, a.rank, a._value.idxType, newStrides, r); + return new _domain(a.distribution, a.rank, a._value.idxType, newStrides, r); } // This is the definition of the 'align' operator for domains. @@ -831,13 +831,13 @@ module ChapelDomain { var t = _makeIndexTuple(a.rank, b, "alignment", expand=true); for param i in 0..a.rank-1 do r(i) = a.dim(i) align t(i); - return new _domain(a.dist, a.rank, a._value.idxType, a.strides, r); + return new _domain(a.distribution, a.rank, a._value.idxType, a.strides, r); } // This function exists to avoid communication from computing _value when // the result is param. proc domainDistIsLayout(d: domain) param { - return d.dist._value.dsiIsLayout(); + return d.distribution._value.dsiIsLayout(); } pragma "find user line" @@ -1084,15 +1084,15 @@ module ChapelDomain { // handle the type of 'other'. That case is currently managed by the // compiler and various helper functions involving runtime types. proc init=(const ref other : domain) where other.isRectangular() { - this.init(other.dist, other.rank, other.idxType, other.strides, + this.init(other.distribution, other.rank, other.idxType, other.strides, other.dims()); } proc init=(const ref other : domain) { if other.isAssociative() { - this.init(other.dist, other.idxType, other.parSafe); + this.init(other.distribution, other.idxType, other.parSafe); } else if other.isSparse() { - this.init(other.dist, other.parentDom); + this.init(other.distribution, other.parentDom); } else { compilerError("cannot initialize '", this.type:string, "' from '", other.type:string, "'"); this.init(nil); @@ -1302,7 +1302,7 @@ module ChapelDomain { for param i in 0..rank-1 { r(i) = myDims(i)[ranges(i)]; } - return new _domain(dist, rank, _value.idxType, r(0).strides, r); + return new _domain(distribution, rank, _value.idxType, r(0).strides, r); } // domain rank change @@ -1346,8 +1346,8 @@ module ChapelDomain { upranges(d) = emptyrange; } - const rcdist = new unmanaged ArrayViewRankChangeDist(downDistPid=dist._pid, - downDistInst=dist._instance, + const rcdist = new unmanaged ArrayViewRankChangeDist(downDistPid=distribution._pid, + downDistInst=distribution._instance, collapsedDim=collapsedDim, idx = idx); // TODO: Should this be set? @@ -2311,7 +2311,7 @@ module ChapelDomain { } } - return new _domain(dist, rank, _value.idxType, strides, ranges); + return new _domain(distribution, rank, _value.idxType, strides, ranges); } /* Return a new domain that is the current domain expanded by @@ -2326,7 +2326,7 @@ module ChapelDomain { var ranges = dims(); for i in 0..rank-1 do ranges(i) = dim(i).expand(off); - return new _domain(dist, rank, _value.idxType, strides, ranges); + return new _domain(distribution, rank, _value.idxType, strides, ranges); } @chpldoc.nodoc @@ -2358,7 +2358,7 @@ module ChapelDomain { var ranges = dims(); for i in 0..rank-1 do ranges(i) = dim(i).exterior(off(i)); - return new _domain(dist, rank, _value.idxType, strides, ranges); + return new _domain(distribution, rank, _value.idxType, strides, ranges); } /* Return a new domain that is the exterior portion of the @@ -2413,7 +2413,7 @@ module ChapelDomain { } ranges(i) = _value.dsiDim(i).interior(off(i)); } - return new _domain(dist, rank, _value.idxType, strides, ranges); + return new _domain(distribution, rank, _value.idxType, strides, ranges); } /* Return a new domain that is the interior portion of the @@ -2467,7 +2467,7 @@ module ChapelDomain { var ranges = dims(); for i in 0..rank-1 do ranges(i) = _value.dsiDim(i).translate(off(i)); - return new _domain(dist, rank, _value.idxType, strides, ranges); + return new _domain(distribution, rank, _value.idxType, strides, ranges); } /* Return a new domain that is the current domain translated by @@ -2498,7 +2498,7 @@ module ChapelDomain { var ranges = dims(); for i in 0..rank-1 do ranges(i) = dim(i).chpl__unTranslate(off(i)); - return new _domain(dist, rank, _value.idxType, strides, ranges); + return new _domain(distribution, rank, _value.idxType, strides, ranges); } @chpldoc.nodoc diff --git a/test/deprecated/CyclicStridable.chpl b/test/deprecated/CyclicStridable.chpl index 4310b8c7db6b..277f2f1d5d1c 100644 --- a/test/deprecated/CyclicStridable.chpl +++ b/test/deprecated/CyclicStridable.chpl @@ -962,7 +962,7 @@ proc CyclicArr.dsiDynamicFastFollowCheck(lead: []) do return this.dsiDynamicFastFollowCheck(lead.domain); proc CyclicArr.dsiDynamicFastFollowCheck(lead: domain) { - return lead.distribution.dsiEqualDMaps(this.dom.distribution) && lead._value.whole == this.dom.whole; + return lead.distribution.dsiEqualDMaps(this.dom.dist) && lead._value.whole == this.dom.whole; } iter CyclicArr.these(param tag: iterKind, followThis, param fast: bool = false) ref where tag == iterKind.follower { diff --git a/test/distributions/bradc/distEquality.chpl b/test/distributions/bradc/distEquality.chpl index e2f802634406..642864fb161e 100644 --- a/test/distributions/bradc/distEquality.chpl +++ b/test/distributions/bradc/distEquality.chpl @@ -80,7 +80,7 @@ writeln(BC3.distribution == BC4.distribution); writeln(BC4.distribution == BC4.distribution); writeln(BC1.distribution == (Space dmapped BlockCyclic(startIdx=Space.low, - blocksize=(2,3))).dist); + blocksize=(2,3))).distribution); writeln(); From c0438dc90528b45561bc636dc5517968204426cc Mon Sep 17 00:00:00 2001 From: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com> Date: Wed, 26 Jul 2023 18:47:28 -0500 Subject: [PATCH 6/8] range.boundsCheck -> range.contains and depracating assignment between unabounded ranges Signed-off-by: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com> --- .../vass/slices-with-negative-strides-1.chpl | 8 ++++---- test/types/range/unbounded/compareEnumBool.chpl | 2 +- .../range/unbounded/unboundedBoolEnum2.chpl | 16 ++++++++++------ .../range/unbounded/unboundedBoolEnum2a.chpl | 16 ++++++++++------ test/types/range/userAPI/rangeAPItest.chpl | 4 ++-- 5 files changed, 27 insertions(+), 19 deletions(-) diff --git a/test/arrays/vass/slices-with-negative-strides-1.chpl b/test/arrays/vass/slices-with-negative-strides-1.chpl index 89a98cb6805c..5cd4eacbe84e 100644 --- a/test/arrays/vass/slices-with-negative-strides-1.chpl +++ b/test/arrays/vass/slices-with-negative-strides-1.chpl @@ -16,10 +16,10 @@ writeln(); // testing lower-level code const ths = 1..4, oth = 1..4 by -1; -writeln(ths.boundsCheck(ths)); -writeln(ths.boundsCheck(oth)); -writeln(oth.boundsCheck(ths)); -writeln(oth.boundsCheck(oth)); +writeln(ths.contains(ths)); +writeln(ths.contains(oth)); +writeln(oth.contains(ths)); +writeln(oth.contains(oth)); writeln(); const bt = ths, bo = oth; diff --git a/test/types/range/unbounded/compareEnumBool.chpl b/test/types/range/unbounded/compareEnumBool.chpl index 21b08917f8f5..222a8cdf64cd 100644 --- a/test/types/range/unbounded/compareEnumBool.chpl +++ b/test/types/range/unbounded/compareEnumBool.chpl @@ -4,7 +4,7 @@ use color; var rgb = red..blue; var rdd = red..; var ddb = ..blue; -var dd: range(color, boundKind.neither) = ..; +var dd: range(color, boundKind.neither); writeln(rgb == rdd); writeln(rgb == ddb); diff --git a/test/types/range/unbounded/unboundedBoolEnum2.chpl b/test/types/range/unbounded/unboundedBoolEnum2.chpl index 2388db3c841d..c4f218627edd 100644 --- a/test/types/range/unbounded/unboundedBoolEnum2.chpl +++ b/test/types/range/unbounded/unboundedBoolEnum2.chpl @@ -51,8 +51,8 @@ for i in true.. by -1 do writeln("---"); -var re: range(color, boundKind.neither) = ..; -var rb: range(bool, boundKind.neither) = ..; +var re: range(color, boundKind.neither); +var rb: range(bool, boundKind.neither); for i in re do writeln(i); @@ -64,8 +64,10 @@ for i in rb do writeln("---"); -var reps: range(color, boundKind.neither, strides = strideKind.any) = .. by 2; -var rbps: range(bool, boundKind.neither, strides = strideKind.any) = .. by 2; +var reps: range(color, boundKind.neither, strides = strideKind.any); +reps = reps by 2; +var rbps: range(bool, boundKind.neither, strides = strideKind.any); +rbps = rbps by 2; for i in reps do writeln(i); @@ -77,8 +79,10 @@ for i in rbps do writeln("---"); -var rens: range(color, boundKind.neither, strides = strideKind.any) = .. by -2; -var rbns: range(bool, boundKind.neither, strides = strideKind.any) = .. by -2; +var rens: range(color, boundKind.neither, strides = strideKind.any); +rens = rens by -2; +var rbns: range(bool, boundKind.neither, strides = strideKind.any); +rbns = rbns by -2; for i in rens do writeln(i); diff --git a/test/types/range/unbounded/unboundedBoolEnum2a.chpl b/test/types/range/unbounded/unboundedBoolEnum2a.chpl index f53b2dd86e68..4fc3e8060b56 100644 --- a/test/types/range/unbounded/unboundedBoolEnum2a.chpl +++ b/test/types/range/unbounded/unboundedBoolEnum2a.chpl @@ -51,8 +51,8 @@ for i in true.. by -3 do writeln("---"); -var re: range(color, boundKind.neither) = ..; -var rb: range(bool, boundKind.neither) = ..; +var re: range(color, boundKind.neither); +var rb: range(bool, boundKind.neither); for i in re do writeln(i); @@ -64,8 +64,10 @@ for i in rb do writeln("---"); -var reps: range(color, boundKind.neither, strides = strideKind.any) = .. by 3; -var rbps: range(bool, boundKind.neither, strides = strideKind.any) = .. by 3; +var reps: range(color, boundKind.neither, strides = strideKind.any); +reps = reps by 3; +var rbps: range(bool, boundKind.neither, strides = strideKind.any); +rbps = rbps by 3; for i in reps do writeln(i); @@ -77,8 +79,10 @@ for i in rbps do writeln("---"); -var rens: range(color, boundKind.neither, strides = strideKind.any) = .. by -3; -var rbns: range(bool, boundKind.neither, strides = strideKind.any) = .. by -3; +var rens: range(color, boundKind.neither, strides = strideKind.any); +rens = rens by -3; +var rbns: range(bool, boundKind.neither, strides = strideKind.any); +rbns = rbns by -3; for i in rens do writeln(i); diff --git a/test/types/range/userAPI/rangeAPItest.chpl b/test/types/range/userAPI/rangeAPItest.chpl index 18e851267192..0a10e5780611 100644 --- a/test/types/range/userAPI/rangeAPItest.chpl +++ b/test/types/range/userAPI/rangeAPItest.chpl @@ -34,8 +34,8 @@ proc testRangeAPI(lbl, r: range(?), idx, subr, offset=3, count=2) { writeln("contains(", subr, ") = ", r.contains(subr)); - writeln("boundsCheck(", idx, ") = ", r.boundsCheck(idx)); - writeln("boundsCheck(", subr, ") = ", r.boundsCheck(subr)); + writeln("boundsCheck(", idx, ") = ", r.contains(idx)); + writeln("boundsCheck(", subr, ") = ", r.contains(subr)); writeln("indexOrder(", idx, ") = ", r.indexOrder(idx)); if (r.hasFirst()) then writeln("orderToIndex(", offset, ") = ", r.orderToIndex(offset)); From 043a63df48b5ae8f2aced2a31b6614ec9f8c1411 Mon Sep 17 00:00:00 2001 From: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com> Date: Wed, 26 Jul 2023 19:39:40 -0500 Subject: [PATCH 7/8] Remove redundant test for range.contains since boundsCheck was deprecated Signed-off-by: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com> --- test/types/range/userAPI/byteRangeTest.good | 10 +----- .../range/userAPI/codepointRangeTest.good | 10 +----- test/types/range/userAPI/rangeAPItest.chpl | 4 --- test/types/range/userAPI/simpleRangeTest.good | 16 +-------- .../range/userAPI/simpleRangeTest.old.good | 34 ++++++------------- .../range/userAPI/singleEnumAPITest.good | 8 ----- 6 files changed, 13 insertions(+), 69 deletions(-) diff --git a/test/types/range/userAPI/byteRangeTest.good b/test/types/range/userAPI/byteRangeTest.good index d04fcdb87b7e..28fbfde6ee88 100644 --- a/test/types/range/userAPI/byteRangeTest.good +++ b/test/types/range/userAPI/byteRangeTest.good @@ -1,5 +1,5 @@ rangeAPItest.chpl:3: In function 'testRangeAPI': -rangeAPItest.chpl:46: warning: invoking 'offset' on an unstrided range has no effect. +rangeAPItest.chpl:42: warning: invoking 'offset' on an unstrided range has no effect. byteRangeTest.chpl:3: called as testRangeAPI(lbl: string, r: range(byteIndex,both,one), idx: byteIndex, subr: range(byteIndex,both,one), offset: int(64), count: int(64)) byte index range ------------ @@ -28,8 +28,6 @@ isNat.Algned() = true isAmbiguous = false contains(4) = true contains(3..6) = true -boundsCheck(4) = true -boundsCheck(3..6) = true indexOrder(4) = 3 orderToIndex(3) = 4 expand(2) = -1..12 @@ -78,8 +76,6 @@ isNat.Algned() = true isAmbiguous = false contains(7) = true contains(5..13 by 2) = true -boundsCheck(7) = true -boundsCheck(5..13 by 2) = true indexOrder(7) = 3 orderToIndex(3) = 7 expand(2) = -1..22 by 2 @@ -126,8 +122,6 @@ isNat.Algned() = true isAmbiguous = false contains(4) = true contains(3..6) = true -boundsCheck(4) = true -boundsCheck(3..6) = true indexOrder(4) = 3 orderToIndex(3) = 4 translate(2) = 3.. @@ -171,8 +165,6 @@ isNat.Algned() = true isAmbiguous = false contains(4) = true contains(3..6) = true -boundsCheck(4) = true -boundsCheck(3..6) = true indexOrder(4) = -1 translate(2) = ..12 translate(-2) = ..8 diff --git a/test/types/range/userAPI/codepointRangeTest.good b/test/types/range/userAPI/codepointRangeTest.good index 407bd8b76dfa..a35611c18e58 100644 --- a/test/types/range/userAPI/codepointRangeTest.good +++ b/test/types/range/userAPI/codepointRangeTest.good @@ -1,5 +1,5 @@ rangeAPItest.chpl:3: In function 'testRangeAPI': -rangeAPItest.chpl:46: warning: invoking 'offset' on an unstrided range has no effect. +rangeAPItest.chpl:42: warning: invoking 'offset' on an unstrided range has no effect. codepointRangeTest.chpl:3: called as testRangeAPI(lbl: string, r: range(codepointIndex,both,one), idx: codepointIndex, subr: range(codepointIndex,both,one), offset: int(64), count: int(64)) codepoint range ------------ @@ -28,8 +28,6 @@ isNat.Algned() = true isAmbiguous = false contains(4) = true contains(3..6) = true -boundsCheck(4) = true -boundsCheck(3..6) = true indexOrder(4) = 3 orderToIndex(3) = 4 expand(2) = -1..12 @@ -78,8 +76,6 @@ isNat.Algned() = true isAmbiguous = false contains(7) = true contains(5..13 by 2) = true -boundsCheck(7) = true -boundsCheck(5..13 by 2) = true indexOrder(7) = 3 orderToIndex(3) = 7 expand(2) = -1..22 by 2 @@ -126,8 +122,6 @@ isNat.Algned() = true isAmbiguous = false contains(4) = true contains(3..6) = true -boundsCheck(4) = true -boundsCheck(3..6) = true indexOrder(4) = 3 orderToIndex(3) = 4 translate(2) = 3.. @@ -171,8 +165,6 @@ isNat.Algned() = true isAmbiguous = false contains(4) = true contains(3..6) = true -boundsCheck(4) = true -boundsCheck(3..6) = true indexOrder(4) = -1 translate(2) = ..12 translate(-2) = ..8 diff --git a/test/types/range/userAPI/rangeAPItest.chpl b/test/types/range/userAPI/rangeAPItest.chpl index 0a10e5780611..e902c3588d23 100644 --- a/test/types/range/userAPI/rangeAPItest.chpl +++ b/test/types/range/userAPI/rangeAPItest.chpl @@ -32,10 +32,6 @@ proc testRangeAPI(lbl, r: range(?), idx, subr, offset=3, count=2) { writeln("isAmbiguous = ", ! r.isAligned()); writeln("contains(", idx, ") = ", r.contains(idx)); writeln("contains(", subr, ") = ", r.contains(subr)); - - - writeln("boundsCheck(", idx, ") = ", r.contains(idx)); - writeln("boundsCheck(", subr, ") = ", r.contains(subr)); writeln("indexOrder(", idx, ") = ", r.indexOrder(idx)); if (r.hasFirst()) then writeln("orderToIndex(", offset, ") = ", r.orderToIndex(offset)); diff --git a/test/types/range/userAPI/simpleRangeTest.good b/test/types/range/userAPI/simpleRangeTest.good index 058063a708d4..e235a65dbae9 100644 --- a/test/types/range/userAPI/simpleRangeTest.good +++ b/test/types/range/userAPI/simpleRangeTest.good @@ -1,5 +1,5 @@ rangeAPItest.chpl:3: In function 'testRangeAPI': -rangeAPItest.chpl:46: warning: invoking 'offset' on an unstrided range has no effect. +rangeAPItest.chpl:42: warning: invoking 'offset' on an unstrided range has no effect. simpleRangeTest.chpl:4: called as testRangeAPI(lbl: string, r: range(int(64),both,one), idx: int(64), subr: range(int(64),both,one), offset: int(64), count: int(64)) basic range ------------ @@ -28,8 +28,6 @@ isNat.Algned() = true isAmbiguous = false contains(4) = true contains(3..6) = true -boundsCheck(4) = true -boundsCheck(3..6) = true indexOrder(4) = 3 orderToIndex(3) = 4 expand(2) = -1..12 @@ -78,8 +76,6 @@ isNat.Algned() = true isAmbiguous = false contains(7) = true contains(5..13 by 2) = true -boundsCheck(7) = true -boundsCheck(5..13 by 2) = true indexOrder(7) = 3 orderToIndex(3) = 7 expand(2) = -1..22 by 2 @@ -128,8 +124,6 @@ isNat.Algned() = true isAmbiguous = false contains(14) = true contains(16..8 by -2) = true -boundsCheck(14) = true -boundsCheck(16..8 by -2) = true indexOrder(14) = 3 orderToIndex(3) = 14 expand(2) = -1..22 by -2 @@ -176,8 +170,6 @@ isNat.Algned() = true isAmbiguous = false contains(4) = true contains(3..6) = true -boundsCheck(4) = true -boundsCheck(3..6) = true indexOrder(4) = 3 orderToIndex(3) = 4 translate(2) = 3.. @@ -221,8 +213,6 @@ isNat.Algned() = true isAmbiguous = false contains(4) = true contains(3..6) = true -boundsCheck(4) = true -boundsCheck(3..6) = true indexOrder(4) = -1 translate(2) = ..12 translate(-2) = ..8 @@ -262,8 +252,6 @@ isNat.Algned() = true isAmbiguous = false contains(4) = true contains(3..6 by -1) = true -boundsCheck(4) = true -boundsCheck(3..6 by -1) = true indexOrder(4) = 6 orderToIndex(3) = 7 translate(2) = ..12 by -1 @@ -307,8 +295,6 @@ isNat.Algned() = true isAmbiguous = false contains(4) = true contains(3..6) = true -boundsCheck(4) = true -boundsCheck(3..6) = true indexOrder(4) = -1 translate(2) = .. translate(-2) = .. diff --git a/test/types/range/userAPI/simpleRangeTest.old.good b/test/types/range/userAPI/simpleRangeTest.old.good index 772fd7079d36..0a6eeff7cd65 100644 --- a/test/types/range/userAPI/simpleRangeTest.old.good +++ b/test/types/range/userAPI/simpleRangeTest.old.good @@ -1,12 +1,12 @@ rangeAPItest.chpl:3: In function 'testRangeAPI': -rangeAPItest.chpl:46: warning: invoking 'offset' on an unstrided range has no effect. +rangeAPItest.chpl:42: warning: invoking 'offset' on an unstrided range has no effect. simpleRangeTest.chpl:4: called as testRangeAPI(lbl: string, r: range(int(64),both,one), idx: int(64), subr: range(int(64),both,one), offset: int(64), count: int(64)) rangeAPItest.chpl:3: In function 'testRangeAPI': -rangeAPItest.chpl:89: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning +rangeAPItest.chpl:85: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning simpleRangeTest.chpl:6: called as testRangeAPI(lbl: string, r: range(int(64),both,negative), idx: int(64), subr: range(int(64),both,negative), offset: int(64), count: int(64)) rangeAPItest.chpl:3: In function 'testRangeAPI': -rangeAPItest.chpl:89: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning -rangeAPItest.chpl:90: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning +rangeAPItest.chpl:85: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning +rangeAPItest.chpl:86: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning simpleRangeTest.chpl:9: called as testRangeAPI(lbl: string, r: range(int(64),high,negOne), idx: int(64), subr: range(int(64),both,negOne), offset: int(64), count: int(64)) basic range ------------ @@ -35,8 +35,6 @@ isNat.Algned() = true isAmbiguous = false contains(4) = true contains(3..6) = true -boundsCheck(4) = true -boundsCheck(3..6) = true indexOrder(4) = 3 orderToIndex(3) = 4 expand(2) = -1..12 @@ -85,8 +83,6 @@ isNat.Algned() = true isAmbiguous = false contains(7) = true contains(5..13 by 2) = true -boundsCheck(7) = true -boundsCheck(5..13 by 2) = true indexOrder(7) = 3 orderToIndex(3) = 7 expand(2) = -1..22 by 2 @@ -135,8 +131,6 @@ isNat.Algned() = true isAmbiguous = false contains(14) = true contains(16..8 by -2) = true -boundsCheck(14) = true -boundsCheck(16..8 by -2) = true indexOrder(14) = 3 orderToIndex(3) = 14 expand(2) = -1..22 by -2 @@ -183,8 +177,6 @@ isNat.Algned() = true isAmbiguous = false contains(4) = true contains(3..6) = true -boundsCheck(4) = true -boundsCheck(3..6) = true indexOrder(4) = 3 orderToIndex(3) = 4 translate(2) = 3.. @@ -228,8 +220,6 @@ isNat.Algned() = true isAmbiguous = false contains(4) = true contains(3..6) = true -boundsCheck(4) = true -boundsCheck(3..6) = true indexOrder(4) = -1 translate(2) = ..12 translate(-2) = ..8 @@ -269,8 +259,6 @@ isNat.Algned() = true isAmbiguous = false contains(4) = true contains(3..6 by -1) = true -boundsCheck(4) = true -boundsCheck(3..6 by -1) = true indexOrder(4) = 6 orderToIndex(3) = 7 translate(2) = ..12 by -1 @@ -314,8 +302,6 @@ isNat.Algned() = true isAmbiguous = false contains(4) = true contains(3..6) = true -boundsCheck(4) = true -boundsCheck(3..6) = true indexOrder(4) = -1 translate(2) = .. translate(-2) = .. @@ -329,9 +315,9 @@ r[subr] == subr[r]= true r:string = .. Copying... = .. -rangeAPItest.chpl:89: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning; while slicing 1..20 by -2 with 16..8 by -2 -rangeAPItest.chpl:90: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning; while slicing 1..20 by -2 with 16..8 by -2 -rangeAPItest.chpl:90: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning; while slicing 16..8 by -2 with 1..20 by -2 -rangeAPItest.chpl:89: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning; while slicing ..10 by -1 with 3..6 by -1 -rangeAPItest.chpl:90: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning; while slicing ..10 by -1 with 3..6 by -1 -rangeAPItest.chpl:90: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning; while slicing 3..6 by -1 with ..10 by -1 +rangeAPItest.chpl:85: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning; while slicing 1..20 by -2 with 16..8 by -2 +rangeAPItest.chpl:86: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning; while slicing 1..20 by -2 with 16..8 by -2 +rangeAPItest.chpl:86: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning; while slicing 16..8 by -2 with 1..20 by -2 +rangeAPItest.chpl:85: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning; while slicing ..10 by -1 with 3..6 by -1 +rangeAPItest.chpl:86: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning; while slicing ..10 by -1 with 3..6 by -1 +rangeAPItest.chpl:86: warning: when slicing with a range with a negative stride, the sign of the stride of the original range or domain/array dimension is currently preserved, but will be negated in a future release; compile with -snewSliceRule to switch to this new rule and turn off this warning; while slicing 3..6 by -1 with ..10 by -1 diff --git a/test/types/range/userAPI/singleEnumAPITest.good b/test/types/range/userAPI/singleEnumAPITest.good index e70ac283691b..1e06f14cb621 100644 --- a/test/types/range/userAPI/singleEnumAPITest.good +++ b/test/types/range/userAPI/singleEnumAPITest.good @@ -25,8 +25,6 @@ isNat.Algned() = true isAmbiguous = false contains(red) = true contains(red..red) = true -boundsCheck(red) = true -boundsCheck(red..red) = true indexOrder(red) = 0 orderToIndex(0) = red interior(1) = red..red @@ -69,8 +67,6 @@ isNat.Algned() = true isAmbiguous = false contains(red) = false contains(red.. Date: Fri, 28 Jul 2023 13:41:24 -0500 Subject: [PATCH 8/8] Adding tests for deprecated features Signed-off-by: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com> --- test/deprecated/rangeDomainDeprecations.chpl | 19 +++++++++++++++++++ test/deprecated/rangeDomainDeprecations.good | 7 +++++++ 2 files changed, 26 insertions(+) create mode 100644 test/deprecated/rangeDomainDeprecations.chpl create mode 100644 test/deprecated/rangeDomainDeprecations.good diff --git a/test/deprecated/rangeDomainDeprecations.chpl b/test/deprecated/rangeDomainDeprecations.chpl new file mode 100644 index 000000000000..62b234e61e48 --- /dev/null +++ b/test/deprecated/rangeDomainDeprecations.chpl @@ -0,0 +1,19 @@ +const r1 = 1..4; +const r2 = 1..4; +const r3 = ..; +const idx = 3; + +// Testing 3 overloads of boundsCheck +r1.boundsCheck(idx); +r1.boundsCheck(r2); +r1.boundsCheck(r3); + +// Testing assignment between unbounded ranges +const r4: range(bool, boundKind.neither) = r3; +const r5: range(bool, boundKind.neither, strides = strideKind.any) = .. by 2; + +// Testing .dist deprecation +const d1 = {1..idx, 1..idx}; +d1.dist; +const d2 = {1..idx, 1..idx, idx..idx}; +d2.dist; diff --git a/test/deprecated/rangeDomainDeprecations.good b/test/deprecated/rangeDomainDeprecations.good new file mode 100644 index 000000000000..44b38c637e49 --- /dev/null +++ b/test/deprecated/rangeDomainDeprecations.good @@ -0,0 +1,7 @@ +rangeDomainDeprecations.chpl:7: warning: range.boundsCheck() is deprecated, please use range.contains() instead +rangeDomainDeprecations.chpl:8: warning: range.boundsCheck() is deprecated, consider using range.contains() instead +rangeDomainDeprecations.chpl:9: warning: range.boundsCheck() is deprecated, consider using range.contains() instead +rangeDomainDeprecations.chpl:12: warning: initializing an unbounded range with idxType bool from an unbounded range with idxType int(64) is deprecated +rangeDomainDeprecations.chpl:13: warning: initializing an unbounded range with idxType bool from an unbounded range with idxType int(64) is deprecated +rangeDomainDeprecations.chpl:17: warning: domain.dist is deprecated, please use domain.distribution instead +rangeDomainDeprecations.chpl:19: warning: domain.dist is deprecated, please use domain.distribution instead