Analysis Software
Documentation for sPHENIX simulation software
|
#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. | |
StreamWrapper & | operator= (StreamWrapper &&rhs) |
Move assignment operator. | |
StreamWrapper & | operator= (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. | |
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
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.
|
delete |
Disabled copy constructor.
Acts::Cuda::StreamWrapper::~StreamWrapper | ( | ) |
Destructor.
StreamWrapper& Acts::Cuda::StreamWrapper::operator= | ( | StreamWrapper && | rhs | ) |
Move assignment operator.
|
delete |
Disabled copy assignment operator.
void Acts::Cuda::StreamWrapper::synchronize | ( | ) | const |
Wait for all scheduled operations to finish in the stream.
|
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
|
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