NVIDIA DriveOS Linux NSR SDK API Reference

7.0.3.0 Release
Context.h File Reference

Detailed Description

NVIDIA DriveWorks API: Core Methods

Description: This file defines the core methods of the SDK.

Definition in file Context.h.

Go to the source code of this file.

Data Structures

struct  dwContextParameters
 A set of parameters that is passed to the SDK to create the context. More...
 
struct  dwCustomizedFileFunctions
 Data structure representing a customized FileStream that can be passed in. More...
 

Typedefs

typedef enum cudaDeviceAttr cudaDeviceAttr
 
typedef void * EGLDisplay
 
typedef struct dwContextObject * dwContextHandle_t
 Context handle. More...
 
typedef struct dwContextObject const * dwConstContextHandle_t
 The Driveworks context handle. More...
 
typedef struct dwModuleObject * dwModuleHandle_t
 The Generic Module Object Handle. More...
 
typedef struct dwModuleObject const * dwConstModuleHandle_t
 
typedef struct dwContextParameters dwContextParameters
 A set of parameters that is passed to the SDK to create the context. More...
 
typedef void * dwCustomizedFileHandle
 FileStream function pointers handle. More...
 
typedef void * dwDLAHandleArray
 cuDLA Device handle array pointer More...
 
typedef struct dwCustomizedFileFunctions dwCustomizedFileFunctions
 Data structure representing a customized FileStream that can be passed in. More...
 

Enumerations

enum  dwPTPStatus {
  DW_PTP_STATUS_NO_INIT_SYNC = 0,
  DW_PTP_STATUS_NO_ERROR,
  DW_PTP_STATUS_LOST_SYNC,
  DW_PTP_STATUS_INTERNAL_ERROR
}
 Defines PTP synchronization status. More...
 

Functions

DW_API_PUBLIC dwStatus dwContext_setCustomFileFunctions (dwContextHandle_t const context, dwCustomizedFileFunctions *const fileFunctionPtr)
 Set the customized fileStream function pointers in context. More...
 
DW_API_PUBLIC dwStatus dwGetLastError (char8_t const **const errorMsg)
 Retrieves the last error encountered. More...
 
DW_API_PUBLIC dwStatus dwGetLastCudaError (cudaError_t *const cudaError, char8_t const **const errorMsg)
 Retrieves the last CUDA error encountered. More...
 
DW_API_PUBLIC dwStatus dwInitialize (dwContextHandle_t *const context, dwVersion const headerVersion, dwContextParameters const *const params)
 Creates and initializes an SDK context. More...
 
DW_API_PUBLIC dwStatus dwRelease (dwContextHandle_t const context)
 Releases the context. More...
 
DW_API_PUBLIC dwStatus dwContext_getCurrentTime (dwTime_t *const time, dwContextHandle_t const context)
 Returns the current PTP timestamp. More...
 
DW_API_PUBLIC dwStatus dwContext_getCurrentTimeMono (dwTime_t *const time, dwContextHandle_t const context)
 Returns the current monotonic timestamp. More...
 
DW_API_PUBLIC dwStatus dwContext_getCurrentTimeUTC (dwTime_t *const time, dwContextHandle_t const context)
 Returns the current UTC timestamp. More...
 
DW_API_PUBLIC dwStatus dwContext_getTimeSource (dwTimeSourceHandle_t *const source, dwContextHandle_t const context)
 Retrieve time source used in the context. More...
 
DW_API_PUBLIC dwStatus dwContext_isTimePTPSynchronized (bool *const flag, dwContextHandle_t const context)
 Check if the used time source inside the context is synchronized over PTP. More...
 
DW_API_PUBLIC dwStatus dwContext_getTimePTPSynchronizationStatus (dwPTPStatus *const status, dwContextHandle_t const context)
 Get the PTP synchronization status of time source inside the context. More...
 
DW_API_PUBLIC dwStatus dwContext_sleepMonotonic (dwTime_t const sleepTimeUs)
 Sleep for a given time using a monotonic clock. More...
 
DW_API_PUBLIC dwStatus dwContext_selectGPUDevice (int32_t const deviceNumber, dwContextHandle_t const context)
 Selects a GPU device, if available. More...
 
DW_API_PUBLIC dwStatus dwContext_getGPUDeviceCurrent (int32_t *const deviceNumber, dwContextHandle_t const context)
 Returns the currently selected GPU device. More...
 
DW_API_PUBLIC dwStatus dwContext_getGPUCount (int32_t *const count, dwContextHandle_t const context)
 Get the available GPU devices count. More...
 
DW_API_PUBLIC dwStatus dwContext_getGPUProperties (dwGPUDeviceProperties *const properties, int32_t const deviceNum, dwContextHandle_t const context)
 Returns the properties for the specific CUDA device. More...
 
DW_API_PUBLIC dwStatus dwContext_getGPUAttribute (int32_t *const value, cudaDeviceAttr const attribute, int32_t const deviceNum, dwContextHandle_t const context)
 Returns the value of the selected CUDA attribute for the specific CUDA device. More...
 
DW_API_PUBLIC dwStatus dwContext_getGPUArchitecture (char8_t const **const architecture, dwContextHandle_t const context)
 Returns the architecture for the currently selected CUDA device. More...
 
DW_API_PUBLIC dwStatus dwContext_getCUDAProperties (int32_t *const driverVersion, int32_t *const apiVersion, dwContextHandle_t const context)
 Returns Driver and Runtime API version of CUDA on the current machine. More...
 
DW_API_PUBLIC dwStatus dwContext_getCUDAStream (cudaStream_t *stream, uint32_t streamIndex, dwContextHandle_t const context)
 Returns a preallocated CUDA stream. More...
 
DW_API_PUBLIC dwStatus dwContext_getGPUDeviceType (dwGPUDeviceType *const deviceType, int32_t const deviceNum, dwContextHandle_t const context)
 Returns the device type of the input GPU number. More...
 
DW_API_PUBLIC dwStatus dwContext_getDLAEngineCount (int32_t *const count, dwContextHandle_t const context)
 Get the available DLA engines count. More...
 
DW_API_PUBLIC dwStatus dwContext_setupCUDLA (uint16_t const *handleCountArray, uint16_t const handleCountArraySize, dwContextHandle_t const context)
 Setup CUDLA, create CUDLA Engine handles per request. More...
 
DW_API_PUBLIC dwStatus dwContext_getCUDLADeviceHandleArray (dwDLAHandleArray *const cudlaDeviceHandleArray, uint16_t *const cudlaDeviceHandleCount, uint16_t const engineId, dwContextHandle_t const context)
 Get the CUDLA Engine handles. More...
 
DW_API_PUBLIC dwStatus dwContext_getDataPath (char8_t const **const dataPath, dwContextHandle_t const context)
 Gets the initial data path of the library that contains the driveworks context. More...
 
DW_API_PUBLIC dwStatus dwContext_getUseVirtualTime (bool *const useVirtualTime, dwContextHandle_t const ctx)
 Check if in virtual time mode. More...
 
DW_API_PUBLIC dwStatus dwContext_getNvSciSyncModule (NvSciSyncModule *mod, dwContextHandle_t const context)
 Get the NvSciSync module. More...
 
DW_API_PUBLIC dwStatus dwContext_getNvSciBufModule (NvSciBufModule *mod, dwContextHandle_t const context)
 Get the nvscibuf module. More...
 
DW_API_PUBLIC dwStatus dwContext_getErrorSignal (dwErrorSignal *errorSignal, dwModuleHandle_t handle)
 Get the module error signal. More...
 

Typedef Documentation

◆ cudaDeviceAttr

Definition at line 56 of file Context.h.

◆ EGLDisplay

typedef void* EGLDisplay

Definition at line 59 of file Context.h.