44 #ifndef DW_CORE_CONTEXT_H__ 45 #define DW_CORE_CONTEXT_H__ 47 #include <dw/core/Config.h> 50 #include <dw/core/Version.h> 52 #include <cuda_runtime_api.h> 313 dwContextHandle_t context);
331 dwContextHandle_t context);
370 #endif // DW_CORE_CONTEXT_H__ DW_API_PUBLIC dwStatus dwContext_getCurrentTime(dwTime_t *time, dwContextHandle_t ctx)
Returns the current timestamp.
DW_API_PUBLIC dwStatus dwContext_selectGPUDeviceType(dwGPUDeviceType deviceType, dwContextHandle_t context)
Selects a GPU device type either integrated or discreet, if available.
DW_API_PUBLIC dwStatus dwInitialize(dwContextHandle_t *context, dwVersion header_version, const dwContextParameters *params)
Creates and initializes an SDK context.
NVIDIA DriveWorks API: Core Types
dwGPUDeviceType
GPU device type defintions.
A set of parameters that is passed to the SDK to create the context.
enum cudaDeviceAttr cudaDeviceAttr
DW_API_PUBLIC dwStatus dwContext_isTimePTPSynchronized(dwBool *flag, dwContextHandle_t ctx)
Check if the used time source inside the context is synchronized over PTP.
DW_API_PUBLIC dwStatus dwContext_getGPUDeviceType(dwGPUDeviceType *deviceType, int32_t deviceNum, dwContextHandle_t context)
Returns the device type of the input GPU number.
uint64_t dwTime_t
Specifies a timestamp unit, in microseconds.
DW_API_PUBLIC dwStatus dwContext_getGPUAttribute(int32_t *value, cudaDeviceAttr attribute, int32_t deviceNum, dwContextHandle_t context)
Returns the value of the selected cuda attribute for the specific cuda device.
NVIDIA DriveWorks API: Core Exports
DW_API_PUBLIC dwStatus dwContext_getCUDAProperties(int32_t *driverVersion, int32_t *apiVersion, dwContextHandle_t context)
Returns Driver and Runtime API version of CUDA on the current machine.
dwStatus
Status definition.
DW_API_PUBLIC dwStatus dwContext_getNvMediaDevice(NvMediaDevice **device, dwContextHandle_t ctx)
Gets the NvMediaDevice used within the context.
DW_API_PUBLIC dwStatus dwContext_selectGPUDevice(int32_t deviceNumber, dwContextHandle_t context)
Selects a GPU device, if available.
DW_API_PUBLIC dwStatus dwGetLastError(const char **errorMsg)
Retrieves the last error encountered.
enum cudaTextureAddressMode cudaTextureAddressMode
DW_API_PUBLIC dwStatus dwContext_getGPUDeviceCurrent(int32_t *deviceNumber, dwContextHandle_t context)
Returns the currently selected GPU device.
DW_API_PUBLIC dwStatus dwReset(dwContextHandle_t context)
Resets the context.
const char * dataPath
Path where all DriveWorks related data required during runtime are stored.
DW_API_PUBLIC dwStatus dwContext_getGPUProperties(cudaDeviceProp *properties, int32_t deviceNum, dwContextHandle_t context)
Returns the properties for the specific cuda device.
struct dwContextObject * dwContextHandle_t
Context handle.
DW_API_PUBLIC dwStatus dwRelease(dwContextHandle_t *context)
Releases the context.
NvMediaDevice * nvmediaDevice
NvMedia device pointer or NULL if SDK should handle NvMedia context.
DW_API_PUBLIC dwStatus dwContext_setNvMediaDevice(NvMediaDevice *device, dwContextHandle_t ctx)
Sets NvMediaDevice to be used within the context.
struct dwContextObject const * dwConstContextHandle_t
DW_API_PUBLIC dwStatus dwContext_getGPUCount(int32_t *count, dwContextHandle_t context)
Get the avilable GPU devices count.
NVIDIA DriveWorks API: Core Status Methods
struct cudaDeviceProp cudaDeviceProp