ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
DLManagedTensorVersioned Struct Reference

A versioned and managed C Tensor object, manage memory of DLTensor. More...

#include <DLPack.h>

Collaboration diagram for DLManagedTensorVersioned:

Public Attributes

DLPackVersion version
 The API and ABI version of the current managed Tensor. More...
 
void * manager_ctx
 the context of the original host framework. More...
 
void(* deleter )(struct DLManagedTensorVersioned *self)
 Destructor. More...
 
uint64_t flags
 Additional bitmask flags information about the tensor. More...
 
DLTensor dl_tensor
 DLTensor which is being memory managed. More...
 

Detailed Description

A versioned and managed C Tensor object, manage memory of DLTensor.

This data structure is intended to facilitate the borrowing of DLTensor by another framework. It is not meant to transfer the tensor. When the borrowing framework doesn't need the tensor, it should call the deleter to notify the host that the resource is no longer needed.

Note
This is the current standard DLPack exchange data structure.

Definition at line 366 of file DLPack.h.

Member Data Documentation

◆ deleter

void(* DLManagedTensorVersioned::deleter) (struct DLManagedTensorVersioned *self)

Destructor.

This should be called to destruct manager_ctx which holds the DLManagedTensorVersioned. It can be NULL if there is no way for the caller to provide a reasonable destructor. The destructor deletes the argument self as well.

Definition at line 386 of file DLPack.h.

Referenced by cloudViewer::core::pybind_core_tensor().

◆ dl_tensor

DLTensor DLManagedTensorVersioned::dl_tensor

DLTensor which is being memory managed.

Definition at line 400 of file DLPack.h.

◆ flags

uint64_t DLManagedTensorVersioned::flags

Additional bitmask flags information about the tensor.

By default the flags should be set to 0.

Note
Future ABI changes should keep everything until this field stable, to ensure that deleter can be correctly called.
See also
DLPACK_FLAG_BITMASK_READ_ONLY
DLPACK_FLAG_BITMASK_IS_COPIED

Definition at line 398 of file DLPack.h.

◆ manager_ctx

void* DLManagedTensorVersioned::manager_ctx

the context of the original host framework.

Stores DLManagedTensorVersioned is used in the framework. It can also be NULL.

Definition at line 377 of file DLPack.h.

◆ version

DLPackVersion DLManagedTensorVersioned::version

The API and ABI version of the current managed Tensor.

Definition at line 370 of file DLPack.h.

Referenced by cloudViewer::core::pybind_core_tensor().


The documentation for this struct was generated from the following file: