Public Types | Public Member Functions | List of all members
rapidsmpf::streaming::AllGather Class Reference

Asynchronous (coroutine) interface to coll::AllGather. More...

#include <allgather.hpp>

Public Types

using Ordered = rapidsmpf::coll::AllGather::Ordered
 Tag requesting ordering for extraction. More...
 

Public Member Functions

 AllGather (std::shared_ptr< Context > ctx, std::shared_ptr< Communicator > comm, OpID op_id)
 Construct an asynchronous allgather. More...
 
 AllGather (AllGather const &)=delete
 
AllGatheroperator= (AllGather const &)=delete
 
 AllGather (AllGather &&)=delete
 
AllGatheroperator= (AllGather &&)=delete
 
std::shared_ptr< Context > const & ctx () const noexcept
 Gets the streaming context associated with this AllGather object. More...
 
std::shared_ptr< Communicator > const & comm () const noexcept
 Gets the communicator associated with this AllGather. More...
 
void insert (std::uint64_t sequence_number, PackedData &&chunk)
 Insert a chunk into the allgather. More...
 
void insert_finished ()
 Mark that this rank has finished contributing data. More...
 
coro::task< std::vector< PackedData > > extract_all (Ordered ordered=Ordered::YES)
 Extract all gathered data. More...
 

Detailed Description

Asynchronous (coroutine) interface to coll::AllGather.

Once the AllGather is created, many tasks may insert data into it. If multiple tasks insert data, the user is responsible for arranging that insert_finished is only called after all insertions have completed. A single consumer task should extract data.

Definition at line 31 of file allgather.hpp.

Member Typedef Documentation

◆ Ordered

Tag requesting ordering for extraction.

Definition at line 34 of file allgather.hpp.

Constructor & Destructor Documentation

◆ AllGather()

rapidsmpf::streaming::AllGather::AllGather ( std::shared_ptr< Context ctx,
std::shared_ptr< Communicator comm,
OpID  op_id 
)

Construct an asynchronous allgather.

Parameters
ctxStreaming context
commCommunicator for the collective operation.
op_idUnique identifier for the allgather.

Member Function Documentation

◆ comm()

std::shared_ptr<Communicator> const& rapidsmpf::streaming::AllGather::comm ( ) const
noexcept

Gets the communicator associated with this AllGather.

Returns
Shared pointer to communicator.

◆ ctx()

std::shared_ptr<Context> const& rapidsmpf::streaming::AllGather::ctx ( ) const
noexcept

Gets the streaming context associated with this AllGather object.

Returns
Shared pointer to context.

◆ extract_all()

coro::task<std::vector<PackedData> > rapidsmpf::streaming::AllGather::extract_all ( Ordered  ordered = Ordered::YES)

Extract all gathered data.

Parameters
orderedIf the extracted data should be ordered. If ordered, return data will be ordered first by rank and then by sequence number of the inserted chunks on that rank.
Returns
Coroutine that completes when all data is available for extraction and returns the data.

◆ insert()

void rapidsmpf::streaming::AllGather::insert ( std::uint64_t  sequence_number,
PackedData &&  chunk 
)

Insert a chunk into the allgather.

Parameters
sequence_numberThe sequence number for this chunk.
chunkThe chunk to insert.

◆ insert_finished()

void rapidsmpf::streaming::AllGather::insert_finished ( )

Mark that this rank has finished contributing data.


The documentation for this class was generated from the following file: