|
cuDDL
|
Writes search results to files while the GPUs search on. More...
Public Member Functions | |
| Result< void > | write (batch_result_tile const &tile, cuda::stream_ref stream) |
Downloads tile, whose results stream orders, and queues it for writing. | |
| Result< void > | write (replica_tile const &tile) |
| Result< void > | write (std::span< batch_search_result const > rows) |
| Queues results already on the host, such as each genome's top-k neighbours. | |
| Result< void > | finish () |
| Writes everything queued and closes the files, flushing them to storage first if the file is durable. | |
| result_file_statistics | statistics () const |
Static Public Member Functions | |
| static std::vector< std::filesystem::path > | files (std::filesystem::path const &path, unsigned streams) |
The files a result file with streams streams writes for path. | |
| static Result< result_file > | open (std::filesystem::path const &path, result_file_options options={}) |
Creates or truncates the files for path. | |
Writes search results to files while the GPUs search on.
Pass every tile a search delivers to write, from its on_tile callback. A write copies the tile to pinned host memory, or in result_format::similarity converts it on the GPU first, and returns; a thread of the file's expands it into records on every core and writes them, bypassing the page cache where the file system allows. Each stream that delivers tiles gets two host buffers, so its next tile downloads while the last one is written; a write waits only when both are still being written. Tiles reach the file in the order their writes finish downloading, which is the search order when callbacks run one at a time. The buffers are freed on those streams, so call finish, or destroy the file, while they live.
Definition at line 112 of file result_file.cuh.
|
inlinestatic |
The files a result file with streams streams writes for path.
Definition at line 116 of file result_file.cuh.
|
inline |
Writes everything queued and closes the files, flushing them to storage first if the file is durable.
Reports the first error any write met.
Definition at line 158 of file result_file.cuh.
|
inlinestatic |
Creates or truncates the files for path.
Definition at line 127 of file result_file.cuh.
|
inline |
Definition at line 162 of file result_file.cuh.
|
inline |
Downloads tile, whose results stream orders, and queues it for writing.
Thread-safe. The tile's device storage is free for reuse when it returns.
Definition at line 143 of file result_file.cuh.
|
inline |
Definition at line 147 of file result_file.cuh.
|
inline |
Queues results already on the host, such as each genome's top-k neighbours.
Definition at line 152 of file result_file.cuh.