15#ifndef GPURECONSTRUCTIONOCLINCLUDESHOST_H
16#define GPURECONSTRUCTIONOCLINCLUDESHOST_H
18#define GPUCA_GPUTYPE_OPENCL
19#define __OPENCL_HOST__
21#define CL_TARGET_OPENCL_VERSION 220
56template <
typename T,
typename... Args>
57inline int64_t GPUReconstructionOCLBackend::OCLsetKernelParameters_helper(cl_kernel& kernel, int32_t
i,
const T& firstParameter,
const Args&... restOfParameters)
59 int64_t
retVal = clSetKernelArg(kernel,
i,
sizeof(T), &firstParameter);
63 if constexpr (
sizeof...(restOfParameters) > 0) {
64 return OCLsetKernelParameters_helper(kernel,
i + 1, restOfParameters...);
69template <
typename... Args>
70inline int64_t GPUReconstructionOCLBackend::OCLsetKernelParameters(cl_kernel& kernel,
const Args&... args)
72 return OCLsetKernelParameters_helper(kernel, 0, args...);
75inline int64_t GPUReconstructionOCLBackend::clExecuteKernelA(cl_command_queue queue, cl_kernel krnl,
size_t local_size,
size_t global_size, cl_event* pEvent, cl_event* wait, cl_int nWaitEvents)
77 return clEnqueueNDRangeKernel(queue, krnl, 1,
nullptr, &global_size, &local_size, wait ==
nullptr ? 0 : nWaitEvents, wait, pEvent);
#define GPUCA_MAX_STREAMS
std::vector< cl_kernel > kernels
cl_command_queue command_queue[GPUCA_MAX_STREAMS]