PFUNC  1.0
Public Types | Public Member Functions | Public Attributes
pfunc::detail::group_predicate_pair< cilkS, ValueType > Struct Template Reference

#include <pfunc/predicate.hpp>

List of all members.

Public Types

typedef task_traits< ValueType >
::attribute 
attribute
typedef attribute::level_type level_type
typedef bool result_type
typedef ValueType * value_type

Public Member Functions

 group_predicate_pair (value_type previous_task)
bool own_pred (value_type current_task) const
bool steal_pred (value_type current_task) const

Public Attributes

value_type previous_task

Detailed Description

template<typename ValueType>
struct pfunc::detail::group_predicate_pair< cilkS, ValueType >

Define the group stealing predicate for the cilk queue type. We have to ensure that we are only stealing a task that is at the same level in the spawn tree or lower. This is important to prevent thread stack explosion. Also important is to not steal anything in the same group as the task executing the group.


Member Typedef Documentation

template<typename ValueType >
typedef task_traits<ValueType>::attribute pfunc::detail::group_predicate_pair< cilkS, ValueType >::attribute
template<typename ValueType >
typedef attribute::level_type pfunc::detail::group_predicate_pair< cilkS, ValueType >::level_type
template<typename ValueType >
typedef bool pfunc::detail::group_predicate_pair< cilkS, ValueType >::result_type
template<typename ValueType >
typedef ValueType* pfunc::detail::group_predicate_pair< cilkS, ValueType >::value_type

Constructor & Destructor Documentation

template<typename ValueType >
pfunc::detail::group_predicate_pair< cilkS, ValueType >::group_predicate_pair ( value_type  previous_task) [inline]

Initialize the previous task.


Member Function Documentation

template<typename ValueType >
bool pfunc::detail::group_predicate_pair< cilkS, ValueType >::own_pred ( value_type  current_task) const [inline]

Return true only if the current_task is lower in the execution tree and is not of the same group as the previous_task that we were executing

Parameters:
[in]current_taskThe candidate task that we want to check for suitability.
template<typename ValueType >
bool pfunc::detail::group_predicate_pair< cilkS, ValueType >::steal_pred ( value_type  current_task) const [inline]

Same as own_pred()

Parameters:
[in]current_taskPointer to the task that is being chosen.

Member Data Documentation

template<typename ValueType >
value_type pfunc::detail::group_predicate_pair< cilkS, ValueType >::previous_task

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