NVIDIA DRIVE OS Linux SDK API Reference

5.1.12.0 Release

 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
nvmedia_tensor.h File Reference

Detailed Description

NVIDIA Media Interface: Tensor Processing

Description: This file contains the NvMedia Tensor Processing API.

Definition in file nvmedia_tensor.h.

Go to the source code of this file.

Data Structures

struct  NvMediaTensorTaskStatus
 Holds the status of the latest operation for a tensor. More...
 
struct  NvMediaTensorAttr
 Holds tensor creation attributes. More...
 
struct  NvMediaTensorSurfaceMap
 Defines the tensor surface map descriptor used by NvMediaTensorLock(). More...
 

Macros

#define NVMEDIA_TENSOR_VERSION_MAJOR   (1u)
 Major version number. More...
 
#define NVMEDIA_TENSOR_VERSION_MINOR   (3u)
 Minor version number. More...
 
#define NVMEDIA_TENSOR_TIMEOUT_INFINITE
 Infinite time-out for NvMediaTensorGetStatus() More...
 
#define NVM_TENSOR_ATTR_CPU_ACCESS_UNCACHED   (0x00000001u)
 Specifies that the tensor CPU accesses are uncached (mapped). More...
 
#define NVM_TENSOR_ATTR_CPU_ACCESS_CACHED   (0x00000002u)
 Specifies that the tensor CPU accesses are cacheable (mapped). More...
 
#define NVM_TENSOR_ATTR_CPU_ACCESS_UNMAPPED   (0x00000003u)
 Specifies that the tensor CPU accesses are unmapped from the virtual address space of the current process. More...
 
#define NVM_TENSOR_ATTR_ALLOC_RESERVED   (0x00000010u)
 Specifies that the tensor allocation is on CVRAM. More...
 
#define NVM_TENSOR_ATTR_ALLOC_NONE   (0x00000000u)
 Specifies that the tensor allocation is on Soc DRAM. More...
 
#define NVM_TENSOR_INIT_ATTR(x)
 A helper macro to initialize tensor creation attributes. More...
 
#define NVM_TENSOR_DEFINE_ATTR(x)
 A helper macro to define tensor creation attributes. More...
 
#define NVM_TENSOR_SET_ATTR_4D(attr, N, C, H, W, order, datatype, bpe, accesstype, alloctype, X)
 A helper macro to set 4-D tensor creation attributes. More...
 

Typedefs

typedef struct NvMediaTensor NvMediaTensor
 A handle representing tensor objects. More...
 

Enumerations

enum  NvMediaTensorAttrType {
  NVM_TENSOR_ATTR_DATA_TYPE = 0,
  NVM_TENSOR_ATTR_BITS_PER_ELEMENT,
  NVM_TENSOR_ATTR_DIMENSION_ORDER,
  NVM_TENSOR_ATTR_CPU_ACCESS,
  NVM_TENSOR_ATTR_ALLOC_TYPE,
  NVM_TENSOR_ATTR_4D_N,
  NVM_TENSOR_ATTR_4D_C,
  NVM_TENSOR_ATTR_4D_H,
  NVM_TENSOR_ATTR_4D_W,
  NVM_TENSOR_ATTR_4D_X,
  NVM_TENSOR_ATTR_MAX
}
 Defines attribute types for creating NvMedia Tensor. More...
 
enum  NvMediaTensorLockAccess {
  NVMEDIA_TENSOR_ACCESS_READ = (1 << 0),
  NVMEDIA_TENSOR_ACCESS_WRITE = (1 << 1),
  NVMEDIA_TENSOR_ACCESS_READ_WRITE = (NVMEDIA_TENSOR_ACCESS_READ | NVMEDIA_TENSOR_ACCESS_WRITE)
}
 Defines tensor lock access types. More...
 

Functions

void NvMediaTensorDestroy (NvMediaTensor *tensorDesc)
 Destroys a tensor object previously created by NvMediaTensorCreateFromNvSciBuf(). More...
 
NvMediaStatus NvMediaTensorLock (NvMediaTensor *tensor, uint32_t lockAccessType, NvMediaTensorSurfaceMap *surfaceMap)
 Locks a tensor and returns the associated mapped pointers pointing to the tensor surface data. More...
 
void NvMediaTensorUnlock (NvMediaTensor *tensor)
 Unlocks a tensor. More...
 
NvMediaStatus NvMediaTensorGetStatus (NvMediaTensor *tensor, uint32_t millisecondWait, NvMediaTensorTaskStatus *status)
 Gets the status of the current/last operation for the tensor, and optionally waits for the operation to complete or time out. More...
 
NvMediaStatus NvMediaTensorGetMetaData (NvMediaTensor *tensor, NvMediaTensorMetaData *tensormetadata)
 Fills in the metadata information for the tensor. More...