2 * Author......: Jens Steube <jens.steube@gmail.com>
13 void hc_cuDeviceGetCount (int *count
);
14 void hc_cuDeviceGet (CUdevice
*device
, int ordinal
);
15 void hc_cuDeviceGetName (char *name
, int len
, CUdevice dev
);
16 void hc_cuDeviceTotalMem (size_t *bytes
, CUdevice dev
);
17 void hc_cuDeviceGetAttribute (int *pi
, CUdevice_attribute attrib
, CUdevice dev
);
18 void hc_cuCtxCreate (CUcontext
*pctx
, unsigned int flags
, CUdevice dev
);
19 void hc_cuMemAllocHost (void **pp
, size_t bytesize
);
20 void hc_cuMemAlloc (CUdeviceptr
*dptr
, size_t bytesize
);
21 void hc_cuMemsetD8 (CUdeviceptr dstDevice
, unsigned char uc
, unsigned int N
);
22 void hc_cuMemsetD32 (CUdeviceptr dstDevice
, unsigned int ui
, unsigned int N
);
23 void hc_cuMemcpyDtoD (CUdeviceptr dstDevice
, CUdeviceptr srcDevice
, size_t ByteCount
);
24 void hc_cuMemcpyDtoDAsync (CUdeviceptr dstDevice
, CUdeviceptr srcDevice
, size_t ByteCount
, CUstream hStream
);
25 void hc_cuMemcpyHtoD (CUdeviceptr dstDevice
, const void *srcHost
, size_t ByteCount
);
26 void hc_cuMemcpyHtoDAsync (CUdeviceptr dstDevice
, const void *srcHost
, size_t ByteCount
, CUstream hStream
);
27 void hc_cuMemcpyDtoH (void *dstHost
, CUdeviceptr srcDevice
, size_t ByteCount
);
28 void hc_cuMemcpyDtoHAsync (void *dstHost
, CUdeviceptr srcDevice
, size_t ByteCount
, CUstream hStream
);
29 void hc_cuEventCreate (CUevent
*phEvent
, unsigned int Flags
);
30 void hc_cuStreamCreate (CUstream
*phStream
, unsigned int Flags
);
31 void hc_cuDeviceComputeCapability (int *major
, int *minor
, CUdevice dev
);
32 void hc_cuModuleLoad (CUmodule
*module
, const char *fname
);
33 void hc_cuModuleLoadData (CUmodule
*module
, const void *image
);
34 void hc_cuModuleGetFunction (CUfunction
*hfunc
, CUmodule hmod
, const char *name
);
35 void hc_cuFuncSetBlockShape (CUfunction hfunc
, int x
, int y
, int z
);
36 void hc_cuParamSetSize (CUfunction hfunc
, unsigned int numbytes
);
37 void hc_cuParamSetv (CUfunction hfunc
, int offset
, void *ptr
, unsigned int numbytes
);
38 void hc_cuParamSeti (CUfunction hfunc
, int offset
, unsigned int value
);
39 void hc_cuModuleGetGlobal (CUdeviceptr
*dptr
, size_t *bytes
, CUmodule hmod
, const char *name
);
40 void hc_cuCtxPopCurrent (CUcontext
*pctx
);
41 void hc_cuCtxPushCurrent (CUcontext ctx
);
42 void hc_cuLaunchKernel (CUfunction f
, unsigned int gridDimX
, unsigned int gridDimY
, unsigned int gridDimZ
, unsigned int blockDimX
, unsigned int blockDimY
, unsigned int blockDimZ
, unsigned int sharedMemBytes
, CUstream hStream
, void **kernelParams
, void **extra
);
43 void hc_cuLaunchGrid (CUfunction f
, int grid_width
, int grid_height
);
44 void hc_cuLaunchGridAsync (CUfunction f
, int grid_width
, int grid_height
, CUstream hStream
);
45 void hc_cuEventSynchronize (CUevent hEvent
);
46 void hc_cuStreamSynchronize (CUstream hStream
);
47 void hc_cuMemFreeHost (void *p
);
48 void hc_cuMemFree (CUdeviceptr dptr
);
49 void hc_cuEventDestroy (CUevent hEvent
);
50 void hc_cuStreamDestroy (CUstream hStream
);
51 void hc_cuModuleUnload (CUmodule hmod
);
52 void hc_cuCtxDestroy (CUcontext ctx
);
53 void hc_cuCtxAttach (CUcontext
*pctx
, unsigned int flags
);
54 void hc_cuCtxDetach (CUcontext ctx
);
55 void hc_cuCtxSynchronize (void);
56 void hc_cuCtxSetCacheConfig (CUfunc_cache config
);
57 void hc_cuDriverGetVersion (int *driverVersion
);
58 void hc_cuModuleLoadDataEx (CUmodule
*module
, const void *image
, unsigned int numOptions
, CUjit_option
*options
, void **optionValues
);