holoscan::utils::cuda::Buffer
holoscan::utils::cuda::Buffer
Base class for a buffer containing typed data.
Constructors
Buffer
Constructor with default type.
Parameters
data_type
Data type, defaults to Float32
device_id
GPU device ID, defaults to 0
Destructor
~Buffer
Methods
data
Get the data buffer.
Returns: Void pointer to the buffer
size
Get the size of the allocated buffer in elements.
Returns: size in elements
get_bytes
Get the bytes allocated.
Returns: allocated bytes
resize
Resize the underlying buffer.
Parameters
number_of_elements
Number of elements to be resized with
get_datatype
Get the datatype.
Returns: datatype
get_device
Get the device ID.
Returns: device ID