FastFlow
SVN-r182-Aug-14-2014
A high-level, lock-less, parallel programming (shared-memory) and distributed programming (distributed-memory) framework for multi-cores and many-cores systems
|
Auxiliary classes. More...
Files | |
file | dynlinkedlist.hpp |
Dynamic linked list Single-Writer Single-Reader unbounded queue. Not currently used. | |
file | dynqueue.hpp |
Implementation of a dynamic queue. Not currently used. | |
file | ff_queue.hpp |
Experimental. Not currently used. | |
file | MPMCqueues.hpp |
This file contains several MPMC queue implementations. Not currently used. | |
file | squeue.hpp |
Simple yet efficient (not concurrent) unbounded FIFO queue. | |
file | staticlinkedlist.hpp |
Static Linked List. Not currently used. | |
file | svector.hpp |
Simple yet efficient dynamic vector. | |
file | utils.hpp |
Utility functions. | |
Classes | |
class | ff::Lamport_Buffer |
Implementation of the well-known Lamport's wait-free circular buffer. Not currently used. More... | |
class | ff::MPMC_Ptr_Queue |
An implementation of the bounded Multi-Producer/Multi-Consumer queue. Not currently used. More... | |
class | ff::MSqueue |
Michael and Scott MPMC. Not currently used. More... | |
class | ff::squeue< T > |
Unbound sequential FIFO queue. More... | |
class | ff::svector< T > |
Simple yet efficient dynamic vector. More... | |
Auxiliary classes.
Auxiliary classes: general utility classes and algorithms
class ff::Lamport_Buffer |
Implementation of the well-known Lamport's wait-free circular buffer. Not currently used.
Public Member Functions | |
Lamport_Buffer (unsigned long n, const bool=true) | |
~Lamport_Buffer () | |
bool | init () |
bool | empty () |
bool | available () |
unsigned long | buffersize () const |
bool | push (void *const data) |
bool | pop (void **data) |
void | reset () |
unsigned long | length () const |
|
inline |
Constructor
|
inline |
Destructor
|
inline |
It return true if there is at least one room in the buffer
|
inline |
TODO
|
inline |
It return true if the buffer is empty
|
inline |
It initialize the circular buffer.
true
is returned, otherwise false
is returned. References reset().
|
inline |
TODO
|
inline |
TODO
References empty().
|
inline |
TODO
|
inline |
TODO
class ff::MPMC_Ptr_Queue |
An implementation of the bounded Multi-Producer/Multi-Consumer queue. Not currently used.
This class describes an implementation of the MPMC queue inspired by the solution proposed by Dmitry Vyukov.
Public Member Functions | |
bool | init (size_t size) |
init | |
bool | push (void *const data) |
push: enqueue data More... | |
bool | pop (void **data) |
|
inline |
pop method: dequeue data from the queue.
This is a non-blocking method.
|
inline |
push: enqueue data
This method is non-blocking and costs one CAS per operation.
class ff::MSqueue |
Michael and Scott MPMC. Not currently used.
See: M. Michael and M. Scott, "Simple, Fast, and Practical Non-Blocking and Blocking Concurrent Queue Algorithms", PODC 1996.
The MSqueue implementation is inspired to the one in the liblfds
libraly that is a portable, license-free, lock-free data structure library written in C. The liblfds implementation uses double-word CAS (aka DCAS) whereas this implementation uses only single-word CAS since it relies on a implementation of a memory allocator (used to allocate internal queue nodes) which implements a deferred reclamation algorithm able to solve both the ABA problem and the dangling pointer problem.
More info about liblfds can be found at http://www.liblfds.org
Public Member Functions | |
int | init () |
|
inline |
initialize the MSqueue
class ff::squeue |
Unbound sequential FIFO queue.
class ff::svector |
Simple yet efficient dynamic vector.
This class is defined in svector.hpp
Public Member Functions | |
svector (size_t chunk=SVECTOR_CHUNK) | |
svector (const svector &v) | |
svector (const_iterator i1, const_iterator i2) | |
~svector () | |
svector & | operator= (const svector &v) |
svector & | operator+= (const svector &v) |
void | reserve (size_t newcapacity) |
void | resize (size_t newsize) |
void | push_back (const vector_type &elem) |
void | pop_back () |
vector_type & | back () |
vector_type & | front () |
const vector_type & | front () const |
iterator | erase (iterator where) |
size_t | size () const |
bool | empty () const |
size_t | capacity () const |
void | clear () |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
vector_type & | operator[] (size_t n) |
const vector_type & | operator[] (size_t n) const |
|
inline |
chunk | is the allocation chunk |
|
inline |
Constructor
|
inline |
Constructor
|
inline |
Destructor
|
inline |
back
|
inline |
begin
|
inline |
begin
|
inline |
capacity
|
inline |
clear
|
inline |
empty
|
inline |
end
|
inline |
end
|
inline |
erease
|
inline |
front
|
inline |
front
|
inline |
Merge
|
inline |
Copy
|
inline |
Access element
|
inline |
Access element
|
inline |
pop_back
|
inline |
push_back
|
inline |
Reserve
|
inline |
Resize
|
inline |
size