Skip to content
Open
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 38 additions & 31 deletions docs/doxygen/dox/H5.format.4.0.dox
Original file line number Diff line number Diff line change
Expand Up @@ -7597,16 +7597,16 @@
<td colspan="4"><br />Data Address<sup>O</sup> <em>(optional)</em><br /><br /></td>
</tr>
<tr align="center">
<td colspan="4">Dimension 0 Size</td>
<td colspan="4">Dimension 1 Size</td>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't these stay 0-based and instead "Dimension #n" below should be changed to n - 1? Otherwise, this seems to conflict with the text below that uses "(n - 1)" when referring to dimensions stored.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you look at the field "dimensionality" description, "For chunked storage, the value stored is one greater than the dataset’s actual number of dimemsions. For example, a 1-dimensional dataset stores a value of 2. This increment accounts for the dataset element size which occupies the final dimension entry."

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But assuming indices are still 0-based here, what's stored is the sizes for dimension 0..(n-1) and the dataset element size just happens to be an extra element in that "array".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you mentioned above conflicting with the text "(n-1)" which line are you referring to?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this diff it's line 7700. That text pretty much states what I'd expect: For an n-dimensional dataset (for n >= 2), dimensions 0..(n-1) are stored and then the dataset element size is stored. The dataset element size is part of the dimensions "array", but it's not really a dimension itself.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So actually I should have the following:
In the layout table:
"Dimension 0 Size, Dimension 1 size,.... Dimension (n-1) size, Dataset element size"

And in the description table:

For chunked storage, the dimensions define the size of a single chunk. They are in units of array elements (not bytes). The first dimension stored in the list of dimensions is the slowest changing dimension and the (n - 1) dimension stored is the fastest changing dimension.
For an n-dimensional dataset (for n >= 2), dimensions 0..(n-1) are stored and then the dataset element size is stored. The dataset element size is part of the dimensions "array", but it's not really a dimension itself.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Dimension 0 Size, Dimension 1 size,.... Dimension (n-1) size, Dataset element size"

Yes, this part is what I think the layout table should say.

For an n-dimensional dataset (for n >= 2), dimensions 0..(n-1) are stored and then the dataset element size is stored. The dataset element size is part of the dimensions "array", but it's not really a dimension itself.

These were just my own words summarizing the encoding; I think the text currently in the description table in this diff is fine as is and you don't need to add these words.

</tr>
<tr align="center">
<td colspan="4">Dimension 1 Size</td>
<td colspan="4">Dimension 2 Size</td>
</tr>
<tr align="center">
<td colspan="4">...</td>
</tr>
<tr>
<td colspan="4">Dataset Element Size <em>(optional)</em></td>
<tr align="center">
<td colspan="4">Dimension \#n Size</td>
</tr>
<tr>
<td colspan="4">Compact Data Size <em>(optional)</em></td>
Expand Down Expand Up @@ -7652,8 +7652,10 @@
<tr valign=top>
<td>Dimensionality</td>
<td>An array has a fixed dimensionality. This field specifies the number of dimension size fields later
in the message. The value stored for chunked storage is 1 greater than the number of dimensions in
the dataset&rsquo;s dataspace. For example, 2 is stored for a 1 dimensional dataset.</td>
in the message.
<br />For chunked storage, the value stored is one greater than the dataset&rsquo;s actual number of
dimemsions. For example, a 1-dimensional dataset stores a value of 2.

Check failure on line 7657 in docs/doxygen/dox/H5.format.4.0.dox

View workflow job for this annotation

GitHub Actions / Check for spelling errors

dimemsions ==> dimensions
This increment accounts for the dataset element size which occupies the final dimension entry.</td>
</tr>
<tr valign=top>
<td>Layout Class</td>
Expand Down Expand Up @@ -7688,14 +7690,15 @@
</tr>
<tr valign=top>
<td>Dimension \#n Size</td>
<td>For contiguous and compact storage the dimensions define the entire size of the array while for chunked storage
they define the size of a single chunk. In all cases, they are in units of array elements (not bytes). The
first dimension stored in the list of dimensions is the slowest changing dimension and the last dimension
stored is the fastest changing dimension.</td>
</tr>
<tr>
<td>Dataset Element Size</td>
<td>The size of a dataset element, in bytes. This field is only present for chunked storage.</td>
<td>For contiguous and compact storage the dimensions define the entire size of the array.
They are in units of array elements (not bytes).
The first dimension stored in the list of dimensions is the slowest changing dimension and the last dimension
stored is the fastest changing dimension.
<br />For chunked storage, the dimensions define the size of a single chunk. They are in
units of array elements (not bytes).
The first dimension stored in the list of dimensions is the slowest changing dimension and the
(n - 1) dimension stored is the fastest changing dimension.
The last dimension stored is the dataset element size.</td>
</tr>
<tr>
<td>Compact Data Size</td>
Expand Down Expand Up @@ -7870,20 +7873,17 @@
<td colspan="4"><br />Address<sup>O</sup><br /><br /></td>
</tr>
<tr>
<td colspan="4">Dimension 0 Size</td>
<td colspan="4">Dimension 1 Size</td>
</tr>
<tr>
<td colspan="4">Dimension 1 Size</td>
<td colspan="4">Dimension 2 Size</td>
</tr>
<tr>
<td colspan="4">...</td>
</tr>
<tr>
<td colspan="4">Dimension \#n Size</td>
</tr>
<tr>
<td colspan="4">Dataset Element Size</td>
</tr>
</table>
\li Items marked with an &lsquo;O&rsquo; in the above table are of the size specified in
&ldquo;@ref FMT4SizeOfOffsetsV0 "Size of Offsets"&rdquo; field in the superblock.
Expand All @@ -7896,8 +7896,11 @@
</tr>
<tr>
<td>Dimensionality</td>
<td>>A chunk has a fixed dimensionality. This field specifies the number of dimension size fields
later in the message.</td>
<td>A chunk has a fixed dimensionality.
This field specifies the number of dimension size fields
later in the message. The value stored is 1 greater than the dataset&rsquo;s actual
number of dimensions. For example, a 1-dimensional dataset stores a value of 2.
This increment accounts for the dataset element size which occupies the final dimension entry.</td>
</tr>
<tr>
<td>Address</td>
Expand All @@ -7910,11 +7913,8 @@
<td>Dimension \#n Size</td>
<td>These values define the dimension size of a single chunk, in units of array elements (not bytes).
The first dimension stored in the list of dimensions is the slowest changing dimension and the
last dimension stored is the fastest changing dimension.</td>
</tr>
<tr>
<td>Dataset Element Size</td>
<td>The size of a dataset element, in bytes.</td>
(n - 1) dimension stored is the fastest changing dimension.
The final dimension stored is the dataset element size.</td>
</tr>
</table>

Expand Down Expand Up @@ -8037,10 +8037,10 @@
<td bgcolor=#DDDDDD><em>This space inserted only to align table nicely</em></td>
</tr>
<tr>
<td colspan="4"><br />Dimension 0 Size <em>(variable size)</em><br /><br /></td>
<td colspan="4"><br />Dimension 1 Size <em>(variable size)</em><br /><br /></td>
</tr>
<tr>
<td colspan="4"><br />Dimension 1 Size <em>(variable size)</em><br /><br /></td>
<td colspan="4"><br />Dimension 2 Size <em>(variable size)</em><br /><br /></td>
</tr>
<tr>
<td colspan="4"><br />...<br /><br /></td>
Expand Down Expand Up @@ -8088,8 +8088,14 @@
</tr>
<tr>
<td>Dimensionality</td>
<td>A chunk has fixed dimension. This field specifies the number of <em>Dimension Size</em> fields
later in the message.</td>
<td>A chunk has a fixed dimensionality.
This field specifies the number of dimension size fields
later in the message.
The value stored is 1 greater than the dataset&rsquo;s actual
number of dimensions. For example, a 1-dimensional dataset stores a value of 2.
This increment accounts for the dataset element size which occupies the final dimension entry.
</td>
</tr>
</tr>
<tr>
<td>Dimension Size Encoded Length</td>
Expand All @@ -8099,7 +8105,8 @@
<td>Dimension \#n Size</td>
<td>These values define the dimension size of a single chunk, in units of array elements (not bytes).
The first dimension stored in the list of dimensions is the slowest changing dimension and the
last dimension stored is the fastest changing dimension.</td>
(n - 1) dimension stored is the fastest changing dimension.
The final dimension stored is the dataset element size.</td>
</tr>
<tr>
<td>Chunk Indexing Type</td>
Expand Down
Loading