TPIE

11a2c2d
tpie::pipelining::internal_passive_buffer< T > Class Template Reference

Internal fifo buffer. More...

#include <tpie/pipelining/internal_buffer.h>

Public Types

typedef T item_type
 
typedef bits::internal_buffer_input_t< T > input_t
 
typedef bits::internal_buffer_pull_output_t< T > output_t
 

Public Member Functions

 internal_passive_buffer (size_t size, size_t additional_item_size=0)
 Construct a factory for the buffer. More...
 
input_t raw_input ()
 
output_t raw_output ()
 
inputpipe_t input ()
 Return pipe node where items are pushed into the buffer Pushing items into a full buffer causes undefined behaviour. More...
 
outputpipe_t output ()
 Return pipe node where items in the buffer can be pulled from Pulling from the empty buffer causes undefined behaviour. More...
 

Detailed Description

template<typename T>
class tpie::pipelining::internal_passive_buffer< T >

Internal fifo buffer.

Represents an internal buffer with limited capacity.

Definition at line 102 of file internal_buffer.h.

Constructor & Destructor Documentation

◆ internal_passive_buffer()

template<typename T >
tpie::pipelining::internal_passive_buffer< T >::internal_passive_buffer ( size_t  size,
size_t  additional_item_size = 0 
)
inline

Construct a factory for the buffer.

Note
The factory may be destroied after input and output has been called, it does not need to stay around util after the nodes have been destroied.
Parameters
sizeThe maximal number of elements the buffer will hold.
additional_item_sizeif itemas have a size different then sizeof(T), say if the malloc stuff internally, this additional size will be accounted for per element

Definition at line 126 of file internal_buffer.h.

127  : size(size)
128  , additional_item_size(additional_item_size) {}

Member Function Documentation

◆ input()

template<typename T >
inputpipe_t tpie::pipelining::internal_passive_buffer< T >::input ( )
inline

Return pipe node where items are pushed into the buffer Pushing items into a full buffer causes undefined behaviour.

Definition at line 142 of file internal_buffer.h.

142  {
143  return inputfact_t(input_token, size, additional_item_size);
144  }

◆ output()

template<typename T >
outputpipe_t tpie::pipelining::internal_passive_buffer< T >::output ( )
inline

Return pipe node where items in the buffer can be pulled from Pulling from the empty buffer causes undefined behaviour.

Definition at line 150 of file internal_buffer.h.

150  {
151  return outputfact_t(input_token);
152  }

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