 |
ATLAS Offline Software
|
Go to the documentation of this file.
4 #ifndef ATHEXXRT_VECTORADDOCLEXAMPLEALG_H
5 #define ATHEXXRT_VECTORADDOCLEXAMPLEALG_H
17 #include "GaudiKernel/ServiceHandle.h"
33 using ::AthReentrantAlgorithm::AthReentrantAlgorithm;
53 this,
"DeviceMgmtSvc",
"AthXRT::DeviceMgmtSvc",
54 "The XRT device manager service to use"};
69 std::vector<AthXRT::IDeviceMgmtSvc::OpenCLHandle>
m_handles;
80 std::unique_ptr<cl::Kernel>
m_kernel =
nullptr;
83 std::unique_ptr<cl::CommandQueue>
m_queue =
nullptr;
102 #endif // ATHEXXRT_VECTORADDOCLEXAMPLEALG_H
static constexpr int s_krnl_param_out
uint32_t * m_host_buf_out
std::unique_ptr< cl::Buffer > m_dev_buf_out
virtual StatusCode stop() override
SG::SlotSpecificObj< SlotData > m_slots
List of slot-specific data.
static constexpr char s_krnl_name[]
std::unique_ptr< cl::CommandQueue > m_queue
Kernel run object.
static constexpr int s_krnl_param_in1
ServiceHandle< AthXRT::IDeviceMgmtSvc > m_DeviceMgmtSvc
The XRT device manager to use.
An algorithm that can be simultaneously executed in multiple threads.
virtual StatusCode stop_worker() override
clean up
Base class to provide common infrastructure for handling multiprocess state transitions for FPGA....
std::unique_ptr< cl::Buffer > m_dev_buf_in1
Buffer objects.
uint32_t * m_host_buf_in1
Maintain a set of objects, one per slot.
::StatusCode StatusCode
StatusCode definition for legacy code.
std::shared_ptr< cl::Context > m_context
OpenCL context pointer.
static constexpr int s_krnl_param_size
std::unique_ptr< cl::Kernel > m_kernel
Kernel object.
std::vector< AthXRT::IDeviceMgmtSvc::OpenCLHandle > m_handles
std::unique_ptr< cl::Buffer > m_dev_buf_in2
uint32_t * m_host_buf_in2
virtual StatusCode initialize() override
static constexpr int s_krnl_param_in2
Maintain a set of objects, one per slot.
virtual StatusCode initialize_worker() override
Initialization per process.
static constexpr int s_element_count
Example algorithm exercising the AthXRT core services.
virtual StatusCode initialize_global() override
Glocal XRT initialization.
virtual StatusCode execute(const EventContext &ctx) const override
std::shared_ptr< cl::Program > m_program
OpenCL program pointer.