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