10 #include <rapidsmpf/communicator/communicator.hpp>
11 #include <rapidsmpf/config.hpp>
12 #include <rapidsmpf/error.hpp>
13 #include <rapidsmpf/progress_thread.hpp>
14 #include <rapidsmpf/statistics.hpp>
15 #include <rapidsmpf/streaming/core/channel.hpp>
16 #include <rapidsmpf/streaming/core/queue.hpp>
18 #include <coro/coro.hpp>
41 std::shared_ptr<Communicator>
comm,
43 std::unique_ptr<coro::thread_pool>
executor,
44 std::shared_ptr<BufferResource>
br,
60 std::shared_ptr<Communicator>
comm,
61 std::shared_ptr<BufferResource>
br,
93 [[nodiscard]] std::unique_ptr<coro::thread_pool>&
executor() noexcept;
122 return spillable_messages_;
133 std::size_t buffer_size
138 std::shared_ptr<Communicator> comm_;
139 std::shared_ptr<ProgressThread> progress_thread_;
140 std::unique_ptr<coro::thread_pool> executor_;
141 std::shared_ptr<BufferResource> br_;
142 std::shared_ptr<Statistics> statistics_;
143 std::shared_ptr<SpillableMessages> spillable_messages_;
Class managing buffer resources.
Abstract base class for a communication mechanism between nodes.
A progress thread that can execute arbitrary functions.
std::size_t SpillFunctionID
Represents a unique identifier for a registered spill function.
Track statistics across rapidsmpf operations.
static std::shared_ptr< Statistics > disabled()
Returns a shared pointer to a disabled (no-op) Statistics instance.
Manages configuration options for RapidsMPF operations.
A coroutine-based channel for sending and receiving messages asynchronously.
Context for nodes (coroutines) in rapidsmpf.
std::shared_ptr< Channel > create_channel() const noexcept
Create a new channel associated with this context.
std::shared_ptr< BoundedQueue > create_bounded_queue(std::size_t buffer_size) const noexcept
Create a new bounded queue associated with this context.
Context(config::Options options, std::shared_ptr< Communicator > comm, std::shared_ptr< ProgressThread > progress_thread, std::unique_ptr< coro::thread_pool > executor, std::shared_ptr< BufferResource > br, std::shared_ptr< Statistics > statistics)
Full constructor for the Context.
std::shared_ptr< SpillableMessages > spillable_messages() const
Returns the spillable messages collection.
std::unique_ptr< coro::thread_pool > & executor() noexcept
Returns the coroutine thread pool.
config::Options get_options() const noexcept
Returns the configuration options.
std::shared_ptr< ProgressThread > progress_thread() const noexcept
Returns the progress thread.
Context(config::Options options, std::shared_ptr< Communicator > comm, std::shared_ptr< BufferResource > br, std::shared_ptr< Statistics > statistics=Statistics::disabled())
Convenience constructor with minimal configuration.
BufferResource * br() const noexcept
Returns the buffer resource.
std::shared_ptr< Communicator > comm() const noexcept
Returns the communicator.
std::shared_ptr< Statistics > statistics() const noexcept
Returns the statistics collector.
Container for individually spillable messages.