NVIDIA Holoscan SDK v1.0.3
Holoscan 1.0.3

Class GXFMemoryBuffer

Base Type

  • public nvidia::gxf::MemoryBuffer

class GXFMemoryBuffer : public nvidia::gxf::MemoryBuffer

Class to wrap the nvidia::gxf::MemoryBuffer object.

This class inherits nvidia::gxf::MemoryBuffer and is used with DLManagedTensorCtx class to wrap the GXF Tensor.

A shared pointer to this class in DLManagedTensorCtx class is used as the deleter of the DLManagedTensorCtx::memory_ref

When the last reference to the DLManagedTensorCtx object is released, DLManagedTensorCtx::memory_ref will also be destroyed, which will call the deleter function of the DLManagedTensor object.

This class holds shape and strides data of DLTensor object so that the data is released together with the DLManagedTensor object.

Public Functions

inline explicit GXFMemoryBuffer(nvidia::gxf::MemoryBuffer &&other)

Public Members

std::vector<int64_t> dl_shape

Shape of the GXF Tensor.

std::vector<int64_t> dl_strides

Strides of the GXF Tensor. This is used to calculate the strides of the DLTensor.

Previous Class GXFInputContext
Next Class GXFNetworkContext
© Copyright 2022-2023, NVIDIA. Last updated on Apr 19, 2024.