|
ATLAS Offline Software
|
Go to the documentation of this file.
20 return StatusCode::SUCCESS;
27 int MAX_DATA_SIZE = 46219;
35 for (
int i = 0;
i < 10;
i++)
50 acc_kernel.setArg(0, acc_inbuff);
51 acc_kernel.setArg(1, acc_outbuff);
52 acc_kernel.setArg<
int>(2, spacePointsTV.
inputTV.size());
57 acc_queue.enqueueWriteBuffer(acc_inbuff, CL_TRUE, 0, spacePointsTV.
inputTV.size() *
sizeof(
uint64_t), spacePointsTV.
inputTV.data(), NULL, NULL);
60 acc_queue.enqueueTask(acc_kernel);
64 std::vector<uint64_t>
output(spacePointsTV.
inputTV.size(), 0);
66 acc_queue.enqueueReadBuffer(acc_outbuff, CL_TRUE, 0, spacePointsTV.
inputTV.size() *
sizeof(
uint64_t),
output.data(), NULL, NULL);
71 return StatusCode::SUCCESS;
std::vector< uint64_t > refTV
cl::Device m_accelerator
Device object for the accelerator card.
virtual StatusCode initialize() override
Detect the OpenCL devices and prepare OpenCL context.
cl::Context m_context
Context object for the application.
Class for the spacepoints kernel.
::StatusCode StatusCode
StatusCode definition for legacy code.
Gaudi::Property< std::string > m_kernelName
Kernel name.
StatusCode loadProgram(const std::string &xclbin)
Find the xclbin file and load it into the OpenCL program object.
StatusCode precheck(std::vector< Gaudi::Property< std::string >> inputs) const
Check if the the desired Gaudi properties are set.
StatusCode execute(const EventContext &ctx) const override
Should be overriden by derived classes to perform meaningful work.
Gaudi::Property< std::string > m_refTV
Reference TestVector.
Gaudi::Property< std::string > m_xclbin
Path and name of the xclbin file.
StatusCode initialize() override
Detect the OpenCL devices and prepare OpenCL context.
cl::Program m_program
Program object containing the kernel.
Gaudi::Property< std::string > m_inputTV
Input TestVector.
ToolHandle< TestVectorTool > m_testVectorTool
Tool handle for TestVectorTool.
std::vector< uint64_t > inputTV