Skip to navigation

holoscan::dlpack_dtype_item_size_bytes

Beta
View as Markdown
uint64_t holoscan::dlpack_dtype_item_size_bytes(
DLDataType dtype
) noexcept

Return the number of bytes occupied by one DLPack element.

Vectorized DLPack dtypes count all lanes as one logical element, so this helper rounds the bit-lane product up to a whole number of bytes.

Returns: The number of bytes occupied by one element.

Parameters

dtype
DLDataType

The DLPack dtype to inspect.