ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Trigger
EFTracking
EFTrackingFPGAIntegration
EFTrackingFPGAPipeline
EFTrackingFPGAPipeline
IntegrationBase.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3
*/
4
11
12
#ifndef EFTRACKING_FPGA_INTEGRATION_INTEGRATION_BASE_H
13
#define EFTRACKING_FPGA_INTEGRATION_INTEGRATION_BASE_H
14
15
// Athena include
16
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
17
18
19
// OpenCL settings and include for Xilinx U250 accelerator card
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
25
// OpenCL include
26
#include "CL/cl2.hpp"
27
28
// STL include
29
#include <string>
30
#include <vector>
31
37
class
IntegrationBase
:
public
AthReentrantAlgorithm
38
{
39
public
:
40
using
AthReentrantAlgorithm::AthReentrantAlgorithm;
41
47
virtual
StatusCode
initialize
()
override
;
48
52
virtual
StatusCode
execute
(
const
EventContext &ctx)
const
;
53
57
StatusCode
loadProgram
(
const
std::string& xclbin);
58
62
StatusCode
precheck
(
const
std::vector<Gaudi::Property<std::string>>& inputs)
const
;
63
64
protected
:
65
// Madatory OpenCL objects that needed by derived classes
66
cl::Device
m_accelerator
;
67
cl::Context
m_context
;
68
cl::Program
m_program
;
69
Gaudi::Property<std::string>
m_deviceBDF
{
this
,
"bdfID"
,
""
,
"BDF ID of the accelerator card"
};
70
Gaudi::Property<bool>
m_doEmulation
{
this
,
"doEmulation"
,
false
,
"If software or hardware emulation is being used for debugging"
};
71
};
72
73
#endif
// EFTRACKING_FPGA_INTEGRATION_INTEGRATION_BASE_H
74
AthReentrantAlgorithm.h
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
IntegrationBase
The base class for the EFTracking FPGA integration development.
Definition
IntegrationBase.h:38
IntegrationBase::loadProgram
StatusCode loadProgram(const std::string &xclbin)
Find the xclbin file and load it into the OpenCL program object.
Definition
IntegrationBase.cxx:115
IntegrationBase::m_program
cl::Program m_program
Program object containing the kernel.
Definition
IntegrationBase.h:68
IntegrationBase::m_doEmulation
Gaudi::Property< bool > m_doEmulation
Definition
IntegrationBase.h:70
IntegrationBase::initialize
virtual StatusCode initialize() override
Detect the OpenCL devices and prepare OpenCL context.
Definition
IntegrationBase.cxx:16
IntegrationBase::m_context
cl::Context m_context
Context object for the application.
Definition
IntegrationBase.h:67
IntegrationBase::precheck
StatusCode precheck(const std::vector< Gaudi::Property< std::string > > &inputs) const
Check if the the desired Gaudi properties are set.
Definition
IntegrationBase.cxx:154
IntegrationBase::m_deviceBDF
Gaudi::Property< std::string > m_deviceBDF
BDF ID of the accelerator card.
Definition
IntegrationBase.h:69
IntegrationBase::m_accelerator
cl::Device m_accelerator
Device object for the accelerator card.
Definition
IntegrationBase.h:66
IntegrationBase::execute
virtual StatusCode execute(const EventContext &ctx) const
Should be overriden by derived classes to perform meaningful work.
Definition
IntegrationBase.cxx:108
Generated on
for ATLAS Offline Software by
1.17.0