ATLAS Offline Software
LinearTransformAsyncExampleAlg.h
Go to the documentation of this file.
1 // Dear emacs, this is -*- c++ -*-
2 //
3 // Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4 //
5 #ifndef ATHEXCUDA_LINEARTRANSFORMASYNCEXAMPLEALG_H
6 #define ATHEXCUDA_LINEARTRANSFORMASYNCEXAMPLEALG_H
7 
8 // Framework include(s).
9 #include "GaudiKernel/ServiceHandle.h"
11 
12 // STL
13 #include <vector>
14 
15 namespace AthCUDAExamples {
16 
24 
25  public:
26  // Inherit the base class's constructor(s).
27  using AthAsynchronousAlgorithm::AthAsynchronousAlgorithm;
28 
30  virtual StatusCode execute( const EventContext& ctx ) const override;
31 
32  private:
34  StatusCode linearTransform(std::vector<float>& arr, float multiplier) const;
35 
36  }; // class LinearTransformAsyncExampleAlg
37 
38 } // namespace AthCUDAExamples
39 
40 #endif // ATHEXCUDA_LINEARTRANSFORMASYNCEXAMPLEALG_H
AthCUDAExamples
Definition: cudaMultiply.h:11
AthAsynchronousAlgorithm
An algorithm that can be suspended while work is offloaded to an accelerator.
Definition: AthAsynchronousAlgorithm.h:28
AthCUDAExamples::LinearTransformAsyncExampleAlg::linearTransform
StatusCode linearTransform(std::vector< float > &arr, float multiplier) const
GPU kernel launcher.
AthCUDAExamples::LinearTransformAsyncExampleAlg
Example algorithm demonstrating the use of CUDA in an AthAsynchronousAlgorithm.
Definition: LinearTransformAsyncExampleAlg.h:23
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
AthAsynchronousAlgorithm.h
AthCUDAExamples::LinearTransformAsyncExampleAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
Definition: LinearTransformAsyncExampleAlg.cxx:10