Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Acts::Cuda::StreamWrapper Class Reference

#include <acts/blob/sPHENIX/Plugins/Cuda/include/Acts/Plugins/Cuda/Utilities/StreamWrapper.hpp>

Public Member Functions

 StreamWrapper (void *stream, bool ownsStream=true)
 Constructor with the stream to be wrapped.
 
 StreamWrapper (StreamWrapper &&parent)
 Move constructor.
 
 StreamWrapper (const StreamWrapper &)=delete
 Disabled copy constructor.
 
 ~StreamWrapper ()
 Destructor.
 
StreamWrapperoperator= (StreamWrapper &&rhs)
 Move assignment operator.
 
StreamWrapperoperator= (const StreamWrapper &)=delete
 Disabled copy assignment operator.
 
void synchronize () const
 Wait for all scheduled operations to finish in the stream.
 

Private Attributes

void * m_stream
 Type erased pointer, managed by this wrapper class.
 
bool m_ownsStream
 Flag showing whether the object owns the stream that it wraps.
 

Detailed Description

Helper class for passing around cudaStream_t objects (pointers)

In order to be able to create user interfaces that return/receive CUDA streams, while not exposing the users of those interfaces to the CUDA Runtime API, this class helps us hiding the concrete CUDA types from our interfaces.

Definition at line 24 of file StreamWrapper.hpp.

View newest version in sPHENIX GitHub at line 24 of file StreamWrapper.hpp

Constructor & Destructor Documentation

Acts::Cuda::StreamWrapper::StreamWrapper ( void *  stream,
bool  ownsStream = true 
)

Constructor with the stream to be wrapped.

Declare the Acts::Cuda::getStreamFrom function a frient of the class

Note that it's not practical to put that function into the Acts::Cuda::details namespace, because then we would be forced to forward declare it in this header.

Acts::Cuda::StreamWrapper::StreamWrapper ( StreamWrapper &&  parent)

Move constructor.

Acts::Cuda::StreamWrapper::StreamWrapper ( const StreamWrapper )
delete

Disabled copy constructor.

Acts::Cuda::StreamWrapper::~StreamWrapper ( )

Destructor.

Member Function Documentation

StreamWrapper& Acts::Cuda::StreamWrapper::operator= ( StreamWrapper &&  rhs)

Move assignment operator.

StreamWrapper& Acts::Cuda::StreamWrapper::operator= ( const StreamWrapper )
delete

Disabled copy assignment operator.

void Acts::Cuda::StreamWrapper::synchronize ( ) const

Wait for all scheduled operations to finish in the stream.

Member Data Documentation

bool Acts::Cuda::StreamWrapper::m_ownsStream
private

Flag showing whether the object owns the stream that it wraps.

Definition at line 56 of file StreamWrapper.hpp.

View newest version in sPHENIX GitHub at line 56 of file StreamWrapper.hpp

void* Acts::Cuda::StreamWrapper::m_stream
private

Type erased pointer, managed by this wrapper class.

Definition at line 54 of file StreamWrapper.hpp.

View newest version in sPHENIX GitHub at line 54 of file StreamWrapper.hpp


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