ATLAS Offline Software
Loading...
Searching...
No Matches
AthHIP::SingleStreamSvc Class Reference

Service providing HIP streams to (reentrant) algorithms. More...

#include <SingleStreamSvc.h>

Inheritance diagram for AthHIP::SingleStreamSvc:
Collaboration diagram for AthHIP::SingleStreamSvc:

Public Member Functions

Function(s) inherited from @c AthAlgTool
virtual StatusCode initialize () override
 Initialize the tool.
Function(s) inherited from @c IStreamSvc
virtual hipStream_t stream (const EventContext &ctx) const override
 Get the HIP stream to use.

Private Attributes

std::unique_ptr< const Details::Streamm_stream
 Single HIP stream.

Detailed Description

Service providing HIP streams to (reentrant) algorithms.

In a very simple way. By having one HIP stream. Period.

Definition at line 25 of file AthHIP/AthHIPComps/src/SingleStreamSvc.h.

Member Function Documentation

◆ initialize()

StatusCode AthHIP::SingleStreamSvc::initialize ( )
overridevirtual

Initialize the tool.

Definition at line 13 of file AthHIP/AthHIPComps/src/SingleStreamSvc.cxx.

13 {
14
15 // Create the stream object.
16 m_stream = std::make_unique<const Details::Stream>();
17
18 // Tell the user what happened.
19 ATH_MSG_INFO("Initialized HIP stream on device: " << m_stream->name());
20
21 // Return gracefully.
22 return StatusCode::SUCCESS;
23}
#define ATH_MSG_INFO(x,...)
std::unique_ptr< const Details::Stream > m_stream
Single HIP stream.

◆ stream()

hipStream_t AthHIP::SingleStreamSvc::stream ( const EventContext & ctx) const
overridevirtual

Get the HIP stream to use.

Parameters
ctxThe event context for which the stream is requested
Returns
The HIP stream to use for the current event context

Definition at line 25 of file AthHIP/AthHIPComps/src/SingleStreamSvc.cxx.

25 {
26
27 // Get the stream corresponding to the current slot.
28 assert(m_stream);
29 assert(m_stream->stream());
30 return m_stream->stream();
31}

Member Data Documentation

◆ m_stream

std::unique_ptr<const Details::Stream> AthHIP::SingleStreamSvc::m_stream
private

Single HIP stream.

Definition at line 53 of file AthHIP/AthHIPComps/src/SingleStreamSvc.h.


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