ATLAS Offline Software
Loading...
Searching...
No Matches
AthExHIP/src/LinearTransformExampleAlg.h
Go to the documentation of this file.
1// Dear emacs, this is -*- c++ -*-
2//
3// Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
4//
5#ifndef ATHEXHIP_LINEARTRANSFORMEXAMPLEALG_H
6#define ATHEXHIP_LINEARTRANSFORMEXAMPLEALG_H
7
8// Framework include(s).
10#include "Gaudi/Property.h"
11
12namespace AthHIPExamples {
13
22
23 public:
25 using AthReentrantAlgorithm::AthReentrantAlgorithm;
26
29
31 virtual StatusCode initialize() override;
33 virtual StatusCode execute( const EventContext& ctx ) const override;
34
36
37 private:
39 Gaudi::Property< int > m_hipDevice{ this, "HIPDevice", 0,
40 "The HIP device to use with the algorithm" };
41
43 Gaudi::Property< unsigned int > m_arraySize{ this, "ArraySize", 10000,
44 "Size of the float array to perform a linear transformation on" };
45
47 Gaudi::Property< float > m_multiplier{ this, "Multiplier", 1.23f,
48 "Multiplier used in the example linear transformation" };
49
50 Gaudi::Property< float > m_shift{ this, "Shift", 2.34f,
51 "Shift used in the example linear transformation" };
52
53 }; // class LinearTransformExampleAlg
54
55} // namespace AthHIPExamples
56
57#endif // ATHEXHIP_LINEARTRANSFORMEXAMPLEALG_H
Example algorithm running a very simple operation using SYCL.
Gaudi::Property< int > m_hipDevice
The HIP device (ID) to use.
Gaudi::Property< float > m_multiplier
The multiplier of the linear transformation.
Gaudi::Property< unsigned int > m_arraySize
Size of the dummy array to use.
Gaudi::Property< float > m_shift
Shift used in the linear transformation.
virtual StatusCode execute(const EventContext &ctx) const override
The function executing this algorithm.
virtual StatusCode initialize() override
The function initialising the algorithm.
An algorithm that can be simultaneously executed in multiple threads.