The Gaudi Framework  master (952cacb4)
Loading...
Searching...
No Matches
CUDAStream.h
Go to the documentation of this file.
1/***********************************************************************************\
2* (c) Copyright 2023-2026 CERN for the benefit of the LHCb and ATLAS collaborations *
3* *
4* This software is distributed under the terms of the Apache version 2 licence, *
5* copied verbatim in the file "LICENSE". *
6* *
7* In applying this licence, CERN does not waive the privileges and immunities *
8* granted to it by virtue of its status as an Intergovernmental Organization *
9* or submit itself to any jurisdiction. *
10\***********************************************************************************/
11#pragma once
12// Gaudi
14
15// Forward declaration hack so we can have a cudaStream_t member here
16struct CUstream_st;
17typedef struct CUstream_st* cudaStream_t;
18
19namespace Gaudi::CUDA {
20 class Stream {
21 private:
23 const bool m_owning;
27
28 public:
33 ~Stream();
34
36 operator cudaStream_t();
37
39 const Gaudi::Algorithm* parent();
40
43
46
48 void registerDependency();
49
51 void removeDependency();
52 };
53} // namespace Gaudi::CUDA
struct CUstream_st * cudaStream_t
Definition CUDAStream.h:17
Base class from which all concrete algorithm classes should be derived.
Definition Algorithm.h:87
Base class for asynchronous algorithms.
const Gaudi::AsynchronousAlgorithm * m_async_parent
Definition CUDAStream.h:25
void removeDependency()
INTERNAL: Remove a dependency.
const Gaudi::AsynchronousAlgorithm * asyncParent()
Access the parent AsynchronousAlgorithm.
void registerDependency()
INTERNAL: Register a dependency.
Stream(const Gaudi::Algorithm *parent, cudaStream_t stream)
Wrap an existing cudaStream.
const bool m_owning
Definition CUDAStream.h:23
StatusCode await()
Yield fiber until stream is done.
const Gaudi::Algorithm * parent()
Access the parent algorithm.
const Gaudi::Algorithm * m_parent
Definition CUDAStream.h:24
cudaStream_t m_stream
Definition CUDAStream.h:22
This class is used for returning status codes from appropriate routines.
Definition StatusCode.h:64