13 #include <CL/cl_ext.h>
21 return StatusCode::SUCCESS;
37 return StatusCode::FAILURE;
44 posix_memalign((
void **)&inputTV, 4096,
sizeof(
uint32_t) * 4096);
45 posix_memalign((
void **)&outputTV, 4096,
sizeof(
uint32_t) * 4096);
50 while (ifs >> std::hex >> cache)
61 for (
int i = 0;
i < 10;
i++)
63 ATH_MSG_DEBUG(
"inputTV[" << std::dec <<
i <<
"] = " << std::hex << inputTV[
i]);
78 acc_kernel.setArg<
uint>(0, 0);
79 acc_kernel.setArg<cl::Buffer>(1, acc_inbuff);
80 acc_kernel.setArg<cl::Buffer>(2, acc_outbuff);
85 acc_queue.enqueueWriteBuffer(acc_inbuff, CL_TRUE, 0,
sizeof(
uint32_t) * 4096, inputTV, NULL, NULL);
87 err = acc_queue.enqueueTask(acc_kernel);
89 acc_queue.enqueueReadBuffer(acc_outbuff, CL_TRUE, 0,
sizeof(
uint32_t) * 4096, outputTV, NULL, NULL);
95 for (
int i = 0;
i < 10;
i++)
97 ATH_MSG_DEBUG(
"outputTV[" << std::dec <<
i <<
"] = " << std::hex << outputTV[
i]);
103 return StatusCode::SUCCESS;