diff --git a/doc/source/images/CMakeLists.txt b/doc/source/images/CMakeLists.txt index 83684c9c06..d6aff3f3bb 100644 --- a/doc/source/images/CMakeLists.txt +++ b/doc/source/images/CMakeLists.txt @@ -10,6 +10,9 @@ set(IMAGES attribute_manager_uml.png hdf5_node_types.svg hdf5_dataspaces.svg hdf5_selections.svg + static_dataspace.svg + dynamic_dataspace_bounded.svg + dynamic_dataspace_unbounded.svg ) add_sphinx_source(${IMAGES}) diff --git a/doc/source/images/dynamic_dataspace_bounded.svg b/doc/source/images/dynamic_dataspace_bounded.svg new file mode 100644 index 0000000000..cf857c09d5 --- /dev/null +++ b/doc/source/images/dynamic_dataspace_bounded.svg @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + diff --git a/doc/source/images/dynamic_dataspace_unbounded.svg b/doc/source/images/dynamic_dataspace_unbounded.svg new file mode 100644 index 0000000000..93e00505fd --- /dev/null +++ b/doc/source/images/dynamic_dataspace_unbounded.svg @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + diff --git a/doc/source/images/static_dataspace.svg b/doc/source/images/static_dataspace.svg new file mode 100644 index 0000000000..6d8b9934b3 --- /dev/null +++ b/doc/source/images/static_dataspace.svg @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + diff --git a/doc/source/users_guide/dataspace.rst b/doc/source/users_guide/dataspace.rst index faccd40e34..29ebd6938d 100644 --- a/doc/source/users_guide/dataspace.rst +++ b/doc/source/users_guide/dataspace.rst @@ -106,6 +106,10 @@ To create a simple dataspace with fixed dimensions use Dimensions current = space.current_dimensions(); // {2,3} Dimensions maximum = space.maximum_dimensions(); // {2,3} too +.. figure:: ../images/static_dataspace.svg + :align: center + :width: 20% + which will result in a dataspace of rank 2 with 6 elements. To build an extensible dataspace with fixed bounds we could use @@ -113,10 +117,14 @@ extensible dataspace with fixed bounds we could use using namespace hdf5; - dataspace::Simple space({2,3},{10,100}); + dataspace::Simple space({2,3},{10,10}); space.current_dimensions(); // {2,3} - space.maximum_dimensions(); // {10,100} + space.maximum_dimensions(); // {10,10} + +.. figure:: ../images/dynamic_dataspace_bounded.svg + :align: center + :width: 40% Finally, for an extensible dataspace with an unlimited number of elements along a dimension we could use @@ -127,6 +135,10 @@ along a dimension we could use dataspace::Simple space({1},{dataspace::Simple::UNLIMITED}); +.. figure:: ../images/dynamic_dataspace_unbounded.svg + :align: center + :width: 30% + The initial size of the dataspace would be 1. However, we could extend it as much as we want (basically can). We will see later how to use this feature along with datasets.