diff --git a/test/release/examples/primers/chplvis/chplvis2.chpl b/test/release/examples/primers/chplvis/chplvis2.chpl index 4b679301404b..6940d0ed8907 100644 --- a/test/release/examples/primers/chplvis/chplvis2.chpl +++ b/test/release/examples/primers/chplvis/chplvis2.chpl @@ -13,7 +13,7 @@ proc main() { // Create a couple of domains and a block mapped data array. const Domain = { 1 .. ncells }; - const mapDomain = Domain dmapped blockDist(Domain); + const mapDomain = blockDist.createDomain(Domain); var data : [mapDomain] int = 1; @@ -23,7 +23,7 @@ proc main() { // First computation step ... a simple forall // Even though the data is distributed, the computation is // on Locale 0. chplvis shows no computation on locales - // other than 0. Domain is not dmapped. + // other than 0. Domain is not distributed. forall i in Domain with (ref data) do data[i] += here.id + 1; // Write the result, we want to see the results of the above diff --git a/test/release/examples/primers/chplvis/chplvis3.chpl b/test/release/examples/primers/chplvis/chplvis3.chpl index 2635642fed92..bdaa47108102 100644 --- a/test/release/examples/primers/chplvis/chplvis3.chpl +++ b/test/release/examples/primers/chplvis/chplvis3.chpl @@ -27,12 +27,13 @@ const space = {1..n, 1..n}; const bspace = {0..n+1, 0..n+1}; const bsouth = {n+1..n+1, 1..n}; -// Dmapped versions of the domains -const R = space dmapped blockDist(boundingBox=bspace); -const BigR = bspace dmapped blockDist(boundingBox=bspace); -const South = bsouth dmapped blockDist(boundingBox=bspace); +// distributed versions of the domains +const bd = new blockDist(boundingBox=bspace); +const R = bd.createDomain(space); +const BigR = bd.createDomain(bspace); +const South = bd.createDomain(bsouth); -// Dmapped arrays +// distributed arrays var A : [BigR] real; var Temp : [R] real; var Diff : [R] real; diff --git a/test/release/examples/primers/chplvis/chplvis4.chpl b/test/release/examples/primers/chplvis/chplvis4.chpl index 623179a9ac7d..fc684c83dc88 100644 --- a/test/release/examples/primers/chplvis/chplvis4.chpl +++ b/test/release/examples/primers/chplvis/chplvis4.chpl @@ -8,7 +8,7 @@ use VisualDebug; use BlockDist; const space = { 0 .. #numLocales }; -const Dspace = space dmapped blockDist (boundingBox=space); +const Dspace = blockDist.createDomain(space); startVdebug("E4"); diff --git a/test/release/examples/primers/distributions.chpl b/test/release/examples/primers/distributions.chpl index 5d3c8dbbbc18..400d6143f8f0 100644 --- a/test/release/examples/primers/distributions.chpl +++ b/test/release/examples/primers/distributions.chpl @@ -54,9 +54,25 @@ const Space = {1..n, 1..n}; // domain. // const BlkDist = new blockDist(boundingBox=Space); -const BlockSpace = Space dmapped BlkDist; +const BlockSpace = BlkDist.createDomain(); var BA: [BlockSpace] int; +/* +The above could also be shortened to one of the following for convenience: + +.. code-block:: chapel + + const BlockSpace = blockDist.createDomain(Space); + const BA: [BlockSpace] int; + +or: + +.. code-block:: chapel + + const BA = blockDist.createArray(Space); + +*/ + // // To illustrate how the index set is distributed across locales, // we'll use a forall loop to initialize each array element to the @@ -124,7 +140,7 @@ var MyLocales: [MyLocaleView] locale = reshape(Locales, MyLocaleView); // const BlkDist2 = new blockDist(boundingBox=Space, targetLocales=MyLocales); -const BlockSpace2 = Space dmapped BlkDist2; +const BlockSpace2 = BlkDist2.createDomain(Space); var BA2: [BlockSpace2] int; // @@ -161,9 +177,26 @@ for (L, ML) in zip(BA2.targetLocales(), MyLocales) do // indices that precede the distribution's starting index. // const CycDist = new cyclicDist(startIdx=Space.low); -const CyclicSpace = Space dmapped CycDist; +const CyclicSpace = CycDist.createDomain(Space); var CA: [CyclicSpace] int; +/* +As with ``blockDist``, the above could also be shortened to one of the +following expressions for convenience: + +.. code-block:: chapel + + const CyclicSpace = cyclicDist.createDomain(Space); + const CA: [CyclicSpace] int; + +or:c + +.. code-block:: chapel + + const CA = cyclicDist.createArray(Space); + +*/ + forall ca in CA do ca = here.id; diff --git a/test/release/examples/primers/forallLoops.chpl b/test/release/examples/primers/forallLoops.chpl index 3d1cb7e2e433..ba0de612b333 100644 --- a/test/release/examples/primers/forallLoops.chpl +++ b/test/release/examples/primers/forallLoops.chpl @@ -150,14 +150,14 @@ Its parallel iterator will determine how this loop is parallelized. if A were a distributed array, its parallel iterator would also determine iteration locality. -Domains declared without a ``dmapped`` clause, including -default rectangular and default associative domains, as well as -arrays over such domains, provide both serial and parallel +Domains declared without a distribution (see :ref:`primers-distributions`), +including default rectangular and default associative domains, +as well as arrays over such domains, provide both serial and parallel iterators. So do domains distributed over standard distributions, -such as blockDist and cyclicDist (:ref:`primers-distributions`), and -arrays over such domains. The parallel iterators provided -by standard distributions place each loop iteration on the -locale where the corresponding index or array element is placed. +such as blockDist and cyclicDist, and arrays over such domains. The +parallel iterators provided by standard distributions place each loop +iteration on the locale where the corresponding index or array element +is placed. Task Intents and Shadow Variables ---------------------------------