From a2bb33299ffa78b56e3b88ce3c007bd53249b742 Mon Sep 17 00:00:00 2001 From: Jan Kotanski Date: Tue, 21 Oct 2025 11:42:14 +0200 Subject: [PATCH 1/4] fix strides on documentation pictures --- doc/source/images/hyperslab_1.svg | 125 +++++++++--------- doc/source/images/hyperslab_3.svg | 94 +++++++------ .../users_guide/dataspace_selections.rst | 8 +- test/dataspace/hyperslab_simple_test.cpp | 4 +- 4 files changed, 116 insertions(+), 115 deletions(-) diff --git a/doc/source/images/hyperslab_1.svg b/doc/source/images/hyperslab_1.svg index 439dc48821..c177979b71 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] + y="464.56244" + 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] + y="687.79077" + 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] diff --git a/doc/source/images/hyperslab_3.svg b/doc/source/images/hyperslab_3.svg index 4d0a14601b..52a45828b6 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] + y="464.56244" + 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); } From b227b10cc6fb70bf65de714a4cb2c7df48bd40d7 Mon Sep 17 00:00:00 2001 From: Jan Kotanski Date: Tue, 21 Oct 2025 11:46:18 +0200 Subject: [PATCH 2/4] update description --- doc/source/images/hyperslab_1.svg | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/source/images/hyperslab_1.svg b/doc/source/images/hyperslab_1.svg index c177979b71..2032b48b17 100644 --- a/doc/source/images/hyperslab_1.svg +++ b/doc/source/images/hyperslab_1.svg @@ -23,7 +23,7 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="2.8" - inkscape:cx="154.82143" + inkscape:cx="155.17857" inkscape:cy="160.71429" inkscape:document-units="px" inkscape:current-layer="layer1" @@ -353,18 +353,18 @@ block = [1,2] From a4b322d8a44d24975355d6e16b36077a2ab7b13d Mon Sep 17 00:00:00 2001 From: Jan Kotanski Date: Tue, 21 Oct 2025 11:47:10 +0200 Subject: [PATCH 3/4] update description --- doc/source/images/hyperslab_1.svg | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/doc/source/images/hyperslab_1.svg b/doc/source/images/hyperslab_1.svg index 2032b48b17..9841656cb4 100644 --- a/doc/source/images/hyperslab_1.svg +++ b/doc/source/images/hyperslab_1.svg @@ -23,7 +23,7 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="2.8" - inkscape:cx="155.17857" + inkscape:cx="155.53571" inkscape:cy="160.71429" inkscape:document-units="px" inkscape:current-layer="layer1" @@ -253,18 +253,18 @@ offset = [1,1] = [1,2] + offset = [1,1] From 519d950de0099d3bec26fe42f86fdda1aab74ed2 Mon Sep 17 00:00:00 2001 From: Jan Kotanski Date: Tue, 21 Oct 2025 11:48:15 +0200 Subject: [PATCH 4/4] update description --- doc/source/images/hyperslab_3.svg | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/source/images/hyperslab_3.svg b/doc/source/images/hyperslab_3.svg index 52a45828b6..0955729484 100644 --- a/doc/source/images/hyperslab_3.svg +++ b/doc/source/images/hyperslab_3.svg @@ -23,15 +23,15 @@ inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="5.6" - inkscape:cx="137.58929" - inkscape:cy="70.357143" + inkscape:cx="137.76786" + inkscape:cy="41.785714" inkscape:document-units="px" inkscape:current-layer="layer1" showgrid="true" inkscape:window-width="1920" - inkscape:window-height="1099" - inkscape:window-x="0" - inkscape:window-y="32" + inkscape:window-height="1163" + inkscape:window-x="1920" + inkscape:window-y="0" inkscape:window-maximized="1" fit-margin-top="0" fit-margin-left="0" @@ -253,18 +253,18 @@ offset = [1,1]