|
cuDDL
|
Loader state a build fed by paths keeps for its whole run. More...
Public Member Functions | |
| path_loaders (cuda::stream_ref stream, std::span< std::filesystem::path const > paths, unsigned parser_workers, bool page_locked, bool in_place, uint32_t pack_k, bool direct_reads) | |
| size_t | workers () const noexcept |
| Loaders this build runs. | |
| size_t | page_locked_buffers () const noexcept |
| Page-locked buffers the loaders held, for the statistics. | |
| Result< std::unique_ptr< fastx_sequence_file > > | take (std::span< std::filesystem::path const > paths, size_t id) |
Loads genome id, through the pool when the build runs more than one loader. | |
| void | reset () noexcept |
| Joins the loaders. They hold leases, so pool state is only readable after this. | |
Static Public Member Functions | |
| static size_t | worker_count (size_t paths, unsigned parser_workers) noexcept |
| Loaders to run: at most one per input, at most the requested workers, at most the hardware, and never none. | |
Loader state a build fed by paths keeps for its whole run.
Reused decompression buffers avoid repeated allocations, and can be page-locked for DMA. The pool hands out load results a few files ahead of the consumer, which takes them in order. A window of one worker-worth leaves the consumer waiting on a straggler while every other loader sits idle.
Definition at line 1022 of file database_staging.cuh.
|
inline |
| stream | Stream owning the loader buffers. |
| paths | Genome files in reference-ID order. |
| parser_workers | Loader ceiling; the build clamps it to inputs and hardware. |
| page_locked | gives the loaders page-locked buffers to decompress into. |
| in_place | says the stager's kernels read the loaders' buffers themselves. |
| pack_k | packs FASTA into two-bit words for k-mers this long, a quarter of the bytes to stage, as pack_fastx_sequence_file does. |
| direct_reads | reads files with O_DIRECT, as read_whole_file does. |
Definition at line 1032 of file database_staging.cuh.
|
inlinenoexcept |
Page-locked buffers the loaders held, for the statistics.
Definition at line 1064 of file database_staging.cuh.
|
inlinenoexcept |
Joins the loaders. They hold leases, so pool state is only readable after this.
Definition at line 1078 of file database_staging.cuh.
|
inline |
Loads genome id, through the pool when the build runs more than one loader.
Definition at line 1070 of file database_staging.cuh.
|
inlinestaticnoexcept |
Loaders to run: at most one per input, at most the requested workers, at most the hardware, and never none.
Definition at line 1084 of file database_staging.cuh.
|
inlinenoexcept |
Loaders this build runs.
The pool allocates buffers lazily, independently of the number of loader threads.
Definition at line 1059 of file database_staging.cuh.