3#include <cuda_runtime.h>
35 streams_ =
other.streams_;
49 return {streams_.at(index)};
63 std::array<cudaStream_t, 2> streams_{
nullptr,
nullptr};
Two non-blocking CUDA streams for overlapping chunk H2D and kernel work.
ChunkStreamPair(ChunkStreamPair &&other) noexcept
ChunkStreamPair(const ChunkStreamPair &)=delete
Result< void > sync_all() const
Blocks until both streams complete.
ChunkStreamPair & operator=(const ChunkStreamPair &)=delete
cuda::stream_ref operator[](size_t index) const noexcept
Non-blocking stream at index (0 or 1).
ChunkStreamPair & operator=(ChunkStreamPair &&other) noexcept
#define CUSBF_CUDA_ABORT(expr)
Checks a CUDA call and aborts on failure (destructors and RAII only).
#define CUSBF_CUDA_TRY(expr)
Propagates a CUDA error wrapped in cusbf::Result<void>.
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...
Fallible API result: cuda::std::expected<T, Error> with cuSBF factories.