Data Structures | |
| struct | cupvaFence_t |
| Used synchronize PVA workloads with other engines, including CPU. More... | |
Typedefs | |
| typedef struct cupvaSyncObjRec * | cupvaSyncObj_t |
| A synchronization object which holds resources needed by fences. More... | |
Enumerations | |
| enum | cupvaSyncClientType_t { CUPVA_SYNC_CLIENT_TYPE_INVALID = 0, CUPVA_SIGNALER, CUPVA_WAITER, CUPVA_SIGNALER_WAITER, CUPVA_SYNC_CLIENT_TYPE_MAX } |
| The synchronization client type. More... | |
| enum | cupvaSyncWaitMode_t { CUPVA_SYNC_WAIT_MODE_INVALID = 0, CUPVA_SYNC_YIELD, CUPVA_SYNC_SPIN, CUPVA_SYNC_WAIT_MODE_MAX } |
| The sync object wait mode. More... | |
Functions | |
| DLL_EXPORT cupvaError_t | CupvaSyncObjCreate (cupvaSyncObj_t *const syncObj, bool const isTimeStamp, cupvaSyncClientType_t const clientType, cupvaSyncWaitMode_t const waitMode) |
| Create and set syncObj to be an empty cupva sync object. More... | |
| DLL_EXPORT cupvaError_t | CupvaSyncObjDestroy (cupvaSyncObj_t const syncObj) |
| Destroy a cupva sync object. More... | |
| DLL_EXPORT cupvaError_t | CupvaCmdBarrierInit (cupvaCmd_t *const cmdBarrier) |
| Create a Barrier command. More... | |
| DLL_EXPORT cupvaError_t | CupvaCmdWaitOnFencesInit (cupvaCmd_t *const command, cupvaFence_t const *const fence, int32_t const count) |
| Initialize a WaitOnFence command from the given fence. More... | |
| DLL_EXPORT cupvaError_t | CupvaFenceInit (cupvaFence_t *const fence, cupvaSyncObj_t const syncObj) |
| Initialize an empty fence. More... | |
| DLL_EXPORT cupvaError_t | CupvaFenceGetTimeStamp (cupvaFence_t const *const fence, uint64_t *const timeStamp) |
| Gets the time at which current fence expired (in nanoseconds). More... | |
| DLL_EXPORT cupvaError_t | CupvaFenceWait (cupvaFence_t const *const fence, int64_t const timeout, bool *const waitSuccess) |
| Block the calling thread until the fence is triggered or time out. More... | |
| DLL_EXPORT cupvaError_t | CupvaCmdRequestFencesInit (cupvaCmd_t *const command, cupvaFence_t *const fence, int32_t const count) |
| Initialize a Request Fence command from the given fence. More... | |
| typedef struct cupvaSyncObjRec* cupvaSyncObj_t |
A synchronization object which holds resources needed by fences.
Definition at line 97 of file cupva_host_types.h.
The synchronization client type.
| Enumerator | |
|---|---|
| CUPVA_SYNC_CLIENT_TYPE_INVALID | Sentinel value. |
| CUPVA_SIGNALER | |
| CUPVA_WAITER | |
| CUPVA_SIGNALER_WAITER | |
| CUPVA_SYNC_CLIENT_TYPE_MAX | One greater than max valid value. |
Definition at line 113 of file cupva_host_types_scheduling.h.
| enum cupvaSyncWaitMode_t |
The sync object wait mode.
This controls how an app interacts with the OS scheduler while blocked by calling Fence::wait().
| Enumerator | |
|---|---|
| CUPVA_SYNC_WAIT_MODE_INVALID | Sentinel value. |
| CUPVA_SYNC_YIELD | Yield the caller thread while blocked by calling CupvaFenceWait(). |
| CUPVA_SYNC_SPIN | Actively spin while blocked by calling CupvaFenceWait(). |
| CUPVA_SYNC_WAIT_MODE_MAX | One greater than max valid value. |
Definition at line 133 of file cupva_host_types_scheduling.h.
| DLL_EXPORT cupvaError_t CupvaCmdBarrierInit | ( | cupvaCmd_t *const | cmdBarrier | ) |
Create a Barrier command.
| [in] | cmdBarrier | The pointer to a cupvaCmd_t object. |
Usage considerations
| DLL_EXPORT cupvaError_t CupvaCmdRequestFencesInit | ( | cupvaCmd_t *const | command, |
| cupvaFence_t *const | fence, | ||
| int32_t const | count | ||
| ) |
Initialize a Request Fence command from the given fence.
| [in] | command | The pointer to a cupvaCmd_t object. |
| [in] | fence | The pointer to a cupvaFence_t array. |
| [in] | count | The number of fences in the array. |
Usage considerations
| DLL_EXPORT cupvaError_t CupvaCmdWaitOnFencesInit | ( | cupvaCmd_t *const | command, |
| cupvaFence_t const *const | fence, | ||
| int32_t const | count | ||
| ) |
Initialize a WaitOnFence command from the given fence.
| [in] | command | The pointer to a cupvaCmd_t object. |
| [in] | fence | The pointer to a cupvaFence_t array. |
| [in] | count | The number of fences in the array. |
Usage considerations
| DLL_EXPORT cupvaError_t CupvaFenceGetTimeStamp | ( | cupvaFence_t const *const | fence, |
| uint64_t *const | timeStamp | ||
| ) |
Gets the time at which current fence expired (in nanoseconds).
| [in] | fence | The pointer to a cupvaFence_t object. |
| [out] | timeStamp | An uint64_t pointer to return the timestamp. |
CupvaFenceWait() must return with success and set waitSuccess argument to true prior to calling this API or the timestamp value cannot be considered valid.
Usage considerations
| DLL_EXPORT cupvaError_t CupvaFenceInit | ( | cupvaFence_t *const | fence, |
| cupvaSyncObj_t const | syncObj | ||
| ) |
Initialize an empty fence.
| [in] | fence | The pointer to a cupvaFence_t object. |
| [in] | syncObj | The pointer to a CUPVA sync object. |
Usage considerations
| DLL_EXPORT cupvaError_t CupvaFenceWait | ( | cupvaFence_t const *const | fence, |
| int64_t const | timeout, | ||
| bool *const | waitSuccess | ||
| ) |
Block the calling thread until the fence is triggered or time out.
| [in] | fence | The pointer to a cupvaFence_t object. |
| [in] | timeout | The maximum time to wait in micro seconds. -1 will wait forever. |
| [out] | waitSuccess | The pointer a boolean variable used to store wait status - true if wait was successful; false if timeout occurred before the fence was triggered. Can be NULL, in which case it will be ignored. |
Usage considerations
| DLL_EXPORT cupvaError_t CupvaSyncObjCreate | ( | cupvaSyncObj_t *const | syncObj, |
| bool const | isTimeStamp, | ||
| cupvaSyncClientType_t const | clientType, | ||
| cupvaSyncWaitMode_t const | waitMode | ||
| ) |
Create and set syncObj to be an empty cupva sync object.
| [out] | syncObj | The pointer to return the newly constructed Sync object. |
| [in] | isTimeStamp | The flag to turn on/off the time-stamp in the SyncObj. |
| [in] | clientType | The synchronization client type. |
| [in] | waitMode | The sync object wait mode. |
Usage considerations
| DLL_EXPORT cupvaError_t CupvaSyncObjDestroy | ( | cupvaSyncObj_t const | syncObj | ) |
Destroy a cupva sync object.
| [in] | syncObj | The pointer to a cupvaSyncObj_t object. |
Usage considerations