DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

Tensor.h File Reference

Detailed Description

NVIDIA DriveWorks API: DNNTensor Structures and Methods

Description: This file defines DNNTensor structures and methods

Definition in file Tensor.h.

Go to the source code of this file.

Data Structures

struct  dwDNNTensor
 Exposes the content of a dwDNNTensorHandle_t. More...
 
struct  dwDNNTensorProperties
 Specifies DNNTensor properties. More...
 

Macros

#define DW_DNN_TENSOR_MAX_DIMENSIONS   9
 Maximum number of dimensions a tensor can have including batch dimension (N). More...
 

Typedefs

typedef struct dwDNNTensorObject const * dwConstDNNTensorHandle_t
 
typedef struct dwDNNTensorObject * dwDNNTensorHandle_t
 Handles representing Deep Neural Network interface. More...
 

Enumerations

enum  dwDNNTensorLayout {
  DW_DNN_TENSOR_LAYOUT_NCHW = 0,
  DW_DNN_TENSOR_LAYOUT_NHWC = 1,
  DW_DNN_TENSOR_LAYOUT_NCHWx = 2
}
 Specifies the layout of a tensor Here the letters in the suffix define: More...
 
enum  dwDNNTensorType {
  DW_DNN_TENSOR_TYPE_CPU = 0,
  DW_DNN_TENSOR_TYPE_CUDA = 1,
  DW_DNN_TENSOR_TYPE_NVMEDIA = 2
}
 Speficies the type of a tensor. More...
 

Functions

DW_API_PUBLIC dwStatus dwDNNTensor_create (dwDNNTensorHandle_t *tensorHandle, dwDNNTensorProperties properties, dwContextHandle_t ctx)
 Creates and allocates resources for a dwDNNTensorHandle_t based on the properties. More...
 
DW_API_PUBLIC dwStatus dwDNNTensor_destroy (dwDNNTensorHandle_t tensorHandle)
 Destroys the tensor handle and frees any memory created by dwDNNTensor_create(). More...
 
DW_API_PUBLIC dwStatus dwDNNTensor_getLayoutView (size_t *offset, size_t *stride, size_t *numElements, const uint32_t *indices, uint32_t numIndices, uint32_t dimension, const dwConstDNNTensorHandle_t tensorHandle)
 Returns coefficients to facilitate traversing the given dimension. More...
 
DW_API_PUBLIC dwStatus dwDNNTensor_getProperties (dwDNNTensorProperties *properties, dwConstDNNTensorHandle_t tensorHandle)
 Retrieves the properties of a dwDNNTensorHandle_t. More...
 
DW_API_PUBLIC dwStatus dwDNNTensor_getTensor (dwDNNTensor *tensor, dwDNNTensorHandle_t tensorHandle)
 Retrieves the dwDNNTensor of a dwDNNTensorHandle_t. More...
 
DW_API_PUBLIC dwStatus dwDNNTensor_lock (void **data, dwDNNTensorHandle_t tensorHandle)
 Locks the tensor and retrieves pointer to the data with write access. More...
 
DW_API_PUBLIC dwStatus dwDNNTensor_tryLock (bool *isLocked, void **data, dwDNNTensorHandle_t tensorHandle)
 Tries to lock the tensor. More...
 
DW_API_PUBLIC dwStatus dwDNNTensor_unlock (dwDNNTensorHandle_t tensorHandle)
 Unlocks the tensor, enabling other threads to lock the tensor and modify the content. More...