cuSBF
Loading...
Searching...
No Matches
Public Member Functions | List of all members
cusbf::detail::ChunkStreamPair Class Reference

Two non-blocking CUDA streams for overlapping chunk H2D and kernel work. More...

Public Member Functions

 ChunkStreamPair ()
 
 ChunkStreamPair (const ChunkStreamPair &)=delete
 
ChunkStreamPairoperator= (const ChunkStreamPair &)=delete
 
 ChunkStreamPair (ChunkStreamPair &&other) noexcept
 
ChunkStreamPairoperator= (ChunkStreamPair &&other) noexcept
 
 ~ChunkStreamPair ()
 
cuda::stream_ref operator[] (size_t index) const noexcept
 Non-blocking stream at index (0 or 1).
 
Result< voidsync_all () const
 Blocks until both streams complete.
 

Detailed Description

Two non-blocking CUDA streams for overlapping chunk H2D and kernel work.

Definition at line 15 of file chunk_stream_pair.cuh.

Constructor & Destructor Documentation

◆ ChunkStreamPair() [1/3]

cusbf::detail::ChunkStreamPair::ChunkStreamPair ( )
inline

Definition at line 17 of file chunk_stream_pair.cuh.

17 {
18 for (cudaStream_t& stream : streams_) {
20 }
21 }
#define CUSBF_CUDA_ABORT(expr)
Checks a CUDA call and aborts on failure (destructors and RAII only).
Definition error.hpp:266
consteval bool separatorPositionAlwaysEncodesInvalid(char *input, uint64_t separatorPosition, uint64_t index)
Recursively tests whether placing the separator byte at any position in an input of valid bytes alway...
Definition Alphabet.cuh:37
Here is the call graph for this function:

◆ ChunkStreamPair() [2/3]

cusbf::detail::ChunkStreamPair::ChunkStreamPair ( const ChunkStreamPair )
delete

◆ ChunkStreamPair() [3/3]

cusbf::detail::ChunkStreamPair::ChunkStreamPair ( ChunkStreamPair &&  other)
inlinenoexcept

Definition at line 26 of file chunk_stream_pair.cuh.

26 : streams_{other.streams_} {
27 for (cudaStream_t& stream : other.streams_) {
28 stream = nullptr;
29 }
30 }
Here is the call graph for this function:

◆ ~ChunkStreamPair()

cusbf::detail::ChunkStreamPair::~ChunkStreamPair ( )
inline

Definition at line 43 of file chunk_stream_pair.cuh.

43 {
44 destroy();
45 }

Member Function Documentation

◆ operator=() [1/2]

ChunkStreamPair & cusbf::detail::ChunkStreamPair::operator= ( ChunkStreamPair &&  other)
inlinenoexcept

Definition at line 32 of file chunk_stream_pair.cuh.

32 {
33 if (this != &other) {
34 destroy();
35 streams_ = other.streams_;
36 for (cudaStream_t& stream : other.streams_) {
37 stream = nullptr;
38 }
39 }
40 return *this;
41 }
Here is the call graph for this function:

◆ operator=() [2/2]

ChunkStreamPair & cusbf::detail::ChunkStreamPair::operator= ( const ChunkStreamPair )
delete

◆ operator[]()

cuda::stream_ref cusbf::detail::ChunkStreamPair::operator[] ( size_t  index) const
inlinenoexcept

Non-blocking stream at index (0 or 1).

Definition at line 48 of file chunk_stream_pair.cuh.

48 {
49 return {streams_.at(index)};
50 }

◆ sync_all()

Result< void > cusbf::detail::ChunkStreamPair::sync_all ( ) const
inline

Blocks until both streams complete.

Definition at line 53 of file chunk_stream_pair.cuh.

53 {
54 for (cudaStream_t stream : streams_) {
55 if (stream != nullptr) {
57 }
58 }
59 return {};
60 }
#define CUSBF_CUDA_TRY(expr)
Propagates a CUDA error wrapped in cusbf::Result<void>.
Definition error.hpp:269
Here is the call graph for this function:

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