holoscan::utils::cuda::DeviceBuffer
holoscan::utils::cuda::DeviceBuffer
CUDA Device Buffer Class.
Inherits from: holoscan::utils::cuda::Buffer (public)
Constructors
DeviceBuffer
Construction with size
Deleted overloads
Construction with size.
Parameters
size
Memory size to be allocated in bytes
device_id
GPU device ID, defaults to 0
Destructor
~DeviceBuffer
Destructor.
Assignment operators
operator=
Deleted overloads
The following overloads are deleted to prevent misuse:
Methods
data
Buffer class virtual members implemented by this class.
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
host_data
Copies data from device to host after allocating the host memory.
get_datatype
Get the datatype.
Returns: datatype
get_device
Get the device ID.
Returns: device ID