ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Control
AthenaExamples
AthExCUDA
src
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"
10
#include "
AthenaBaseComps/AthAsynchronousAlgorithm.h
"
11
12
// CUDA include(s).
13
#include <cuda_runtime_api.h>
14
15
// STL
16
#include <vector>
17
18
namespace
AthCUDAExamples
{
19
26
class
LinearTransformAsyncExampleAlg
:
public
AthAsynchronousAlgorithm
{
27
28
public
:
29
// Inherit the base class's constructor(s).
30
using
AthAsynchronousAlgorithm::AthAsynchronousAlgorithm;
31
33
virtual
StatusCode
execute
(
const
EventContext& ctx )
const override
;
34
35
};
// class LinearTransformAsyncExampleAlg
36
38
void
linearTransform
(cudaStream_t stream, std::vector<float>& arr,
float
multiplier);
39
40
}
// namespace AthCUDAExamples
41
42
#endif
// ATHEXCUDA_LINEARTRANSFORMASYNCEXAMPLEALG_H
AthAsynchronousAlgorithm.h
AthAsynchronousAlgorithm
An algorithm that can be suspended while work is offloaded to an accelerator.
Definition
AthAsynchronousAlgorithm.h:28
AthCUDAExamples::LinearTransformAsyncExampleAlg
Example algorithm demonstrating the use of CUDA in an AthAsynchronousAlgorithm.
Definition
LinearTransformAsyncExampleAlg.h:26
AthCUDAExamples::LinearTransformAsyncExampleAlg::execute
virtual StatusCode execute(const EventContext &ctx) const override
Function executing the algorithm.
Definition
LinearTransformAsyncExampleAlg.cxx:13
AthCUDAExamples
Definition
cudaMultiply.h:11
AthCUDAExamples::linearTransform
void linearTransform(cudaStream_t stream, std::vector< float > &arr, float multiplier)
GPU kernel launcher.
Generated on
for ATLAS Offline Software by
1.17.0