Skip to content

Commit 995189c

Browse files
committed
Add missing cuStreamWaitEvent function
1 parent d98b855 commit 995189c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

include/ffnvcodec/dynlink_cuda.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,9 +401,16 @@ typedef struct CUeglFrame_st {
401401
CUarray_format cuFormat;
402402
} CUeglFrame;
403403

404+
#define CU_STREAM_DEFAULT 0
404405
#define CU_STREAM_NON_BLOCKING 1
405-
#define CU_EVENT_BLOCKING_SYNC 1
406+
407+
#define CU_EVENT_DEFAULT 0
408+
#define CU_EVENT_BLOCKING_SYNC 1
406409
#define CU_EVENT_DISABLE_TIMING 2
410+
411+
#define CU_EVENT_WAIT_DEFAULT 0
412+
#define CU_EVENT_WAIT_EXTERNAL 1
413+
407414
#define CU_TRSF_READ_AS_INTEGER 1
408415

409416
typedef void CUDAAPI CUstreamCallback(CUstream hStream, CUresult status, void *userdata);
@@ -454,6 +461,7 @@ typedef CUresult CUDAAPI tcuStreamQuery(CUstream hStream);
454461
typedef CUresult CUDAAPI tcuStreamSynchronize(CUstream hStream);
455462
typedef CUresult CUDAAPI tcuStreamDestroy_v2(CUstream hStream);
456463
typedef CUresult CUDAAPI tcuStreamAddCallback(CUstream hStream, CUstreamCallback *callback, void *userdata, unsigned int flags);
464+
typedef CUresult CUDAAPI tcuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int flags);
457465
typedef CUresult CUDAAPI tcuEventCreate(CUevent *phEvent, unsigned int flags);
458466
typedef CUresult CUDAAPI tcuEventDestroy_v2(CUevent hEvent);
459467
typedef CUresult CUDAAPI tcuEventSynchronize(CUevent hEvent);

include/ffnvcodec/dynlink_loader.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ typedef struct CudaFunctions {
182182
tcuStreamSynchronize *cuStreamSynchronize;
183183
tcuStreamDestroy_v2 *cuStreamDestroy;
184184
tcuStreamAddCallback *cuStreamAddCallback;
185+
tcuStreamWaitEvent *cuStreamWaitEvent;
185186
tcuEventCreate *cuEventCreate;
186187
tcuEventDestroy_v2 *cuEventDestroy;
187188
tcuEventSynchronize *cuEventSynchronize;
@@ -344,6 +345,7 @@ static inline int cuda_load_functions(CudaFunctions **functions, void *logctx)
344345
LOAD_SYMBOL(cuStreamSynchronize, tcuStreamSynchronize, "cuStreamSynchronize");
345346
LOAD_SYMBOL(cuStreamDestroy, tcuStreamDestroy_v2, "cuStreamDestroy_v2");
346347
LOAD_SYMBOL(cuStreamAddCallback, tcuStreamAddCallback, "cuStreamAddCallback");
348+
LOAD_SYMBOL(cuStreamWaitEvent, tcuStreamWaitEvent, "cuStreamWaitEvent");
347349
LOAD_SYMBOL(cuEventCreate, tcuEventCreate, "cuEventCreate");
348350
LOAD_SYMBOL(cuEventDestroy, tcuEventDestroy_v2, "cuEventDestroy_v2");
349351
LOAD_SYMBOL(cuEventSynchronize, tcuEventSynchronize, "cuEventSynchronize");

0 commit comments

Comments
 (0)