CUdeviceptr Cuda;
};
-struct PollyGPUEventT {
- cudaEvent_t Cuda;
-};
-
/* Dynamic library handles for the CUDA and CUDA runtime library. */
static void *HandleCuda;
static void *HandleCudaRT;
static CuDeviceGetNameFcnTy *CuDeviceGetNameFcnPtr;
/* Type-defines of function pointer ot CUDA runtime APIs. */
-typedef cudaError_t CUDARTAPI CudaEventCreateFcnTy(cudaEvent_t *);
-static CudaEventCreateFcnTy *CudaEventCreateFcnPtr;
-
-typedef cudaError_t CUDARTAPI CudaEventRecordFcnTy(cudaEvent_t, cudaStream_t);
-static CudaEventRecordFcnTy *CudaEventRecordFcnPtr;
-
-typedef cudaError_t CUDARTAPI CudaEventSynchronizeFcnTy(cudaEvent_t);
-static CudaEventSynchronizeFcnTy *CudaEventSynchronizeFcnPtr;
-
-typedef cudaError_t CUDARTAPI CudaEventElapsedTimeFcnTy(float *, cudaEvent_t,
- cudaEvent_t);
-static CudaEventElapsedTimeFcnTy *CudaEventElapsedTimeFcnPtr;
-
-typedef cudaError_t CUDARTAPI CudaEventDestroyFcnTy(cudaEvent_t);
-static CudaEventDestroyFcnTy *CudaEventDestroyFcnPtr;
-
typedef cudaError_t CUDARTAPI CudaThreadSynchronizeFcnTy(void);
static CudaThreadSynchronizeFcnTy *CudaThreadSynchronizeFcnPtr;
(CuDeviceGetNameFcnTy *)getAPIHandle(HandleCuda, "cuDeviceGetName");
/* Get function pointer to CUDA Runtime APIs. */
- CudaEventCreateFcnPtr =
- (CudaEventCreateFcnTy *)getAPIHandle(HandleCudaRT, "cudaEventCreate");
-
- CudaEventRecordFcnPtr =
- (CudaEventRecordFcnTy *)getAPIHandle(HandleCudaRT, "cudaEventRecord");
-
- CudaEventSynchronizeFcnPtr = (CudaEventSynchronizeFcnTy *)getAPIHandle(
- HandleCudaRT, "cudaEventSynchronize");
-
- CudaEventElapsedTimeFcnPtr = (CudaEventElapsedTimeFcnTy *)getAPIHandle(
- HandleCudaRT, "cudaEventElapsedTime");
-
- CudaEventDestroyFcnPtr =
- (CudaEventDestroyFcnTy *)getAPIHandle(HandleCudaRT, "cudaEventDestroy");
-
CudaThreadSynchronizeFcnPtr = (CudaThreadSynchronizeFcnTy *)getAPIHandle(
HandleCudaRT, "cudaThreadSynchronize");
typedef struct PollyGPUFunctionT PollyGPUFunction;
typedef struct PollyGPUDeviceT PollyGPUDevice;
typedef struct PollyGPUDevicePtrT PollyGPUDevicePtr;
-typedef struct PollyGPUEventT PollyGPUEvent;
void polly_initDevice(PollyGPUContext **Context, PollyGPUDevice **Device);
void polly_getPTXModule(void *PTXBuffer, PollyGPUModule **Module);