Open3D (C++ API)  0.19.0
Data Fields
DLManagedTensorVersioned Struct Reference

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

#include <DLPack.h>

Data Fields

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.

Field 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.

◆ dl_tensor

DLTensor DLManagedTensorVersioned::dl_tensor

DLTensor which is being memory managed.

◆ 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

◆ 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.

◆ version

DLPackVersion DLManagedTensorVersioned::version

The API and ABI version of the current managed Tensor.


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