48 #ifndef DW_CORE_CONTEXT_H_ 49 #define DW_CORE_CONTEXT_H_ 56 #include <cuda_runtime_api.h> 139 void (*close)(dwCustomizedFileHandle hnd);
140 size_t (*write)(dwCustomizedFileHandle hnd,
const void* ptr,
size_t size);
141 size_t (*read)(dwCustomizedFileHandle hnd,
void* ptr,
size_t size);
142 bool (*getString)(dwCustomizedFileHandle hnd,
char8_t* ptr,
size_t size);
143 size_t (*size)(dwCustomizedFileHandle hnd);
144 size_t (*getPosition)(dwCustomizedFileHandle hnd);
145 void (*setPosition)(dwCustomizedFileHandle hnd,
size_t size);
146 bool (*eof)(dwCustomizedFileHandle hnd);
147 bool (*error)(dwCustomizedFileHandle hnd);
148 void (*flush)(dwCustomizedFileHandle hnd);
343 dwContextHandle_t context);
363 dwContextHandle_t context);
501 #endif // DW_CORE_CONTEXT_H_ struct cudaDeviceProp cudaDeviceProp
NVIDIA DriveWorks API: Core Types
DW_API_PUBLIC dwStatus dwContext_getUseVirtualTime(bool *useVirtualTime, dwContextHandle_t context)
Check if in virtual time mode.
bool enablePVA
if true, PVA platform will be enabled.
DW_API_PUBLIC dwStatus dwInitialize(dwContextHandle_t *context, dwVersion header_version, const dwContextParameters *params)
Creates and initializes an SDK context.
bool useVirtualTime
if true, the context's time source will be a virtual clock.
enum cudaDeviceAttr cudaDeviceAttr
DW_API_PUBLIC dwStatus dwContext_getPVAEngineCount(uint32_t *count, dwContextHandle_t context)
Get the available PVA engines count.
dwGPUDeviceType
GPU device type definitions.
A set of parameters that is passed to the SDK to create the context.
DW_API_PUBLIC dwStatus dwContext_getDLAEngineCount(int32_t *count, dwContextHandle_t context)
Get the available DLA engines count.
DW_API_PUBLIC dwStatus dwContext_getGPUDeviceType(dwGPUDeviceType *deviceType, int32_t deviceNum, dwContextHandle_t context)
Returns the device type of the input GPU number.
DW_API_PUBLIC dwStatus dwRelease(dwContextHandle_t context)
Releases the context.
DW_API_PUBLIC dwStatus dwContext_getCurrentTime(dwTime_t *time, dwContextHandle_t context)
Returns the current timestamp.
bool skipCudaInit
if true will skip CUDA initialization in the context
DW_API_PUBLIC dwStatus dwContext_getDataPath(const char8_t **dataPath, dwContextHandle_t context)
Gets the data path of the library that contains the driveworks context.
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.
enum cudaTextureAddressMode cudaTextureAddressMode
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 dwGetLastError(const char8_t **errorMsg)
Retrieves the last error encountered.
NVIDIA DriveWorks API: Core Version Information
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
DW_API_PUBLIC dwStatus dwContext_selectGPUDevice(int32_t deviceNumber, dwContextHandle_t context)
Selects a GPU device, if available.
bool enableCudaTaskGraph
if true, Cuda task-graph will be used where possible.
DW_API_PUBLIC dwStatus dwContext_isTimePTPSynchronized(bool *flag, dwContextHandle_t context)
Check if the used time source inside the context is synchronized over PTP.
DW_API_PUBLIC dwStatus dwContext_setCustomFileFunctions(dwContextHandle_t context, dwCustomizedFileFunctions *fileFunctionPtr)
Set the customized fileStream function pointers in context.
DW_API_PUBLIC dwStatus dwContext_getGPUArchitecture(const char8_t **architecture, dwContextHandle_t context)
Returns the architecture for the currently selected CUDA device.
DW_API_PUBLIC dwStatus dwContext_getGPUDeviceCurrent(int32_t *deviceNumber, dwContextHandle_t context)
Returns the currently selected GPU device.
void * dwCustomizedFileHandle
FileStream function pointers handle.
DW_API_PUBLIC dwStatus dwContext_advanceTime(dwTime_t newTime, dwContextHandle_t context)
Advances the virtual time to newTime.
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.
Data structure representing a customize FileStream that can be passed in.
struct dwContextObject const * dwConstContextHandle_t
DW_API_PUBLIC dwStatus dwContext_getGPUCount(int32_t *count, dwContextHandle_t context)
Get the available GPU devices count.
NVIDIA DriveWorks API: Core Status Methods
NVIDIA DriveWorks API: Core Exports
const char8_t * dataPath
Path where all DriveWorks related data required during runtime are stored.