|
cuDDL
|
Thread-safe source of the all-to-all tiles one process searches. More...
Classes | |
| struct | tile |
Public Member Functions | |
| all_to_all_tile_queue (all_to_all_tile_queue &&other) noexcept | |
| std::optional< tile > | claim () noexcept |
| The next unclaimed tile, or nothing once all are claimed or after cancel. | |
| void | cancel () noexcept |
| Makes every later claim of this queue return nothing, for example after a device failed. | |
| bool | shared () const noexcept |
Whether processes share the tiles through a next_tile counter. | |
| uint32_t | tile_queries () const noexcept |
| Query rows per tile (the last tile may hold fewer). | |
| size_t | size () const noexcept |
| Tiles this process owns, or every tile of the search when they are shared. | |
| uint32_t | reference_count () const noexcept |
| Reference count the tiles cover. | |
| size_t | position (uint32_t first_query_id) const noexcept |
Position, in claim order, of the tile starting at first_query_id. | |
Static Public Member Functions | |
| static Result< all_to_all_tile_queue > | make (uint32_t reference_count, all_to_all_shard shard={}, uint32_t searchers=1U, std::function< uint64_t()> next_tile={}) |
Thread-safe source of the all-to-all tiles one process searches.
Tiles hold detail::all_to_all_tile_queries(reference_count, shard.count * searchers) query rows, so each of the shard.count * searchers searches gets about four. The process keeps the tiles shard owns, and concurrent searches, typically one per device, claim them one at a time, largest first. A device that finishes early simply claims more, so devices of different speeds share the work without a fixed split.
With next_tile, processes share the tiles instead of keeping those shard assigns: next_tile returns the next unclaimed tile number of the whole search, counting from 0 across every process, and must not throw. A faster process then claims more tiles, as a faster device does within one process. shard.count still sizes the tiles; pass the number of processes. See shared_tile_counter in distributed.cuh for a counter shared over MPI.
Definition at line 1023 of file reference_database.cuh.
|
inlinenoexcept |
Definition at line 1058 of file reference_database.cuh.
|
inlinenoexcept |
Makes every later claim of this queue return nothing, for example after a device failed.
Other processes sharing the tiles keep claiming.
Definition at line 1077 of file reference_database.cuh.
|
inlinenoexcept |
The next unclaimed tile, or nothing once all are claimed or after cancel.
Definition at line 1067 of file reference_database.cuh.
|
inlinestatic |
Definition at line 1030 of file reference_database.cuh.
|
inlinenoexcept |
Position, in claim order, of the tile starting at first_query_id.
Definition at line 1102 of file reference_database.cuh.
|
inlinenoexcept |
Reference count the tiles cover.
Definition at line 1097 of file reference_database.cuh.
|
inlinenoexcept |
Whether processes share the tiles through a next_tile counter.
Definition at line 1082 of file reference_database.cuh.
|
inlinenoexcept |
Tiles this process owns, or every tile of the search when they are shared.
Definition at line 1092 of file reference_database.cuh.
|
inlinenoexcept |
Query rows per tile (the last tile may hold fewer).
Definition at line 1087 of file reference_database.cuh.