|
NVIDIA DriveOS Linux NSR SDK API Reference
|
7.0.3.0 Release
|
Go to the documentation of this file.
29 #ifndef DW_DNN_TENSOR_H_
30 #define DW_DNN_TENSOR_H_
32 #include <dw/core/context/Context.h>
44 #define DW_DNN_TENSOR_MAX_DIMENSIONS 8U
156 uint8_t*
const extMem,
157 size_t const stride);
200 const uint32_t*
const indices, uint32_t
const numIndices,
326 #endif // DW_DNN_TENSOR_H_
struct dwDNNTensorObject * dwDNNTensorHandle_t
Handles representing Deep Neural Network interface.
dwDNNTensorProperties prop
Defines the properties of the tensor.
DW_API_PUBLIC dwStatus dwDNNTensor_getProperties(dwDNNTensorProperties *const properties, dwConstDNNTensorHandle_t const tensorHandle)
Retrieves the properties of a dwDNNTensorHandle_t.
dwDNNTensorType
Speficies the type of a tensor.
DW_API_PUBLIC dwPointCloudRangeImageCreatorParams const *const const dwContextHandle_t ctx
@ DW_DNN_TENSOR_COLORSPACE_UNKNOWN
dwTrivialDataType dataType
Data type of elements of the tensor.
const void * ptr
Pointer to the tensor content on CPU/GPU or NvMedia.
DW_API_PUBLIC dwStatus dwDNNTensor_getTimestamp(dwTime_t *const time, dwDNNTensorHandle_t const tensorHandle)
Retrieves the timestamp of a dwDNNTensorHandle_t.
dwDNNTensorColorSpace
Represents the color space the data is represented in. If unknown, then its custom or non color data.
dwDNNTensorLayout tensorLayout
Tensor layout.
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
float float32_t
Specifies POD types.
DW_API_PUBLIC dwStatus dwDNNTensor_setTimestamp(dwTime_t time, dwDNNTensorHandle_t const tensorHandle)
Set timestamp of a dwDNNTensorHandle_t.
dwDNNTensorColorSpace colorSpace
Color space of the data in the tensor.
Specifies DNNTensor properties.
DW_API_PUBLIC dwStatus dwDNNTensor_unlock(dwDNNTensorHandle_t const tensorHandle)
Unlocks the tensor, enabling other threads to lock the tensor and modify the content.
@ DW_DNN_TENSOR_COLORSPACE_RGB
@ DW_DNN_TENSOR_LAYOUT_NHWC
Interleaved tensor.
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.
DW_API_PUBLIC dwStatus dwDNNTensor_createWithExtMem(dwDNNTensorHandle_t *const tensorHandle, dwDNNTensorProperties const *const properties, uint8_t *const extMem, size_t const stride)
Creates a dwDNNTensorHandle_t with external memory resources based on the properties.
@ DW_DNN_TENSOR_LAYOUT_NCHW
Planar tensor. This is the most common tensor layout.
dwDNNTensorLayout
Specifies the layout of a tensor Here the letters in the suffix define:
dwDNNTensorType tensorType
Tensor type.
#define DW_DNN_TENSOR_MAX_DIMENSIONS
Maximum number of dimensions a tensor can have including batch dimension (N).
DW_API_PUBLIC dwStatus dwDNNTensor_destroy(dwDNNTensorHandle_t const tensorHandle)
Destroys the tensor handle and frees any memory created by dwDNNTensor_create() or dwDNNTensor_create...
@ DW_DNN_TENSOR_TYPE_CPU
CPU tensor.
DW_API_PUBLIC dwStatus dwDNNTensor_tryLock(bool *const isLocked, void **const data, dwDNNTensorHandle_t const tensorHandle)
Tries to lock the tensor.
struct dwContextObject * dwContextHandle_t
Context handle.
@ DW_DNN_TENSOR_LAYOUT_NCHWx
Tensor with both interleaved and planar channels.
bool isGPUMapped
Indicates whether the memory allocation should be mapped to GPU.
struct dwDNNTensorObject const * dwConstDNNTensorHandle_t
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.
dwStatus
Status definition.
Exposes the content of a dwDNNTensorHandle_t.
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.
uint32_t numDimensions
Number of dimensions of the tensor.
@ DW_DNN_TENSOR_TYPE_CUDA
CUDA tensor.
dwTime_t timestamp_us
Specifies a timestamp, in microseconds, corresponding to this tensor data.
DW_API_PUBLIC dwStatus dwDNNTensor_getTensor(dwDNNTensor *const tensor, dwDNNTensorHandle_t const tensorHandle)
Retrieves the dwDNNTensor of a dwDNNTensorHandle_t.
@ DW_DNN_TENSOR_COLORSPACE_YUV