rpa::thread_stack< Ftor, Thr >::node Class Reference

#include <synchro.h>

Inheritance diagram for rpa::thread_stack< Ftor, Thr >::node:

rpa::future< Ftor, Thr > List of all members.

Public Types

typedef Ftor::result_type result_type

Public Member Functions

 node (Ftor &aFtor, Thr &aThr)

Private Attributes

node_next

Friends

class iterator
class thread_stack

template<class Ftor, class Thr>
class rpa::thread_stack< Ftor, Thr >::node


Member Typedef Documentation

template<class Ftor, class Thr>
typedef Ftor::result_type rpa::thread_stack< Ftor, Thr >::node::result_type

Reimplemented from rpa::future< Ftor, Thr >.


Constructor & Destructor Documentation

template<class Ftor, class Thr>
rpa::thread_stack< Ftor, Thr >::node::node ( Ftor &  aFtor,
Thr &  aThr 
) [inline]

The constructor launches the sub-thread. We MUST cross a memory barrier before launching the sub-threads : Because of '_refFtor' and '_refThr'.


Friends And Related Function Documentation

template<class Ftor, class Thr>
friend class iterator [friend]

template<class Ftor, class Thr>
friend class thread_stack [friend]


Member Data Documentation

template<class Ftor, class Thr>
node* rpa::thread_stack< Ftor, Thr >::node::_next [private]

Pointer to the next 'node' object, of the same algorithm execution, by another thread. These 'node' objects are organised into a chained list, created by recursive calls, with one element by sub-thread. All 'node' objects are stored on the stack. Once they are all created, the main thread waits for sub-threads termination, and does reduction in original and natural evaluation order. It is done by 'reduction()' called at the deepest recursive level : This ensures that all temporary 'node' objects created on the stack are still available.


The documentation for this class was generated from the following file:
Generated on Tue Sep 25 10:20:39 2007 for rpa by  doxygen 1.4.7