Add missing cuStreamWaitEvent function
authorTimo Rothenpieler <timo@rothenpieler.org>
Thu, 11 May 2023 17:09:23 +0000 (19:09 +0200)
committerTimo Rothenpieler <timo@rothenpieler.org>
Thu, 11 May 2023 17:09:23 +0000 (19:09 +0200)
include/ffnvcodec/dynlink_cuda.h
include/ffnvcodec/dynlink_loader.h

index 79ff6d6a8b06e45439aed430cc8012c5fd7536ac..99c4e4628ca2864ef10ed6be99ae99208dfbbc05 100644 (file)
@@ -401,9 +401,16 @@ typedef struct CUeglFrame_st {
     CUarray_format cuFormat;
 } CUeglFrame;
 
+#define CU_STREAM_DEFAULT      0
 #define CU_STREAM_NON_BLOCKING 1
-#define CU_EVENT_BLOCKING_SYNC 1
+
+#define CU_EVENT_DEFAULT        0
+#define CU_EVENT_BLOCKING_SYNC  1
 #define CU_EVENT_DISABLE_TIMING 2
+
+#define CU_EVENT_WAIT_DEFAULT  0
+#define CU_EVENT_WAIT_EXTERNAL 1
+
 #define CU_TRSF_READ_AS_INTEGER 1
 
 typedef void CUDAAPI CUstreamCallback(CUstream hStream, CUresult status, void *userdata);
@@ -454,6 +461,7 @@ typedef CUresult CUDAAPI tcuStreamQuery(CUstream hStream);
 typedef CUresult CUDAAPI tcuStreamSynchronize(CUstream hStream);
 typedef CUresult CUDAAPI tcuStreamDestroy_v2(CUstream hStream);
 typedef CUresult CUDAAPI tcuStreamAddCallback(CUstream hStream, CUstreamCallback *callback, void *userdata, unsigned int flags);
+typedef CUresult CUDAAPI tcuStreamWaitEvent(CUstream hStream, CUevent hEvent, unsigned int flags);
 typedef CUresult CUDAAPI tcuEventCreate(CUevent *phEvent, unsigned int flags);
 typedef CUresult CUDAAPI tcuEventDestroy_v2(CUevent hEvent);
 typedef CUresult CUDAAPI tcuEventSynchronize(CUevent hEvent);
index 5e4971c4722028771ecf4d5a00358c34a0cffff8..ed59e855b6df133e4401fee6020a9a5b6d32ec5d 100644 (file)
@@ -182,6 +182,7 @@ typedef struct CudaFunctions {
     tcuStreamSynchronize *cuStreamSynchronize;
     tcuStreamDestroy_v2 *cuStreamDestroy;
     tcuStreamAddCallback *cuStreamAddCallback;
+    tcuStreamWaitEvent *cuStreamWaitEvent;
     tcuEventCreate *cuEventCreate;
     tcuEventDestroy_v2 *cuEventDestroy;
     tcuEventSynchronize *cuEventSynchronize;
@@ -346,6 +347,7 @@ static inline int cuda_load_functions(CudaFunctions **functions, void *logctx)
     LOAD_SYMBOL(cuStreamSynchronize, tcuStreamSynchronize, "cuStreamSynchronize");
     LOAD_SYMBOL(cuStreamDestroy, tcuStreamDestroy_v2, "cuStreamDestroy_v2");
     LOAD_SYMBOL(cuStreamAddCallback, tcuStreamAddCallback, "cuStreamAddCallback");
+    LOAD_SYMBOL(cuStreamWaitEvent, tcuStreamWaitEvent, "cuStreamWaitEvent");
     LOAD_SYMBOL(cuEventCreate, tcuEventCreate, "cuEventCreate");
     LOAD_SYMBOL(cuEventDestroy, tcuEventDestroy_v2, "cuEventDestroy_v2");
     LOAD_SYMBOL(cuEventSynchronize, tcuEventSynchronize, "cuEventSynchronize");