NVIDIA DeepStream SDK API Reference

9.2 Release
TensorWrapper Class Reference

Detailed Description

Public Member Functions

 TensorWrapper ()
 
 TensorWrapper (Tensor *tensor)
 
 TensorWrapper (py::object object, std::string format)
 
std::vector< uint64_t > shape_vec () const
 
std::vector< int64_t > strides_vec () const
 
py::tuple shape () const
 
py::tuple strides () const
 
Tensor::DataType c_dtype () const
 
py::dtype dtype () const
 
py::capsule dlpack (PyObject *py_object_ptr, py::object stream)
 
std::pair< int, int > dlpackDevice () const
 
Buffer wrap (ColorFormat format)
 
TensorWrapper * clone () const
 
Tensor * release ()
 
uint64_t size () const
 
TensorWrapper * toGPU (unsigned int device_id) const
 
std::string deviceType () const
 
void * data () const
 
bool hasTensor () const
 
 TensorWrapper ()
 
 TensorWrapper (Tensor *tensor)
 
 TensorWrapper (py::object object, std::string format)
 
std::vector< uint64_t > shape_vec () const
 
std::vector< int64_t > strides_vec () const
 
py::tuple shape () const
 
py::tuple strides () const
 
Tensor::DataType c_dtype () const
 
py::dtype dtype () const
 
py::capsule dlpack (PyObject *py_object_ptr, py::object stream)
 
std::pair< int, int > dlpackDevice () const
 
Buffer wrap (ColorFormat format)
 
TensorWrapper * clone () const
 
Tensor * release ()
 
uint64_t size () const
 
TensorWrapper * toGPU (unsigned int device_id) const
 
std::string deviceType () const
 
void * data () const
 
bool hasTensor () const
 

Protected Attributes

unique_ptr< Tensor > tensor_
 

Constructor & Destructor Documentation

◆ TensorWrapper() [1/6]

TensorWrapper::TensorWrapper ( )
inline

◆ TensorWrapper() [2/6]

TensorWrapper::TensorWrapper ( Tensor *  tensor)
inlineexplicit

◆ TensorWrapper() [3/6]

TensorWrapper::TensorWrapper ( py::object  object,
std::string  format 
)
inlineexplicit

◆ TensorWrapper() [4/6]

TensorWrapper::TensorWrapper ( )
inline

◆ TensorWrapper() [5/6]

TensorWrapper::TensorWrapper ( Tensor *  tensor)
inlineexplicit

◆ TensorWrapper() [6/6]

TensorWrapper::TensorWrapper ( py::object  object,
std::string  format 
)
inlineexplicit

Member Function Documentation

◆ c_dtype() [1/2]

Tensor::DataType TensorWrapper::c_dtype ( ) const
inline

Definition at line 136 of file service-maker/sources/python/src/bindings/tensor.h.

References tensor_.

◆ c_dtype() [2/2]

Tensor::DataType TensorWrapper::c_dtype ( ) const
inline

Definition at line 136 of file 9.2/service-maker/sources/python/src/bindings/tensor.h.

References tensor_.

◆ clone() [1/2]

TensorWrapper* TensorWrapper::clone ( ) const
inline

◆ clone() [2/2]

TensorWrapper* TensorWrapper::clone ( ) const
inline

◆ data() [1/2]

void* TensorWrapper::data ( ) const
inline

◆ data() [2/2]

void* TensorWrapper::data ( ) const
inline

◆ deviceType() [1/2]

std::string TensorWrapper::deviceType ( ) const
inline

◆ deviceType() [2/2]

std::string TensorWrapper::deviceType ( ) const
inline

◆ dlpack() [1/2]

py::capsule TensorWrapper::dlpack ( PyObject *  py_object_ptr,
py::object  stream 
)
inline

Definition at line 160 of file 9.2/service-maker/sources/python/src/bindings/tensor.h.

References dtype(), FLOAT, and tensor_.

◆ dlpack() [2/2]

py::capsule TensorWrapper::dlpack ( PyObject *  py_object_ptr,
py::object  stream 
)
inline

Definition at line 160 of file service-maker/sources/python/src/bindings/tensor.h.

References dtype(), FLOAT, and tensor_.

Referenced by module_tensor_bind().

◆ dlpackDevice() [1/2]

std::pair<int, int> TensorWrapper::dlpackDevice ( ) const
inline

◆ dlpackDevice() [2/2]

std::pair<int, int> TensorWrapper::dlpackDevice ( ) const
inline

◆ dtype() [1/2]

py::dtype TensorWrapper::dtype ( ) const
inline

Definition at line 140 of file 9.2/service-maker/sources/python/src/bindings/tensor.h.

References dtype(), FLOAT, and tensor_.

◆ dtype() [2/2]

py::dtype TensorWrapper::dtype ( ) const
inline

◆ hasTensor() [1/2]

bool TensorWrapper::hasTensor ( ) const
inline

◆ hasTensor() [2/2]

bool TensorWrapper::hasTensor ( ) const
inline

◆ release() [1/2]

Tensor* TensorWrapper::release ( )
inline

◆ release() [2/2]

Tensor* TensorWrapper::release ( )
inline

◆ shape() [1/2]

py::tuple TensorWrapper::shape ( ) const
inline

Definition at line 117 of file service-maker/sources/python/src/bindings/tensor.h.

References tensor_.

Referenced by module_tensor_bind(), and shape().

◆ shape() [2/2]

py::tuple TensorWrapper::shape ( ) const
inline

Definition at line 117 of file 9.2/service-maker/sources/python/src/bindings/tensor.h.

References shape(), and tensor_.

◆ shape_vec() [1/2]

std::vector<uint64_t> TensorWrapper::shape_vec ( ) const
inline

Definition at line 105 of file 9.2/service-maker/sources/python/src/bindings/tensor.h.

References tensor_.

◆ shape_vec() [2/2]

std::vector<uint64_t> TensorWrapper::shape_vec ( ) const
inline

Definition at line 105 of file service-maker/sources/python/src/bindings/tensor.h.

References tensor_.

◆ size() [1/2]

uint64_t TensorWrapper::size ( ) const
inline

◆ size() [2/2]

uint64_t TensorWrapper::size ( ) const
inline

◆ strides() [1/2]

py::tuple TensorWrapper::strides ( ) const
inline

Definition at line 127 of file service-maker/sources/python/src/bindings/tensor.h.

References tensor_.

Referenced by module_tensor_bind(), strides(), and strides_vec().

◆ strides() [2/2]

py::tuple TensorWrapper::strides ( ) const
inline

Definition at line 127 of file 9.2/service-maker/sources/python/src/bindings/tensor.h.

References strides(), and tensor_.

◆ strides_vec() [1/2]

std::vector<int64_t> TensorWrapper::strides_vec ( ) const
inline

Definition at line 109 of file 9.2/service-maker/sources/python/src/bindings/tensor.h.

References strides(), and tensor_.

◆ strides_vec() [2/2]

std::vector<int64_t> TensorWrapper::strides_vec ( ) const
inline

Definition at line 109 of file service-maker/sources/python/src/bindings/tensor.h.

References strides(), and tensor_.

◆ toGPU() [1/2]

TensorWrapper* TensorWrapper::toGPU ( unsigned int  device_id) const
inline

◆ toGPU() [2/2]

TensorWrapper* TensorWrapper::toGPU ( unsigned int  device_id) const
inline

◆ wrap() [1/2]

Buffer TensorWrapper::wrap ( ColorFormat  format)
inline

◆ wrap() [2/2]

Buffer TensorWrapper::wrap ( ColorFormat  format)
inline

Field Documentation

◆ tensor_

unique_ptr< Tensor > TensorWrapper::tensor_
protected

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