0
|
1 dynbind("cuda", "
|
|
2 cuArray3DCreate(**<CUarray_st>*<CUDA_ARRAY3D_DESCRIPTOR>)i;
|
|
3 cuArray3DGetDescriptor(*<CUDA_ARRAY3D_DESCRIPTOR>*<CUarray_st>)i;
|
|
4 cuArrayCreate(**<CUarray_st>*<CUDA_ARRAY_DESCRIPTOR>)i;
|
|
5 cuArrayDestroy(*<CUarray_st>)i;
|
|
6 cuArrayGetDescriptor(*<CUDA_ARRAY_DESCRIPTOR>*<CUarray_st>)i;
|
|
7 cuCtxAttach(**<CUctx_st>I)i;
|
|
8 cuCtxCreate(**<CUctx_st>Ii)i;
|
|
9 cuCtxDestroy(*<CUctx_st>)i;
|
|
10 cuCtxDetach(*<CUctx_st>)i;
|
|
11 cuCtxGetDevice(*i)i;
|
|
12 cuCtxPopCurrent(**<CUctx_st>)i;
|
|
13 cuCtxPushCurrent(*<CUctx_st>)i;
|
|
14 cuCtxSynchronize()i;
|
|
15 cuDeviceComputeCapability(*i*ii)i;
|
|
16 cuDeviceGet(*ii)i;
|
|
17 cuDeviceGetAttribute(*iii)i;
|
|
18 cuDeviceGetCount(*i)i;
|
|
19 cuDeviceGetName(*cii)i;
|
|
20 cuDeviceGetProperties(*<CUdevprop_st>i)i;
|
|
21 cuDeviceTotalMem(*Ii)i;
|
|
22 cuEventCreate(**<CUevent_st>I)i;
|
|
23 cuEventDestroy(*<CUevent_st>)i;
|
|
24 cuEventElapsedTime(*f*<CUevent_st>*<CUevent_st>)i;
|
|
25 cuEventQuery(*<CUevent_st>)i;
|
|
26 cuEventRecord(*<CUevent_st>*<CUstream_st>)i;
|
|
27 cuEventSynchronize(*<CUevent_st>)i;
|
|
28 cuFuncSetBlockShape(*<CUfunc_st>iii)i;
|
|
29 cuFuncSetSharedSize(*<CUfunc_st>I)i;
|
|
30 cuInit(I)i;
|
|
31 cuLaunch(*<CUfunc_st>)i;
|
|
32 cuLaunchGrid(*<CUfunc_st>ii)i;
|
|
33 cuLaunchGridAsync(*<CUfunc_st>ii*<CUstream_st>)i;
|
|
34 cuMemAlloc(*II)i;
|
|
35 cuMemAllocHost(**vI)i;
|
|
36 cuMemAllocPitch(*I*IIII)i;
|
|
37 cuMemFree(I)i;
|
|
38 cuMemFreeHost(*v)i;
|
|
39 cuMemGetAddressRange(*I*II)i;
|
|
40 cuMemGetInfo(*I*I)i;
|
|
41 cuMemcpy2D(*<CUDA_MEMCPY2D_st>)i;
|
|
42 cuMemcpy2DAsync(*<CUDA_MEMCPY2D_st>*<CUstream_st>)i;
|
|
43 cuMemcpy2DUnaligned(*<CUDA_MEMCPY2D_st>)i;
|
|
44 cuMemcpy3D(*<CUDA_MEMCPY3D_st>)i;
|
|
45 cuMemcpy3DAsync(*<CUDA_MEMCPY3D_st>*<CUstream_st>)i;
|
|
46 cuMemcpyAtoA(*<CUarray_st>I*<CUarray_st>II)i;
|
|
47 cuMemcpyAtoD(I*<CUarray_st>II)i;
|
|
48 cuMemcpyAtoH(*v*<CUarray_st>II)i;
|
|
49 cuMemcpyAtoHAsync(*v*<CUarray_st>II*<CUstream_st>)i;
|
|
50 cuMemcpyDtoA(*<CUarray_st>III)i;
|
|
51 cuMemcpyDtoD(III)i;
|
|
52 cuMemcpyDtoH(*vII)i;
|
|
53 cuMemcpyDtoHAsync(*vII*<CUstream_st>)i;
|
|
54 cuMemcpyHtoA(*<CUarray_st>I*vI)i;
|
|
55 cuMemcpyHtoAAsync(*<CUarray_st>I*vI*<CUstream_st>)i;
|
|
56 cuMemcpyHtoD(I*vI)i;
|
|
57 cuMemcpyHtoDAsync(I*vI*<CUstream_st>)i;
|
|
58 cuMemsetD16(ISI)i;
|
|
59 cuMemsetD2D16(IISII)i;
|
|
60 cuMemsetD2D32(IIIII)i;
|
|
61 cuMemsetD2D8(IICII)i;
|
|
62 cuMemsetD32(III)i;
|
|
63 cuMemsetD8(ICI)i;
|
|
64 cuModuleGetFunction(**<CUfunc_st>*<CUmod_st>*c)i;
|
|
65 cuModuleGetGlobal(*I*I*<CUmod_st>*c)i;
|
|
66 cuModuleGetTexRef(**<CUtexref_st>*<CUmod_st>*c)i;
|
|
67 cuModuleLoad(**<CUmod_st>*c)i;
|
|
68 cuModuleLoadData(**<CUmod_st>*v)i;
|
|
69 cuModuleLoadFatBinary(**<CUmod_st>*v)i;
|
|
70 cuModuleUnload(*<CUmod_st>)i;
|
|
71 cuParamSetSize(*<CUfunc_st>I)i;
|
|
72 cuParamSetTexRef(*<CUfunc_st>i*<CUtexref_st>)i;
|
|
73 cuParamSetf(*<CUfunc_st>if)i;
|
|
74 cuParamSeti(*<CUfunc_st>iI)i;
|
|
75 cuParamSetv(*<CUfunc_st>i*vI)i;
|
|
76 cuStreamCreate(**<CUstream_st>I)i;
|
|
77 cuStreamDestroy(*<CUstream_st>)i;
|
|
78 cuStreamQuery(*<CUstream_st>)i;
|
|
79 cuStreamSynchronize(*<CUstream_st>)i;
|
|
80 cuTexRefCreate(**<CUtexref_st>)i;
|
|
81 cuTexRefDestroy(*<CUtexref_st>)i;
|
|
82 cuTexRefGetAddress(*I*<CUtexref_st>)i;
|
|
83 cuTexRefGetAddressMode(*p*<CUtexref_st>i)i;
|
|
84 cuTexRefGetArray(**<CUarray_st>*<CUtexref_st>)i;
|
|
85 cuTexRefGetFilterMode(*p*<CUtexref_st>)i;
|
|
86 cuTexRefGetFlags(*I*<CUtexref_st>)i;
|
|
87 cuTexRefGetFormat(*p*i*<CUtexref_st>)i;
|
|
88 cuTexRefSetAddress(*I*<CUtexref_st>II)i;
|
|
89 cuTexRefSetAddressMode(*<CUtexref_st>ii)i;
|
|
90 cuTexRefSetArray(*<CUtexref_st>*<CUarray_st>I)i;
|
|
91 cuTexRefSetFilterMode(*<CUtexref_st>i)i;
|
|
92 cuTexRefSetFlags(*<CUtexref_st>I)i;
|
|
93 cuTexRefSetFormat(*<CUtexref_st>ii)i;
|
|
94 ")
|
|
95
|
|
96 # CUdevprop_st{i[2]i[2]iiiiiiii}maxThreadsPerBlock maxThreadsDim maxGridSize sharedMemPerBlock totalConstantMemory SIMDWidth memPitch regsPerBlock clockRate textureAlign ;
|
|
97 parseStructInfos("
|
|
98 CUDA_MEMCPY2D_st{IIi*vI*<CUarray_st>IIIi*vI*<CUarray_st>III}srcXInBytes srcY srcMemoryType srcHost srcDevice srcArray srcPitch dstXInBytes dstY dstMemoryType dstHost dstDevice dstArray dstPitch WidthInBytes Height ;
|
|
99 CUDA_MEMCPY3D_st{IIIIi*vI*<CUarray_st>*vIIIIIIi*vI*<CUarray_st>*vIIIII}srcXInBytes srcY srcZ srcLOD srcMemoryType srcHost srcDevice srcArray reserved0 srcPitch srcHeight dstXInBytes dstY dstZ dstLOD dstMemoryType dstHost dstDevice dstArray reserved1 dstPitch dstHeight WidthInBytes Height Depth ;
|
|
100 CUarray_st{};
|
|
101 CUfunc_st{};
|
|
102 CUevent_st{};
|
|
103 CUDA_ARRAY_DESCRIPTOR{IIiI}Width Height Format NumChannels ;
|
|
104 CUDA_ARRAY3D_DESCRIPTOR{IIIiII}Width Height Depth Format NumChannels Flags ;
|
|
105 CUtexref_st{};
|
|
106 CUctx_st{};
|
|
107 CUstream_st{};
|
|
108 CUmod_st{};
|
|
109 ")
|
|
110 CUDA_ERROR_ALREADY_ACQUIRED=210;
|
|
111 CUDA_ERROR_ALREADY_MAPPED=208;
|
|
112 CUDA_ERROR_ARRAY_IS_MAPPED=207;
|
|
113 CUDA_ERROR_CONTEXT_ALREADY_CURRENT=202;
|
|
114 CUDA_ERROR_DEINITIALIZED=4;
|
|
115 CUDA_ERROR_FILE_NOT_FOUND=301;
|
|
116 CUDA_ERROR_INVALID_CONTEXT=201;
|
|
117 CUDA_ERROR_INVALID_DEVICE=101;
|
|
118 CUDA_ERROR_INVALID_HANDLE=400;
|
|
119 CUDA_ERROR_INVALID_IMAGE=200;
|
|
120 CUDA_ERROR_INVALID_SOURCE=300;
|
|
121 CUDA_ERROR_INVALID_VALUE=1;
|
|
122 CUDA_ERROR_LAUNCH_FAILED=700;
|
|
123 CUDA_ERROR_LAUNCH_INCOMPATIBLE_TEXTURING=703;
|
|
124 CUDA_ERROR_LAUNCH_OUT_OF_RESOURCES=701;
|
|
125 CUDA_ERROR_LAUNCH_TIMEOUT=702;
|
|
126 CUDA_ERROR_MAP_FAILED=205;
|
|
127 CUDA_ERROR_NOT_FOUND=500;
|
|
128 CUDA_ERROR_NOT_INITIALIZED=3;
|
|
129 CUDA_ERROR_NOT_MAPPED=211;
|
|
130 CUDA_ERROR_NOT_READY=600;
|
|
131 CUDA_ERROR_NO_BINARY_FOR_GPU=209;
|
|
132 CUDA_ERROR_NO_DEVICE=100;
|
|
133 CUDA_ERROR_OUT_OF_MEMORY=2;
|
|
134 CUDA_ERROR_UNKNOWN=999;
|
|
135 CUDA_ERROR_UNMAP_FAILED=206;
|
|
136 CUDA_SUCCESS=0;
|
|
137 CU_AD_FORMAT_FLOAT=32;
|
|
138 CU_AD_FORMAT_HALF=16;
|
|
139 CU_AD_FORMAT_SIGNED_INT16=9;
|
|
140 CU_AD_FORMAT_SIGNED_INT32=10;
|
|
141 CU_AD_FORMAT_SIGNED_INT8=8;
|
|
142 CU_AD_FORMAT_UNSIGNED_INT16=2;
|
|
143 CU_AD_FORMAT_UNSIGNED_INT32=3;
|
|
144 CU_AD_FORMAT_UNSIGNED_INT8=1;
|
|
145 CU_CTX_FLAGS_MASK=3;
|
|
146 CU_CTX_SCHED_AUTO=0;
|
|
147 CU_CTX_SCHED_MASK=3;
|
|
148 CU_CTX_SCHED_SPIN=1;
|
|
149 CU_CTX_SCHED_YIELD=2;
|
|
150 CU_DEVICE_ATTRIBUTE_CLOCK_RATE=13;
|
|
151 CU_DEVICE_ATTRIBUTE_GPU_OVERLAP=15;
|
|
152 CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_X=2;
|
|
153 CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Y=3;
|
|
154 CU_DEVICE_ATTRIBUTE_MAX_BLOCK_DIM_Z=4;
|
|
155 CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_X=5;
|
|
156 CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Y=6;
|
|
157 CU_DEVICE_ATTRIBUTE_MAX_GRID_DIM_Z=7;
|
|
158 CU_DEVICE_ATTRIBUTE_MAX_PITCH=11;
|
|
159 CU_DEVICE_ATTRIBUTE_MAX_REGISTERS_PER_BLOCK=12;
|
|
160 CU_DEVICE_ATTRIBUTE_MAX_SHARED_MEMORY_PER_BLOCK=8;
|
|
161 CU_DEVICE_ATTRIBUTE_MAX_THREADS_PER_BLOCK=1;
|
|
162 CU_DEVICE_ATTRIBUTE_MULTIPROCESSOR_COUNT=16;
|
|
163 CU_DEVICE_ATTRIBUTE_REGISTERS_PER_BLOCK=12;
|
|
164 CU_DEVICE_ATTRIBUTE_SHARED_MEMORY_PER_BLOCK=8;
|
|
165 CU_DEVICE_ATTRIBUTE_TEXTURE_ALIGNMENT=14;
|
|
166 CU_DEVICE_ATTRIBUTE_TOTAL_CONSTANT_MEMORY=9;
|
|
167 CU_DEVICE_ATTRIBUTE_WARP_SIZE=10;
|
|
168 CU_MEMORYTYPE_ARRAY=3;
|
|
169 CU_MEMORYTYPE_DEVICE=2;
|
|
170 CU_MEMORYTYPE_HOST=1;
|
|
171 CU_TR_ADDRESS_MODE_CLAMP=1;
|
|
172 CU_TR_ADDRESS_MODE_MIRROR=2;
|
|
173 CU_TR_ADDRESS_MODE_WRAP=0;
|
|
174 CU_TR_FILTER_MODE_LINEAR=1;
|
|
175 CU_TR_FILTER_MODE_POINT=0;
|