Struct DLManagedTensorCtx

struct DLManagedTensorCtx

Class that wraps a DLManagedTensor with a memory data reference.

This class is used to wrap a DLManagedTensor (tensor) with a shared pointer to the memory data (memory_ref). This is useful when the memory data is not owned by the DLManagedTensor, but its lifetime is tied to the DLManagedTensor.

In Holoscan SDK, this class is used to wrap a DLManagedTensor that is created by other libraries, such as CuPy, with a shared pointer to the memory data so that the memory data is reference counted and can be safely used/destroyed by the Holoscan SDK.

Public Members

DLManagedTensor tensor

The DLManagedTensor to wrap.

std::shared_ptr<void> memory_ref

The memory data reference.

© Copyright 2022, NVIDIA. Last updated on Jun 28, 2023.