diff --git a/doc/source/images/hyperslab_1.svg b/doc/source/images/hyperslab_1.svg index 439dc48821..9841656cb4 100644 --- a/doc/source/images/hyperslab_1.svg +++ b/doc/source/images/hyperslab_1.svg @@ -2,19 +2,19 @@ + inkscape:version="1.2.2 (b0a8486541, 2022-12-01)" + sodipodi:docname="hyperslab_1.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> + fit-margin-bottom="0" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1"> offsetoffset = [1,1] + x="11.272243" + y="454.53021" + style="font-size:16px;line-height:1.25;font-family:sans-serif;text-align:center;text-anchor:middle;fill:#0963ff;fill-opacity:1;stroke:none"> = [1,1] + d="m 34.22756,503.54088 v 78.0378" + style="fill:none;stroke:#0963ff;stroke-width:1.17324px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow2Mstartf);marker-end:url(#Arrow2Mendr)" /> + style="fill:none;stroke:#0963ff;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="M 255.03645,442.7296 V 499.421 Z" /> + d="m 170.23161,451.19638 h 84.01057" + style="fill:none;stroke:#0963ff;stroke-width:1.72155px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> stride=2 + style="font-size:16px;line-height:1.25;font-family:sans-serif;text-align:center;text-anchor:middle;fill:#0963ff;fill-opacity:1;stroke:none">stride=3 stride=1 + x="209.36137" + y="439.93408" + style="font-size:16px;line-height:1.25;font-family:sans-serif;text-align:center;text-anchor:middle;fill:#0963ff;fill-opacity:1;stroke:none">stride=3 blockblock = [1,2] + x="15.723868" + y="669.90991" + style="font-size:16px;line-height:1.25;font-family:sans-serif;text-align:center;text-anchor:middle;fill:#0963ff;fill-opacity:1;stroke:none"> = [1,2] + offset = [1,1] diff --git a/doc/source/images/hyperslab_3.svg b/doc/source/images/hyperslab_3.svg index 4d0a14601b..0955729484 100644 --- a/doc/source/images/hyperslab_3.svg +++ b/doc/source/images/hyperslab_3.svg @@ -2,19 +2,19 @@ + inkscape:version="1.2.2 (b0a8486541, 2022-12-01)" + sodipodi:docname="hyperslab_3.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:dc="http://purl.org/dc/elements/1.1/"> + fit-margin-bottom="0" + inkscape:showpageshadow="2" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1"> image/svg+xml - + @@ -249,25 +252,24 @@ style="fill:#000bfc;fill-opacity:1;stroke:#0963ff;stroke-width:1.5;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker-end:url(#Arrow2Mendp7)" /> offsetoffset = [1,1] + x="11.933275" + y="454.7164" + style="font-size:16px;line-height:1.25;font-family:sans-serif;text-align:center;text-anchor:middle;fill:#0963ff;fill-opacity:1;stroke:none"> = [1,1] + d="m 35.43307,501.9478 v 82.02238" + style="fill:none;stroke:#0963ff;stroke-width:1.20282px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;marker-start:url(#Arrow2Mstartf);marker-end:url(#Arrow2Mendr)" /> stride=2 + style="font-size:16px;line-height:1.25;font-family:sans-serif;text-align:center;text-anchor:middle;fill:#0963ff;fill-opacity:1;stroke:none" + id="tspan470">stride=3 stride=3 + style="font-size:16px;line-height:1.25;font-family:sans-serif;text-align:center;text-anchor:middle;fill:#0963ff;fill-opacity:1;stroke:none" + id="tspan466">stride=4 diff --git a/doc/source/users_guide/dataspace_selections.rst b/doc/source/users_guide/dataspace_selections.rst index a6d1ecd48e..48fde613d3 100644 --- a/doc/source/users_guide/dataspace_selections.rst +++ b/doc/source/users_guide/dataspace_selections.rst @@ -44,7 +44,7 @@ which are characterized by 4 quantities * *block* the number of elements along each dimension of the original dataspace in a signle block * *count* the number of blocks along each dimension -* *stride* the offset between each block. +* *stride* the step between each block including a size of the block Lets have a look on the following example with a original dataspace of shape (9,10). @@ -59,7 +59,7 @@ have the following parameters * *offset* = [1,1] * *block* = [1,2] * *count* = [3,3] -* *stride* = [2,1] +* *stride* = [3,3] To construct such a hyperslab you could use @@ -69,7 +69,7 @@ To construct such a hyperslab you could use Dimensions offset{1,1}; Dimensions block{1,2}; Dimensions count{3,3}; - Dimensions stride{2,1}; + Dimensions stride{3,3}; dataspace::Hyperslab{offset,block,count,stride}; For details of how to manipulate or alter an instance of @@ -108,7 +108,7 @@ The constructor call for such a selection would look like this .. code-block:: cpp Dimensions offset{1,1}; - Dimensions stride{2,3}; + Dimensions stride{3,4}; Dimensions count{3,3}; dataspace::Hyperslab{offset,count,stride}; diff --git a/test/dataspace/hyperslab_simple_test.cpp b/test/dataspace/hyperslab_simple_test.cpp index 97963e8cec..d9916382c2 100644 --- a/test/dataspace/hyperslab_simple_test.cpp +++ b/test/dataspace/hyperslab_simple_test.cpp @@ -221,10 +221,10 @@ SCENARIO("Hyperslab modifications") { REQUIRE_THAT(h.block(), Catch::Matchers::Equals(Dimensions{3, 4})); } } - WHEN("trying to set the offset for index 2") { + WHEN("trying to set the block for index 2") { REQUIRE_THROWS_AS(h.block(2, 0), std::runtime_error); } - WHEN("trying to set the offset to {1") { + WHEN("trying to set the block to {1") { REQUIRE_THROWS_AS(h.block({1}), std::runtime_error); }