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