32template <
typename Config,
typename FastxReaderType,
typename Adapter>
76 if (
stream.get() ==
nullptr &&
adapter.supports_pipelined()) {
88 chunk.raw_sequence_bytes(),
112 chunk.raw_sequence_bytes(),
120 CUSBF_TRY(adapter.flush_sync(chunk, stream));
121 return adapter.finish();
Accumulates parsed FASTX records into a dense RecordBatchView.
Two non-blocking CUDA streams for overlapping chunk H2D and kernel work.
FastxPipelineReleaseGuard(FastxPipelineState &state)
FastxPipelineReleaseGuard(const FastxPipelineReleaseGuard &)=delete
~FastxPipelineReleaseGuard()
FastxPipelineReleaseGuard & operator=(const FastxPipelineReleaseGuard &)=delete
#define CUSBF_TRY(expr)
Propagates a cusbf::Result failure from the enclosing function (GNU statement expression).
size_t fastx_host_chunk_max_bytes()
Optional host assembly byte cap before flush (debug / low-RAM safety valve).
Result< cuda_free_memory > query_cuda_free_memory()
Queries current device free memory via cudaMemGetInfo.
uint64_t fastx_file_bytes(const std::filesystem::path &path)
constexpr size_t fastx_pipelined_chunk_budget(fastx_chunk_mode mode, size_t staging_budget_bytes) noexcept
Per-chunk flush budget for dual-stream ping-pong (two device sequence buffers).
fastx_dispatch_path
How a FASTX file is read and chunked for GPU processing.
constexpr bool fastx_is_single_chunk_path(fastx_dispatch_path path) noexcept
True for fastx_dispatch_path::single_chunk_stream or fastx_dispatch_path::single_chunk_mmap.
constexpr bool fastx_uses_mmap_reader(fastx_dispatch_path path) noexcept
True when dispatch uses FastxBufferReader over an mmap'd file.
Result< typename Adapter::report_type > run_fastx_pipeline(FastxReaderType &reader, std::string_view source_name, double fill_fraction, cuda::stream_ref stream, fastx_dispatch_path dispatch_path, FastxPipelineState &state, Adapter &&adapter)
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...
Result< bool > collect_next_fastx_record(FastxReaderType &reader, FastxRecord &record, DenseRecordBatchBuilder &chunk)
Appends the next FASTX record from reader into chunk.
cuda::std::unexpected< Error > Err(Error error)
Failure return; converts to any Result<T> via cuda::std::unexpected.
static Error resource(std::string message)
Fallible API result: cuda::std::expected<T, Error> with cuSBF factories.
A single sequence record extracted from a FASTA/FASTQ stream.