48#ifndef DW_CORE_CONTEXT_H_
49#define DW_CORE_CONTEXT_H_
58#include <cuda_runtime_api.h>
NVIDIA DriveWorks API: Timer
NVIDIA DriveWorks API: Core Status Methods
NVIDIA DriveWorks API: Core Types
NVIDIA DriveWorks API: Core Version Information
struct cudaDeviceProp cudaDeviceProp
enum cudaDeviceAttr cudaDeviceAttr
enum cudaTextureAddressMode cudaTextureAddressMode
NVIDIA DriveWorks API: Core Exports
const char8_t * dataPath
Path where all DriveWorks related data required during runtime are stored.
bool enablePVA
if true, PVA platform will be enabled.
bool skipCudaInit
if true will skip CUDA initialization in the context
bool enableCudaTaskGraph
if true, Cuda task-graph will be used where possible.
bool useVirtualTime
if true, the context's time source will be a virtual clock.
DW_API_PUBLIC dwStatus dwInitialize(dwContextHandle_t *const context, dwVersion const headerVersion, dwContextParameters const *const params)
Creates and initializes an SDK context.
DW_API_PUBLIC dwStatus dwRelease(dwContextHandle_t const context)
Releases the context.
DW_API_PUBLIC dwStatus dwContext_getUseVirtualTime(bool *const useVirtualTime, dwContextHandle_t const ctx)
Check if in virtual time mode.
DW_API_PUBLIC dwStatus dwContext_getGPUDeviceCurrent(int32_t *const deviceNumber, dwContextHandle_t const context)
Returns the currently selected GPU device.
struct dwModuleObject * dwModuleHandle_t
DW_API_PUBLIC dwStatus dwContext_setCustomFileFunctions(dwContextHandle_t const context, dwCustomizedFileFunctions *const fileFunctionPtr)
Set the customized fileStream function pointers in context.
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.
DW_API_PUBLIC dwStatus dwContext_getGPUCount(int32_t *const count, dwContextHandle_t const context)
Get the available GPU devices count.
struct dwContextObject const * dwConstContextHandle_t
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.
DW_API_PUBLIC dwStatus dwContext_getDLAEngineCount(int32_t *const count, dwContextHandle_t const context)
Get the available DLA engines count.
struct dwModuleObject const * dwConstModuleHandle_t
DW_API_PUBLIC dwStatus dwContext_getGPUArchitecture(char8_t const **const architecture, dwContextHandle_t const context)
Returns the architecture for the currently selected CUDA device.
DW_API_PUBLIC dwStatus dwContext_selectGPUDevice(int32_t const deviceNumber, dwContextHandle_t const context)
Selects a GPU device, if available.
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.
DW_API_PUBLIC dwStatus dwContext_getGPUProperties(cudaDeviceProp *const properties, int32_t const deviceNum, dwContextHandle_t const context)
Returns the properties for the specific CUDA device.
DW_API_PUBLIC dwStatus dwContext_getCurrentTime(dwTime_t *const time, dwContextHandle_t const context)
Returns the current timestamp.
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.
DW_API_PUBLIC dwStatus dwGetLastError(char8_t const **const errorMsg)
Retrieves the last error encountered.
struct dwContextObject * dwContextHandle_t
Context handle.
DW_API_PUBLIC dwStatus dwContext_advanceTime(dwTime_t const newTime, dwContextHandle_t const context)
Advances the virtual time to newTime.
DW_API_PUBLIC dwStatus dwContext_getTimeSource(dwTimeSourceHandle_t *const source, dwContextHandle_t const context)
Retrieve time source used in the context.
void * dwCustomizedFileHandle
FileStream function pointers handle.
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.
A set of parameters that is passed to the SDK to create the context.
dwStatus
Status definition.
dwGPUDeviceType
GPU device type definitions Only applicable on Drive platforms.
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
struct dwTimeSourceObject * dwTimeSourceHandle_t
Data structure representing a customized FileStream that can be passed in.
size_t(* read)(dwCustomizedFileHandle hnd, void *ptr, size_t size)
void(* setPosition)(dwCustomizedFileHandle hnd, size_t size)
dwCustomizedFileHandle(* open)(const char8_t *ptr1, const char8_t *ptr2)
size_t(* write)(dwCustomizedFileHandle hnd, const void *ptr, size_t size)
size_t(* size)(dwCustomizedFileHandle hnd)
bool(* getString)(dwCustomizedFileHandle hnd, char8_t *ptr, size_t size)
void(* flush)(dwCustomizedFileHandle hnd)
bool(* error)(dwCustomizedFileHandle hnd)
bool(* eof)(dwCustomizedFileHandle hnd)
void(* close)(dwCustomizedFileHandle hnd)
size_t(* getPosition)(dwCustomizedFileHandle hnd)