3 * This library is free software; you can redistribute it and/or
4 * modify it under the terms of the GNU Library General Public
5 * License as published by the Free Software Foundation; either
6 * version 2 of the License, or (at your option) any later version.
8 * This library is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 * Library General Public License for more details.
13 * You should have received a copy of the GNU Library General Public
14 * License along with this library; if not, write to the
15 * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
16 * Boston, MA 02110-1301, USA.
19 #ifndef __GST_CUDA_STUB_H__
20 #define __GST_CUDA_STUB_H__
26 typedef gpointer CUcontext;
27 typedef gpointer CUgraphicsResource;
28 typedef gpointer CUstream;
29 typedef gpointer CUarray;
31 typedef guintptr CUdeviceptr;
32 typedef gint CUdevice;
41 CU_MEMORYTYPE_HOST = 1,
42 CU_MEMORYTYPE_DEVICE = 2,
43 CU_MEMORYTYPE_ARRAY = 3,
44 CU_MEMORYTYPE_UNIFIED = 4,
49 CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MAJOR = 75,
50 CU_DEVICE_ATTRIBUTE_COMPUTE_CAPABILITY_MINOR = 76,
55 CU_GRAPHICS_REGISTER_FLAGS_NONE = 0x00,
56 CU_GRAPHICS_REGISTER_FLAGS_READ_ONLY = 0x01,
57 CU_GRAPHICS_REGISTER_FLAGS_WRITE_DISCARD = 0x02,
58 } CUgraphicsRegisterFlags;
62 CU_GRAPHICS_MAP_RESOURCE_FLAGS_NONE = 0x00,
63 CU_GRAPHICS_MAP_RESOURCE_FLAGS_READ_ONLY = 0x01,
64 CU_GRAPHICS_MAP_RESOURCE_FLAGS_WRITE_DISCARD = 0x02,
65 } CUgraphicsMapResourceFlags;
69 CU_STREAM_DEFAULT = 0x0,
70 CU_STREAM_NON_BLOCKING = 0x1
77 CUmemorytype srcMemoryType;
78 gconstpointer srcHost;
79 CUdeviceptr srcDevice;
85 CUmemorytype dstMemoryType;
87 CUdeviceptr dstDevice;
95 #define CUDA_VERSION 10000
98 #define CUDAAPI __stdcall
103 #define cuCtxCreate cuCtxCreate_v2
104 #define cuCtxDestroy cuCtxDestroy_v2
105 #define cuCtxPopCurrent cuCtxPopCurrent_v2
106 #define cuCtxPushCurrent cuCtxPushCurrent_v2
107 #define cuGraphicsResourceGetMappedPointer cuGraphicsResourceGetMappedPointer_v2
108 #define cuGraphicsResourceSetMapFlags cuGraphicsResourceSetMapFlags_v2
110 #define cuMemAlloc cuMemAlloc_v2
111 #define cuMemAllocPitch cuMemAllocPitch_v2
112 #define cuMemcpy2D cuMemcpy2D_v2
113 #define cuMemcpy2DAsync cuMemcpy2DAsync_v2
114 #define cuMemFree cuMemFree_v2
118 #endif /* __GST_CUDA_STUB_H__ */