conduit
conduit copied to clipboard
DataType::element_index vs DataType::element_offset?
https://github.com/LLNL/conduit/blob/09818d87230b8158b0796d387ea27f901ab6f5fb/src/libs/conduit/conduit_data_type.hpp#L401
Comment from use in the wild:
// element_index is extremely misleading. Its actually the byte offset to / the element.
The implementation is:
offset + stride * idx
Should we deprecate and add the following replacement method:
// offset (including striding calculation) to element at given index in bytes
index_t element_offset(index_t idx)