tvm
Public Attributes | Protected Attributes | List of all members
tvm::runtime::NDArray::ContainerBase Class Reference

The container base structure contains all the fields except for the Object header. More...

#include <ndarray.h>

Inheritance diagram for tvm::runtime::NDArray::ContainerBase:
Collaboration diagram for tvm::runtime::NDArray::ContainerBase:

Public Attributes

DLTensor dl_tensor
 The corresponding dl_tensor field. More...
 
void * manager_ctx {nullptr}
 additional context, reserved for recycling More...
 

Protected Attributes

ShapeTuple shape_
 The shape container, can be used for shape data. More...
 

Detailed Description

The container base structure contains all the fields except for the Object header.

Note
We explicitly declare this structure in order to pass PackedFunc argument using ContainerBase*.

Member Data Documentation

◆ dl_tensor

DLTensor tvm::runtime::NDArray::ContainerBase::dl_tensor

The corresponding dl_tensor field.

Note
it is important that the first field is DLTensor So that this data structure is DLTensor compatible. The head ptr of this struct can be viewed as DLTensor*.

◆ manager_ctx

void* tvm::runtime::NDArray::ContainerBase::manager_ctx {nullptr}

additional context, reserved for recycling

Note
We can attach additional content here which the current container depend on (e.g. reference to original memory when creating views).

◆ shape_

ShapeTuple tvm::runtime::NDArray::ContainerBase::shape_
protected

The shape container, can be used for shape data.


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