4#ifndef ATHXRTINTERFACES_IDEVICEMGMTSVC_H
5#define ATHXRTINTERFACES_IDEVICEMGMTSVC_H
8#include "GaudiKernel/IService.h"
9#include "GaudiKernel/StatusCode.h"
12#include <experimental/xrt_system.h>
13#include <xrt/xrt_bo.h>
14#include <xrt/xrt_device.h>
15#include <xrt/xrt_kernel.h>
16#include <xrt/xrt_uuid.h>
20#define CL_HPP_CL_1_2_DEFAULT_BUILD
21#define CL_HPP_TARGET_OPENCL_VERSION 120
22#define CL_HPP_MINIMUM_OPENCL_VERSION 120
23#define CL_HPP_ENABLE_PROGRAM_CONSTRUCTION_FROM_ARRAY_COMPATIBILITY 1
24#define CL_USE_DEPRECATED_OPENCL_1_2_APIS
28#include <CL/cl2xrt.hpp>
49 std::shared_ptr<cl::Context>
context{
nullptr};
50 std::shared_ptr<cl::Program>
program{
nullptr};
54 virtual const std::vector<IDeviceMgmtSvc::OpenCLHandle>
58 virtual const std::vector<std::shared_ptr<xrt::device>>
Interface for AthXRT::DeviceMgmtSvc service.
virtual const std::vector< IDeviceMgmtSvc::OpenCLHandle > get_opencl_handles_by_kernel_name(const std::string &name) const =0
Get a list of OpenCL handles providing the specified kernel.
DeclareInterfaceID(AthXRT::IDeviceMgmtSvc, 1, 0)
Declare the interface ID.
virtual const std::vector< std::shared_ptr< xrt::device > > get_xrt_devices_by_kernel_name(const std::string &name) const =0
Get a list of XRT devices providing the specified kernel.
Struct holding OpenCL handles for a kernel.
std::shared_ptr< cl::Program > program
std::shared_ptr< cl::Context > context