OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::gpu::cuda::device::Stream Class Reference

Basic wrapper for device stream. More...

#include <device.h>

+ Collaboration diagram for olb::gpu::cuda::device::Stream:

Public Member Functions

 Stream (unsigned int flags)
 
 ~Stream ()
 
cudaStream_t & get ()
 
void synchronize ()
 

Detailed Description

Basic wrapper for device stream.

Definition at line 121 of file device.h.

Constructor & Destructor Documentation

◆ Stream()

olb::gpu::cuda::device::Stream::Stream ( unsigned int flags)

Definition at line 126 of file device.hh.

126 {
127 cudaStreamCreateWithFlags(&_stream, flags);
128 check();
129}
void check()
Check errors.
Definition device.hh:48

References olb::gpu::cuda::device::check().

+ Here is the call graph for this function:

◆ ~Stream()

olb::gpu::cuda::device::Stream::~Stream ( )

Definition at line 131 of file device.hh.

131 {
132 cudaStreamDestroy(_stream);
133 check();
134}

References olb::gpu::cuda::device::check().

+ Here is the call graph for this function:

Member Function Documentation

◆ get()

cudaStream_t & olb::gpu::cuda::device::Stream::get ( )
inline

Definition at line 129 of file device.h.

129 {
130 return _stream;
131 }
+ Here is the caller graph for this function:

◆ synchronize()

void olb::gpu::cuda::device::Stream::synchronize ( )

Definition at line 136 of file device.hh.

136 {
137 cudaStreamSynchronize(_stream);
138 check();
139}

References olb::gpu::cuda::device::check().

+ Here is the call graph for this function:

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