cuSBF
Loading...
Searching...
No Matches
Namespaces | Concepts | Typedefs | Enumerations | Functions
fastx_dispatch.hpp File Reference
#include <concepts>
#include <cstdint>
#include <filesystem>
#include <functional>
#include <istream>
#include <memory>
#include <string>
#include <string_view>
#include <type_traits>
#include <cusbf/detail/fastx_buffer_reader.hpp>
#include <cusbf/detail/fastx_chunk.cuh>
#include <cusbf/detail/fastx_file_buffer.hpp>
#include <cusbf/detail/fastx_host_memory.cuh>
#include <cusbf/detail/host_parse.hpp>
#include <cusbf/error.hpp>
#include <cusbf/Fastx.hpp>
#include <cusbf/gzstreambuf.hpp>
Include dependency graph for fastx_dispatch.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  cusbf
 
namespace  cusbf::detail
 

Concepts

concept  cusbf::detail::cusbf_result_like
 
concept  cusbf::detail::fastx_dispatch_handler
 Handler invoked by dispatch_fastx_file with either reader type and a dispatch path.
 

Typedefs

template<typename Handler >
using cusbf::detail::fastx_dispatch_handler_result_t = std::invoke_result_t< Handler &, FastxReader &, fastx_dispatch_path >
 Return type of a fastx_dispatch_handler when invoked with a stream reader.
 

Enumerations

enum class  cusbf::detail::fastx_dispatch_path { cusbf::detail::single_chunk_stream , cusbf::detail::single_chunk_mmap , cusbf::detail::chunked_mmap , cusbf::detail::chunked_stream }
 How a FASTX file is read and chunked for GPU processing. More...
 

Functions

constexpr bool cusbf::detail::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 cusbf::detail::fastx_uses_mmap_reader (fastx_dispatch_path path) noexcept
 True when dispatch uses FastxBufferReader over an mmap'd file.
 
template<typename Config >
bool cusbf::detail::fastx_fits_single_gpu_chunk (fastx_chunk_mode mode, double fill_fraction, uint64_t file_bytes)
 Whether the entire file fits in a single GPU staging chunk at fill_fraction.
 
uint64_t cusbf::detail::fastx_single_chunk_stream_max_bytes ()
 Max raw file size for fastx_dispatch_path::single_chunk_stream (istream, no mmap).
 
template<typename Config >
fastx_dispatch_path cusbf::detail::select_fastx_dispatch_path_for_file_bytes (uint64_t file_bytes, fastx_chunk_mode mode, double fill_fraction, bool file_fits_in_memory)
 Selects mmap vs stream and single- vs multi-chunk processing from file size.
 
template<typename Config >
fastx_dispatch_path cusbf::detail::select_fastx_dispatch_path (const std::filesystem::path &path, fastx_chunk_mode mode, double fill_fraction)
 Selects mmap vs stream and single- vs multi-chunk processing for a path.
 
template<typename Config , fastx_dispatch_handler Handler>
fastx_dispatch_handler_result_t< Handlercusbf::detail::dispatch_fastx_file (const std::filesystem::path &path, fastx_chunk_mode mode, double fill_fraction, Handler &&handler)
 Opens a FASTX path and invokes handler with a reader and dispatch path.