|
NVIDIA DriveOS Linux NSR SDK API Reference
|
7.0.3.0 Release
|
Go to the documentation of this file.
38 #ifndef DW_CORE_CONTEXT_H_
39 #define DW_CORE_CONTEXT_H_
41 #include <dw/core/base/Config.h>
42 #include <dw/core/base/Exports.h>
43 #include <dw/core/base/Types.h>
44 #include <dw/core/base/Version.h>
45 #include <dw/core/base/Status.h>
46 #include <dw/core/time/Timer.h>
47 #include <dw/core/health/HealthSignals.h>
48 #include <dw/core/platform/GPUProperties.h>
50 #include <cuda_runtime_api.h>
51 #include <cuda_runtime.h>
646 DW_DEPRECATED(
"Display and EGL related context is moved to src/dwvisualization, please replace this call with dwVisualization_setEGLDisplay.")
663 DW_DEPRECATED("Display and EGL related context is moved to src/dwvisualization, please replace this call with dwVisualization_getEGLDisplay.")
824 #endif // DW_CORE_CONTEXT_H_
struct dwTimeSourceObject * dwTimeSourceHandle_t
Handle represents a TimeSource object.
size_t(* read)(dwCustomizedFileHandle hnd, void *ptr, size_t size)
Function pointer: Read raw data from the file stream and return the number of bytes read.
bool(* error)(dwCustomizedFileHandle hnd)
Function pointer: Check if any I/O error occurred during OPEN/RD/WR operations.
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.
DW_API_PUBLIC dwStatus dwContext_getGPUCount(int32_t *const count, dwContextHandle_t const context)
Get the available GPU devices count.
@ DW_PTP_STATUS_INTERNAL_ERROR
PTP internal error.
bool enablePVA
if true, PVA platform will be enabled.
struct dwCustomizedFileFunctions dwCustomizedFileFunctions
Data structure representing a customized FileStream that can be passed in.
DW_API_PUBLIC dwStatus dwContext_getCurrentTimeMono(dwTime_t *const time, dwContextHandle_t const context)
Returns the current monotonic timestamp.
bool(* eof)(dwCustomizedFileHandle hnd)
Function pointer: Check if the end of file flag is set for the file stream.
@ DW_PTP_STATUS_NO_INIT_SYNC
PTP synchronization is not started.
DW_API_PUBLIC dwStatus dwContext_getNvSciBufModule(NvSciBufModule *mod, dwContextHandle_t const context)
Get the nvscibuf module.
@ DW_PTP_STATUS_LOST_SYNC
PTP synchronization lost.
DW_API_PUBLIC dwStatus dwRelease(dwContextHandle_t const context)
Releases the context.
struct dwModuleObject const * dwConstModuleHandle_t
DW_API_PUBLIC dwPointCloudRangeImageCreatorParams const *const const dwContextHandle_t ctx
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_getGPUDeviceCurrent(int32_t *const deviceNumber, dwContextHandle_t const context)
Returns the currently selected GPU device.
enum cudaDeviceAttr cudaDeviceAttr
dwPTPStatus
Defines PTP synchronization status.
size_t(* size)(dwCustomizedFileHandle hnd)
Function pointer: Returns the total number of bytes in the file stream.
NVIDIA Software Communications Interface (SCI) : NvSciSync
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.
const WFDCommitType const WFDHandle handle
DW_API_PUBLIC dwStatus dwContext_getUseVirtualTime(bool *const useVirtualTime, dwContextHandle_t const ctx)
Check if in virtual time mode.
struct dwModuleObject * dwModuleHandle_t
The Generic Module Object Handle.
DW_API_PUBLIC dwStatus dwContext_getCurrentTime(dwTime_t *const time, dwContextHandle_t const context)
Returns the current PTP timestamp.
int64_t dwTime_t
Specifies a timestamp unit, in microseconds.
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.
const WFDPipeline const WFDSource source
DW_API_PUBLIC dwStatus dwContext_getCurrentTimeUTC(dwTime_t *const time, dwContextHandle_t const context)
Returns the current UTC timestamp.
DW_API_PUBLIC dwStatus dwGetLastError(char8_t const **const errorMsg)
Retrieves the last error encountered.
Data structure representing a customized FileStream that can be passed in.
bool useVirtualTime
if true, the context's time source will be a virtual clock.
struct dwContextParameters dwContextParameters
A set of parameters that is passed to the SDK to create the context.
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.
bool enableCudaTaskGraph
if true, Cuda task-graph will be used where possible.
bool(* getString)(dwCustomizedFileHandle hnd, char8_t *ptr, size_t size)
Function pointer: Read a string from the file stream.
DW_API_PUBLIC dwStatus dwInitialize(dwContextHandle_t *const context, dwVersion const headerVersion, dwContextParameters const *const params)
Creates and initializes an SDK context.
#define DW_DEPRECATED(msg)
void(* close)(dwCustomizedFileHandle hnd)
Function pointer: Close the file stream.
void * dwCustomizedFileHandle
FileStream function pointers handle.
dwCustomizedFileHandle(* open)(const char8_t *ptr1, const char8_t *ptr2)
Function pointer: Open the file stream and returns the handle to the file.
struct NvSciBufModuleRec * NvSciBufModule
top-level container for the following set of resources: NvSciBufAttrLists, memory objects,...
typedef void(WFD_APIENTRY PFNWFDBINDSOURCETOPIPELINEWITHTIMESTAMPNV)(const WFDDevice device
DW_API_PUBLIC dwStatus dwContext_getErrorSignal(dwErrorSignal *errorSignal, dwModuleHandle_t handle)
Get the module error signal.
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.
DW_API_PUBLIC dwStatus dwContext_getTimePTPSynchronizationStatus(dwPTPStatus *const status, dwContextHandle_t const context)
Get the PTP synchronization status of time source inside the context.
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.
struct dwContextObject * dwContextHandle_t
Context handle.
DW_API_PUBLIC dwStatus dwGetLastCudaError(cudaError_t *const cudaError, char8_t const **const errorMsg)
Retrieves the last CUDA error encountered.
NVIDIA Software Communications Interface (SCI) : NvSciBuf
bool skipCudaInit
if true will skip CUDA initialization in the context
void(* setPosition)(dwCustomizedFileHandle hnd, size_t size)
Function pointer: Set the desired position inside the file stream.
struct dwContextObject const * dwConstContextHandle_t
The Driveworks context handle.
DW_API_PUBLIC dwStatus dwContext_getDLAEngineCount(int32_t *const count, dwContextHandle_t const context)
Get the available DLA engines count.
dwStatus
Status definition.
A set of parameters that is passed to the SDK to create the context.
size_t(* getPosition)(dwCustomizedFileHandle hnd)
Function pointer: Returns the current position inside the file stream.
DW_API_PUBLIC dwStatus dwContext_getTimeSource(dwTimeSourceHandle_t *const source, dwContextHandle_t const context)
Retrieve time source used in the context.
void * dwDLAHandleArray
cuDLA Device handle array pointer
size_t(* write)(dwCustomizedFileHandle hnd, const void *ptr, size_t size)
Function pointer: Write raw data to the file stream from an input buffer and return the number of byt...
void(* flush)(dwCustomizedFileHandle hnd)
Function pointer: Synchronizes the file stream, waiting that all requested bytes have been read.
struct NvSciSyncModuleRec * NvSciSyncModule
Represents an instance of the NvSciSyncModule.
DW_API_PUBLIC dwPointCloudRangeImageCreatorParams const *const params
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_sleepMonotonic(dwTime_t const sleepTimeUs)
Sleep for a given time using a monotonic clock.
DW_API_PUBLIC dwStatus dwContext_getCUDAStream(cudaStream_t *stream, uint32_t streamIndex, dwContextHandle_t const context)
Returns a preallocated CUDA stream.
@ DW_PTP_STATUS_NO_ERROR
No error.
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_getNvSciSyncModule(NvSciSyncModule *mod, dwContextHandle_t const context)
Get the NvSciSync module.
DW_API_PUBLIC dwStatus dwContext_setCustomFileFunctions(dwContextHandle_t const context, dwCustomizedFileFunctions *const fileFunctionPtr)
Set the customized fileStream function pointers in context.
const char8_t * dataPath
Path where all DriveWorks related data required during runtime are stored.
Basic error signal that gets reported only when there is an error.