Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rhornung67 committed Apr 11, 2023
1 parent 98e0bc9 commit ca4ec81
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ The Axom project release numbers follow [Semantic Versioning](http://semver.org/
intersection between a primitive and a `Tetrahedron`
- Primal: Adds a `primal::Polyhedron::from_primitive()` operator that returns a
`Polyhedron` object from a given primitive.
- Adds `DataStore::getBufferInfo()` and `Group::getDataInfo` methods that insert information into a conduit Node about buffers in a datastore object or data in a group subtree. The information can be accessed from the Node by the caller from specifically named fields in the Node.
- Adds `DataStore::getBufferInfo()` and `Group::getDataInfo` methods that insert information into a Conduit `Node` about buffers in a `DataStore` object or data in a `Group` subtree. The information can be accessed from the `Node` by the caller from specifically named fields in the `Node`.


### Changed
Expand Down
6 changes: 6 additions & 0 deletions src/axom/sidre/core/Group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1043,6 +1043,12 @@ class Group
* \brief Method to (recursively) accumulate information about data in
* a Group subtree.
*
* \param n Conduit node in which to insert accumulated data
* \param buffer_ids std::set used to gather set of unique buffer ids
* for reporting total bytes in buffers
* \param recursive boolean value indicating whether to recurse to child
* groups of this group.
*
* \sa getDataInfo
*/
void getDataInfoHelper(Node& n,
Expand Down
5 changes: 4 additions & 1 deletion src/axom/sidre/docs/sphinx/query_data.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ contains. For example::

conduit::Node n;
ds->getBufferInfo(n);
n.print(); // print Conduit node contents to std out, if desired

This method call inserts four fields into the Node that have numeric values
accessible as type ``axom::IndexType``. For example::
Expand Down Expand Up @@ -58,11 +59,13 @@ with the entire group subtree rooted at the group. For example::
// get information about a single group
conduit::Node n;
group->getDataInfo(n, recursive);
n.print(); // print Conduit node contents to std out, if desired

// get information about entire subtree rooted at group
recursive = true;
conduit::Node n1;
group->getDataInfo(n1, recursive);
n1.print(); // print Conduit node contents to std out, if desired

Similar to the ``Datastore::getBufferInfo`` method described above, the
``Group::getDataInfo`` method inserts fields into the given Conduit Node
Expand Down Expand Up @@ -92,7 +95,7 @@ entire group subtree:
* ``num_views_scalar`` : Number of views associated with a single scalar data item.
* ``num_views_string`` : Number of views associated with string data.
* ``num_bytes_assoc_with_views`` : Total number of bytes associated with views (buffer, string, and scalar). Note that this may be an over-count if two or more views share a buffer and their data overlap, for example.
* ``num_bytes_external`` : Total number of bytes described by external views. Note that this may be an over-count if two or more views share an external allocation and their data overlaps, for example.
* ``num_bytes_external`` : Total number of bytes described by external views. Note that this may be an over-count. For example, if two or more views share an external allocation and their data overlaps more bytes may be reported than exist.
* ``num_bytes_in_buffers`` : Total number of bytes allocated in buffers that are attached to views. Each buffer is counted exactly once if attached to multiple views.

.. important:: ``num_bytes_assoc_with_views`` and ``num_bytes_external`` may over-count the actual data that exists. For example, if two or more views share a buffer or if two or more views share an external allocation and the view data overlaps in either case.

0 comments on commit ca4ec81

Please sign in to comment.