ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaExamples
AthExHIP
src
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).
9
#include "
AthenaBaseComps/AthReentrantAlgorithm.h
"
10
#include "Gaudi/Property.h"
11
12
#include "
DeviceStateHandler.h
"
13
14
namespace
AthHIPExamples
{
15
23
class
LinearTransformExampleAlg
:
public
::AthReentrantAlgorithm
,
public
DeviceStateHandler
{
24
25
public
:
27
using
AthReentrantAlgorithm::AthReentrantAlgorithm;
28
31
33
virtual
StatusCode
execute
(
const
EventContext& ctx )
const override
;
34
36
40
//virtual StatusCode initialize_global() override;
41
virtual
StatusCode
initialize_worker
()
override
;
43
44
private
:
46
Gaudi::Property< int >
m_hipDevice
{
this
,
"HIPDevice"
, 0,
47
"The HIP device to use with the algorithm"
};
48
50
Gaudi::Property< unsigned int >
m_arraySize
{
this
,
"ArraySize"
, 10000,
51
"Size of the float array to perform a linear transformation on"
};
52
54
Gaudi::Property< float >
m_multiplier
{
this
,
"Multiplier"
, 1.23f,
55
"Multiplier used in the example linear transformation"
};
56
57
Gaudi::Property< float >
m_shift
{
this
,
"Shift"
, 2.34f,
58
"Shift used in the example linear transformation"
};
59
60
};
// class LinearTransformExampleAlg
61
62
}
// namespace AthHIPExamples
63
64
#endif
// ATHEXHIP_LINEARTRANSFORMEXAMPLEALG_H
AthReentrantAlgorithm.h
DeviceStateHandler.h
AthHIPExamples::DeviceStateHandler
Base class to provide common infrastructure for handling multiprocess state transitions for GPU.
Definition
DeviceStateHandler.h:28
AthHIPExamples::LinearTransformExampleAlg
Example algorithm running a very simple operation using HIP.
Definition
AthExHIP/src/LinearTransformExampleAlg.h:23
AthHIPExamples::LinearTransformExampleAlg::m_hipDevice
Gaudi::Property< int > m_hipDevice
The HIP device (ID) to use.
Definition
AthExHIP/src/LinearTransformExampleAlg.h:46
AthHIPExamples::LinearTransformExampleAlg::m_multiplier
Gaudi::Property< float > m_multiplier
The multiplier of the linear transformation.
Definition
AthExHIP/src/LinearTransformExampleAlg.h:54
AthHIPExamples::LinearTransformExampleAlg::initialize_worker
virtual StatusCode initialize_worker() override
Initialization per process.
Definition
LinearTransformExampleAlg.cxx:16
AthHIPExamples::LinearTransformExampleAlg::m_arraySize
Gaudi::Property< unsigned int > m_arraySize
Size of the dummy array to use.
Definition
AthExHIP/src/LinearTransformExampleAlg.h:50
AthHIPExamples::LinearTransformExampleAlg::m_shift
Gaudi::Property< float > m_shift
Shift used in the linear transformation.
Definition
AthExHIP/src/LinearTransformExampleAlg.h:57
AthHIPExamples::LinearTransformExampleAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
The function executing this algorithm.
Definition
LinearTransformExampleAlg.cxx:27
AthReentrantAlgorithm
An algorithm that can be simultaneously executed in multiple threads.
Definition
AthReentrantAlgorithm.h:74
AthHIPExamples
Definition
DeviceStateHandler.h:20
Generated on
for ATLAS Offline Software by
1.17.0