A thread-safe container for managing received chunks stratified by partition ID.
More...
#include <postbox.hpp>
A thread-safe container for managing received chunks stratified by partition ID.
Definition at line 72 of file postbox.hpp.
◆ ReceivedChunks()
| rapidsmpf::shuffler::detail::ReceivedChunks::ReceivedChunks |
( |
std::size_t |
num_keys_hint = 0 | ) |
|
|
inline |
Construct a new container.
- Parameters
-
| num_keys_hint | The number of keys to reserve space for. |
Definition at line 79 of file postbox.hpp.
◆ empty()
| bool rapidsmpf::shuffler::detail::ReceivedChunks::empty |
( |
| ) |
const |
Checks if the container is empty.
- Returns
true if the container is empty, false otherwise.
- Note
- The result reflects a snapshot at the time of the call and may change immediately afterward.
◆ extract()
| std::vector<Chunk> rapidsmpf::shuffler::detail::ReceivedChunks::extract |
( |
PartID |
pid | ) |
|
Extracts all chunks associated with a specific partition.
- Parameters
-
| pid | The ID of the partition. |
- Returns
- A vector of chunks.
- Exceptions
-
| std::out_of_range | If the partition is not found. |
◆ insert()
| void rapidsmpf::shuffler::detail::ReceivedChunks::insert |
( |
Chunk && |
chunk | ) |
|
Insert a chunk.
- Parameters
-
| chunk | The chunk to insert. |
◆ is_empty()
| bool rapidsmpf::shuffler::detail::ReceivedChunks::is_empty |
( |
PartID |
pid | ) |
const |
Check whether the specified partition contains any chunks.
- Parameters
-
| pid | Identifier of the partition to query. |
- Returns
- True if the partition contains no chunks, false otherwise.
- Note
- The result reflects a snapshot at the time of the call and may change immediately afterward.
◆ spill()
| std::size_t rapidsmpf::shuffler::detail::ReceivedChunks::spill |
( |
BufferResource * |
br, |
|
|
std::size_t |
amount |
|
) |
| |
Spill device data.
The spilling is stream ordered by the spilled buffers' CUDA streams.
- Parameters
-
| br | The buffer resource for host and device allocations. |
| amount | Requested amount of data to spill in bytes. |
- Returns
- Actual amount of data spilled in bytes.
◆ str()
| std::string rapidsmpf::shuffler::detail::ReceivedChunks::str |
( |
| ) |
const |
- Returns
- A description of this container.
The documentation for this class was generated from the following file:
- /__w/rapidsmpf/rapidsmpf/cpp/include/rapidsmpf/shuffler/postbox.hpp