Add CUDA function cuMemAllocPitch
authorSeungha Yang <pudding8757@gmail.com>
Fri, 16 Nov 2018 09:21:11 +0000 (18:21 +0900)
committerTimo Rothenpieler <timo@rothenpieler.org>
Sun, 18 Nov 2018 01:45:19 +0000 (02:45 +0100)
Signed-off-by: Seungha Yang <seungha.yang@navercorp.com>
include/ffnvcodec/dynlink_cuda.h
include/ffnvcodec/dynlink_loader.h

index 8a9a882dcf81fd6d054bbe956979db08dfa00e74..97d526ef08de736db05642829b8f473694b6acb2 100644 (file)
@@ -322,6 +322,7 @@ typedef CUresult CUDAAPI tcuCtxPushCurrent_v2(CUcontext pctx);
 typedef CUresult CUDAAPI tcuCtxPopCurrent_v2(CUcontext *pctx);
 typedef CUresult CUDAAPI tcuCtxDestroy_v2(CUcontext ctx);
 typedef CUresult CUDAAPI tcuMemAlloc_v2(CUdeviceptr *dptr, size_t bytesize);
+typedef CUresult CUDAAPI tcuMemAllocPitch_v2(CUdeviceptr *dptr, size_t *pPitch, size_t WidthInBytes, size_t Height, unsigned int ElementSizeBytes);
 typedef CUresult CUDAAPI tcuMemFree_v2(CUdeviceptr dptr);
 typedef CUresult CUDAAPI tcuMemcpy2D_v2(const CUDA_MEMCPY2D *pcopy);
 typedef CUresult CUDAAPI tcuMemcpy2DAsync_v2(const CUDA_MEMCPY2D *pcopy, CUstream hStream);
index ee3502b3c559b43e54cf600e54d48dba69edcc58..da00ff8e1799d86c0d8eed3082446e148eb32684 100644 (file)
@@ -149,6 +149,7 @@ typedef struct CudaFunctions {
     tcuCtxPopCurrent_v2 *cuCtxPopCurrent;
     tcuCtxDestroy_v2 *cuCtxDestroy;
     tcuMemAlloc_v2 *cuMemAlloc;
+    tcuMemAllocPitch_v2 *cuMemAllocPitch;
     tcuMemFree_v2 *cuMemFree;
     tcuMemcpy2D_v2 *cuMemcpy2D;
     tcuMemcpy2DAsync_v2 *cuMemcpy2DAsync;
@@ -270,6 +271,7 @@ static inline int cuda_load_functions(CudaFunctions **functions, void *logctx)
     LOAD_SYMBOL(cuCtxPopCurrent, tcuCtxPopCurrent_v2, "cuCtxPopCurrent_v2");
     LOAD_SYMBOL(cuCtxDestroy, tcuCtxDestroy_v2, "cuCtxDestroy_v2");
     LOAD_SYMBOL(cuMemAlloc, tcuMemAlloc_v2, "cuMemAlloc_v2");
+    LOAD_SYMBOL(cuMemAllocPitch, tcuMemAllocPitch_v2, "cuMemAllocPitch_v2");
     LOAD_SYMBOL(cuMemFree, tcuMemFree_v2, "cuMemFree_v2");
     LOAD_SYMBOL(cuMemcpy2D, tcuMemcpy2D_v2, "cuMemcpy2D_v2");
     LOAD_SYMBOL(cuMemcpy2DAsync, tcuMemcpy2DAsync_v2, "cuMemcpy2DAsync_v2");