Skip to content

Commit 9c90527

Browse files
committed
GPU OpenCL: Add specialization for memclean
1 parent 19acaa2 commit 9c90527

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

GPU/GPUTracking/Base/opencl/GPUReconstructionOCL.cxx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,13 @@ struct GPUReconstructionOCLInternals {
181181
static_assert(std::is_convertible<cl_event, void*>::value, "OpenCL event type incompatible to deviceEvent");
182182
} // namespace o2::gpu
183183

184+
template <>
185+
inline void GPUReconstructionOCLBackend::runKernelBackendInternal<GPUMemClean16, 0>(const krnlSetupTime& _xyz, void* const& ptr, uint64_t const& size)
186+
{
187+
cl_int4 val0 = {0, 0, 0, 0};
188+
GPUFailedMsg(clEnqueueFillBuffer(mInternals->command_queue[_xyz.x.stream], mInternals->mem_gpu, &val0, sizeof(val0), (char*)ptr - (char*)mDeviceMemoryBase, (size + sizeof(val0) - 1) & ~(sizeof(val0) - 1), _xyz.z.evList == nullptr ? 0 : _xyz.z.nEvents, _xyz.z.evList->getEventList<cl_event>(), _xyz.z.ev->getEventList<cl_event>()));
189+
}
190+
184191
#define GPUErrorReturn(...) \
185192
{ \
186193
GPUError(__VA_ARGS__); \

0 commit comments

Comments
 (0)