ATLAS Offline Software
Loading...
Searching...
No Matches
Stream.h
Go to the documentation of this file.
1//
2// Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3//
4#ifndef ATHCUDASERVICES_STREAM_H
5#define ATHCUDASERVICES_STREAM_H
6
7// CUDA include(s).
8#include <cuda_runtime_api.h>
9
10// System include(s).
11#include <string>
12
13namespace AthCUDA::Details {
14
16class Stream {
17
18 public:
20 Stream();
22 ~Stream();
23
25 cudaStream_t stream() const;
26
28 std::string name() const;
29
30 private:
32 cudaStream_t m_stream{nullptr};
33
34}; // class Stream
35
36} // namespace AthCUDA::Details
37
38#endif // ATHCUDASERVICES_STREAM_H
cudaStream_t m_stream
The CUDA stream to use for asynchronous copies.
Definition Stream.h:32
Stream()
Constructor, creating the CUDA stream.
Definition Stream.cxx:28
std::string name() const
Get the name of the device associated with the stream.
Definition Stream.cxx:48
cudaStream_t stream() const
Get the CUDA stream.
Definition Stream.cxx:38
~Stream()
Destructor, destroying the CUDA stream.
Definition Stream.cxx:34