Class Acts::Cuda::StreamWrapper

class StreamWrapper

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.

Public Functions

StreamWrapper(void *stream, bool ownsStream = true)

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. Constructor with the stream to be wrapped

StreamWrapper(StreamWrapper &&parent)

Move constructor.

StreamWrapper(const StreamWrapper&) = delete

Disabled copy constructor.



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.