Function utils::datasetRank

Function Documentation

auto utils::datasetRank(hid_t grp, const std::string &name, const std::string &context) -> int

Get the rank (number of dimensions) of a dataset without reading its data.

Parameters:
  • grp – Handle to the group (or already-open file) containing the dataset

  • name – Name of the dataset

  • context – Prefix used in thrown error messages (typically the name of the calling class or function)

Returns:

The dataset’s rank