Defined in File gxf_tensor.hpp
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.
- inline GXFMemoryBuffer(nvidia::gxf::MemoryBuffer &&other)
- nvidia::gxf::Tensor::stride_array_t gxf_strides
Strides of the GXF Tensor.
- 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.