ATLAS Offline Software
Loading...
Searching...
No Matches
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
15namespace 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
An algorithm that can be suspended while work is offloaded to an accelerator.
Example algorithm demonstrating the use of CUDA in an AthAsynchronousAlgorithm.
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
StatusCode linearTransform(std::vector< float > &arr, float multiplier) const
GPU kernel launcher.