|
ATLAS Offline Software
|
Go to the documentation of this file.
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>>
65 #endif // ATHXRTINTERFACES_IDEVICEMGMTSVC_H
std::shared_ptr< cl::Context > context
DeclareInterfaceID(AthXRT::IDeviceMgmtSvc, 1, 0)
Declare the interface ID.
std::shared_ptr< cl::Program > program
Interface for AthXRT::DeviceMgmtSvc service.
Struct holding OpenCL handles for a kernel.
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.
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.