46 #ifndef DW_DNN_TENSOR_H_ 47 #define DW_DNN_TENSOR_H_ 61 #define DW_DNN_TENSOR_MAX_DIMENSIONS 9U 173 const uint32_t*
const indices, uint32_t
const numIndices,
174 uint32_t
const dimension, dwConstDNNTensorHandle_t
const tensorHandle);
247 #endif // DW_DNN_TENSOR_H_ DW_API_PUBLIC dwStatus dwDNNTensor_getLayoutView(size_t *const offset, size_t *const stride, size_t *const numElements, const uint32_t *const indices, uint32_t const numIndices, uint32_t const dimension, dwConstDNNTensorHandle_t const tensorHandle)
Returns coefficients to facilitate traversing the given dimension.
Exposes the content of a dwDNNTensorHandle_t.
dwTrivialDataType
Specifies a type indicator of the underlying trivial data type.
DW_API_PUBLIC dwStatus dwDNNTensor_getProperties(dwDNNTensorProperties *const properties, dwConstDNNTensorHandle_t const tensorHandle)
Retrieves the properties of a dwDNNTensorHandle_t.
bool isGPUMapped
Indicates whether the memory allocation should be mapped to GPU.
dwDNNTensorLayout tensorLayout
Tensor layout.
dwTrivialDataType dataType
Data type of elements of the tensor.
DW_API_PUBLIC dwStatus dwDNNTensor_lock(void **const data, dwDNNTensorHandle_t const tensorHandle)
Locks the tensor and retrieves pointer to the data with write access.
dwDNNTensorProperties prop
Defines the properties of the tensor.
DW_API_PUBLIC dwStatus dwDNNTensor_unlock(dwDNNTensorHandle_t const tensorHandle)
Unlocks the tensor, enabling other threads to lock the tensor and modify the content.
dwDNNTensorType
Speficies the type of a tensor.
dwStatus
Status definition.
DW_API_PUBLIC dwStatus dwDNNTensor_getTensor(dwDNNTensor *const tensor, dwDNNTensorHandle_t const tensorHandle)
Retrieves the dwDNNTensor of a dwDNNTensorHandle_t.
dwDNNTensorType tensorType
Tensor type.
DW_API_PUBLIC dwStatus dwDNNTensor_create(dwDNNTensorHandle_t *const tensorHandle, dwDNNTensorProperties const *const properties, dwContextHandle_t const ctx)
Creates and allocates resources for a dwDNNTensorHandle_t based on the properties.
#define DW_DNN_TENSOR_MAX_DIMENSIONS
Maximum number of dimensions a tensor can have including batch dimension (N).
uint32_t numDimensions
Number of dimensions of the tensor.
struct dwDNNTensorObject const * dwConstDNNTensorHandle_t
DW_API_PUBLIC dwStatus dwDNNTensor_destroy(dwDNNTensorHandle_t const tensorHandle)
Destroys the tensor handle and frees any memory created by dwDNNTensor_create().
Specifies DNNTensor properties.
Tensor with both interleaved and planar channels.
const void * ptr
Pointer to the tensor content on CPU/GPU or NvMedia.
struct dwContextObject * dwContextHandle_t
Context handle.
struct dwDNNTensorObject * dwDNNTensorHandle_t
Handles representing Deep Neural Network interface.
NVIDIA DriveWorks API: Core Methods
Planar tensor. This is the most common tensor layout.
DW_API_PUBLIC dwStatus dwDNNTensor_tryLock(bool *const isLocked, void **const data, dwDNNTensorHandle_t const tensorHandle)
Tries to lock the tensor.
dwDNNTensorLayout
Specifies the layout of a tensor Here the letters in the suffix define: