|
PFUNC
1.0
|
Implements a group structure across which barriers can be executed. More...
#include <pfunc/group.hpp>
Private Member Functions | |
| PFUNC_DEFINE_EXCEPT_PTR () public | |
| template<typename TaskManager > | |
| void | barrier_steal (TaskManager &taskmgr) |
| Implements the work-stealing barrier. | |
| unsigned int | join_group () |
| void | leave_group (void) |
| unsigned int | get_id () const |
| unsigned int | get_size () const |
| unsigned int | get_barrier () const |
| void | set_id (const unsigned int &gid) |
| void | set_size (const unsigned int &gsize) |
| void | set_barrier (const unsigned int &barr) |
| template<typename TaskManager > | |
| void | barrier (TaskManager &taskmgr) |
| group () | |
| group (const unsigned int &group_id, const unsigned int &group_size) | |
| group (const unsigned int &group_id, const unsigned int &group_size, const unsigned int &barrier) | |
| ~group () | |
Private Attributes | |
| ALIGN128 volatile bool | barrier_phase |
| ALIGN128 volatile unsigned int | barrier_count |
| volatile unsigned int | rank_token |
| unsigned int | group_id |
| unsigned int | group_size |
| mutex | group_lock |
| unsigned int | type_of_barrier |
Friends | |
| bool | operator== (const group &one, const group &two) |
Implements a group structure across which barriers can be executed.
| pfunc::detail::group::group | ( | ) | [inline, private] |
Default constructor
| pfunc::detail::group::group | ( | const unsigned int & | group_id, |
| const unsigned int & | group_size | ||
| ) | [inline, private] |
Parameterized Constructor
| [in] | group_id | ID of the group. |
| [in] | group_size | Size of the group. |
| pfunc::detail::group::group | ( | const unsigned int & | group_id, |
| const unsigned int & | group_size, | ||
| const unsigned int & | barrier | ||
| ) | [inline, private] |
Parameterized Constructor
| [in] | group_id | ID of the group. |
| [in] | group_size | Size of the group. |
| [in] | barrier | Type of the barrier. |
| pfunc::detail::group::~group | ( | ) | [inline, private] |
Destructor
| void pfunc::detail::group::barrier | ( | TaskManager & | taskmgr | ) | [inline, private] |
| [in,out] | taskmgr | The instance that does the steal. |
| void pfunc::detail::group::barrier_steal | ( | TaskManager & | taskmgr | ) | [inline, private] |
Implements the work-stealing barrier.
| [in,out] | taskmgr | The instance of the library that we steal work from. |
| unsigned int pfunc::detail::group::get_barrier | ( | ) | const [inline, private] |
| unsigned int pfunc::detail::group::get_id | ( | ) | const [inline, private] |
| unsigned int pfunc::detail::group::get_size | ( | ) | const [inline, private] |
get_group_size
| unsigned int pfunc::detail::group::join_group | ( | ) | [inline, private] |
| void pfunc::detail::group::leave_group | ( | void | ) | [inline, private] |
Decrements the rank_token by one.
| pfunc::detail::group::PFUNC_DEFINE_EXCEPT_PTR | ( | ) | [inline, private] |
Implements the spinning barrier.
| void pfunc::detail::group::set_barrier | ( | const unsigned int & | barr | ) | [inline, private] |
| barr | Type of the barrier |
| void pfunc::detail::group::set_id | ( | const unsigned int & | gid | ) | [inline, private] |
| gid | Id of the group |
| void pfunc::detail::group::set_size | ( | const unsigned int & | gsize | ) | [inline, private] |
| gsize | Number of tasks in the group |
| [in] | one | The group to be compared |
| [in] | two | The other group to be compared |
ALIGN128 volatile unsigned int pfunc::detail::group::barrier_count [private] |
# tasks active in barrier
ALIGN128 volatile bool pfunc::detail::group::barrier_phase [private] |
Toggle of phases
unsigned int pfunc::detail::group::group_id [private] |
For debugging purposes
mutex pfunc::detail::group::group_lock [private] |
Lock for implementing the barrier
unsigned int pfunc::detail::group::group_size [private] |
Number of tasks in this group
volatile unsigned int pfunc::detail::group::rank_token [private] |
Gives out ranks to tasks
unsigned int pfunc::detail::group::type_of_barrier [private] |
Type of the barrier to be used
1.7.6.1