Subordination
A framework for distributed programming
Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
sbn::basic_pipeline< T, Kernels, Traits, Threads, Mutex, Lock, Semaphore > Class Template Referenceabstract
Inheritance diagram for sbn::basic_pipeline< T, Kernels, Traits, Threads, Mutex, Lock, Semaphore >:
[legend]
Collaboration diagram for sbn::basic_pipeline< T, Kernels, Traits, Threads, Mutex, Lock, Semaphore >:
[legend]

Public Types

typedef T kernel_type
 
typedef Kernels kernel_pool
 
typedef Threads thread_pool
 
typedef Mutex mutex_type
 
typedef Lock lock_type
 
typedef Semaphore sem_type
 
typedef Traits traits_type
 
- Public Types inherited from sbn::pipeline_base
typedef std::chrono::system_clock clock_type
 
typedef clock_type::time_point time_point
 
typedef clock_type::duration duration
 

Public Member Functions

 basic_pipeline (unsigned concurrency) noexcept
 
 basic_pipeline (basic_pipeline &&rhs) noexcept
 
 basic_pipeline (const basic_pipeline &)=delete
 
basic_pipelineoperator= (const basic_pipeline &)=delete
 
void send (kernel_type *k)
 
void send (kernel_type **kernels, size_t n)
 
void start ()
 
void stop ()
 
void wait ()
 
unsigned concurrency () const noexcept
 
- Public Member Functions inherited from sbn::pipeline_base
 pipeline_base (pipeline_base &&)=default
 
 pipeline_base (const pipeline_base &)=delete
 
pipeline_baseoperator= (pipeline_base &)=delete
 
void setstate (pipeline_state rhs) noexcept
 
pipeline_state state () const noexcept
 
bool is_starting () const noexcept
 
bool has_started () const noexcept
 
bool is_running () const noexcept
 
bool is_stopping () const noexcept
 
bool has_stopped () const noexcept
 
time_point start_time_point () const noexcept
 
bool has_start_time_point () const noexcept
 
const char * name () const noexcept
 
void set_name (const char *rhs) noexcept
 
void set_number (unsigned rhs) noexcept
 
template<class ... Args>
void log (const Args &... args) const
 
void log_error (const std::exception &err) const
 

Protected Types

typedef std::vector< std::unique_ptr< kernel_type > > kernel_sack
 
typedef queue_pop_iterator< kernel_pool, traits_type > queue_popper
 

Protected Member Functions

void xstop ()
 
virtual void do_run ()=0
 
virtual void run (Thread_context *context)
 

Protected Attributes

kernel_pool _kernels
 
thread_pool _threads
 
mutex_type _mutex
 
sem_type _semaphore
 
- Protected Attributes inherited from sbn::pipeline_base
volatile pipeline_state _state = pipeline_state::initial
 
time_point _start = time_point(duration::zero())
 
const char * _name = "ppl"
 
unsigned _number = 0
 

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