ATLAS Offline Software
Loading...
Searching...
No Matches
AthCUDA::AsyncCopyTool::Stream Struct Reference

Helper structure for managing a CUDA stream in memory. More...

Collaboration diagram for AthCUDA::AsyncCopyTool::Stream:

Public Member Functions

 Stream ()
 Constructor, creating the CUDA stream.
 ~Stream ()
 Destructor, destroying the CUDA stream.

Public Attributes

cudaStream_t m_stream {nullptr}
 The CUDA stream to use for asynchronous copies.

Detailed Description

Helper structure for managing a CUDA stream in memory.

Definition at line 45 of file AsyncCopyTool.h.

Constructor & Destructor Documentation

◆ Stream()

AthCUDA::AsyncCopyTool::Stream::Stream ( )

Constructor, creating the CUDA stream.

Definition at line 28 of file AsyncCopyTool.cxx.

28 {
29 CUDA_ERROR_CHECK(cudaStreamCreate(&m_stream));
30}
#define CUDA_ERROR_CHECK(EXP)
Helper macro used for checking cudaError_t type return values.
cudaStream_t m_stream
The CUDA stream to use for asynchronous copies.

◆ ~Stream()

AthCUDA::AsyncCopyTool::Stream::~Stream ( )

Destructor, destroying the CUDA stream.

Let's not check for errors here.

Since that would introduce a struct that may throw in its destructor. Which we don't want.

Definition at line 34 of file AsyncCopyTool.cxx.

34 {
35 cudaStreamDestroy(m_stream);
36}

Member Data Documentation

◆ m_stream

cudaStream_t AthCUDA::AsyncCopyTool::Stream::m_stream {nullptr}

The CUDA stream to use for asynchronous copies.

Definition at line 51 of file AsyncCopyTool.h.

51{nullptr};

The documentation for this struct was generated from the following files: