ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::ChannelPort< C > Class Template Reference

the channels of a family seen by one worker More...

#include <ADS/parallel/Channels.h>

Public member functions

 ChannelPort (C &c, std::size_t i)
 the port of the worker \( i \) on the channels \( c \)
std::size_t tryPush (std::size_t to, std::span< const typename C::Message > m)
 the messages of \( m \) pushed to the inbox of to, as many as fit
template<class F>
std::size_t drain (F &&f)
 the calls f( x ) on the messages of the inbox of the worker
std::size_t index (void) const
 the worker of the port

Detailed description

template<class C>
class ADS::ChannelPort< C >

the channels of a family seen by one worker

Constructor and destructor documentation

◆ ChannelPort()

template<class C>
ADS::ChannelPort< C >::ChannelPort ( C & c,
std::size_t i )
inline

the port of the worker \( i \) on the channels \( c \)

Member function documentation

◆ drain()

template<class C>
template<class F>
std::size_t ADS::ChannelPort< C >::drain ( F && f)
inline

the calls f( x ) on the messages of the inbox of the worker

◆ index()

template<class C>
std::size_t ADS::ChannelPort< C >::index ( void ) const
inlinenodiscard

the worker of the port

◆ tryPush()

template<class C>
std::size_t ADS::ChannelPort< C >::tryPush ( std::size_t to,
std::span< const typename C::Message > m )
inline

the messages of \( m \) pushed to the inbox of to, as many as fit


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