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

#include <pfunc/predicate.hpp>

List of all members.

Public Types

typedef task_traits< ValueType >
::attribute 
attribute
typedef task_traits< ValueType >
::functor 
functor
typedef compare_task_ptr
< attribute, functor
compare_type
typedef bool result_type
typedef ValueType * value_type

Public Member Functions

 waiting_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
compare_type comp

Detailed Description

template<typename ValueType>
struct pfunc::detail::waiting_predicate_pair< prioS, ValueType >

Define the waiting stealing predicate for the priority queue type. We have to ensure that we are stealing a task, which has at least the same priority as the one that we are waiting on. This prevents deadlocks from occuring.


Member Typedef Documentation

template<typename ValueType >
typedef task_traits<ValueType>::attribute pfunc::detail::waiting_predicate_pair< prioS, ValueType >::attribute
template<typename ValueType >
typedef compare_task_ptr<attribute, functor> pfunc::detail::waiting_predicate_pair< prioS, ValueType >::compare_type
template<typename ValueType >
typedef task_traits<ValueType>::functor pfunc::detail::waiting_predicate_pair< prioS, ValueType >::functor
template<typename ValueType >
typedef bool pfunc::detail::waiting_predicate_pair< prioS, ValueType >::result_type
template<typename ValueType >
typedef ValueType* pfunc::detail::waiting_predicate_pair< prioS, ValueType >::value_type

Constructor & Destructor Documentation

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

Initialize the previous task.


Member Function Documentation

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

Only pick a task that has lower priority than the task which we are waiting to complete.

Parameters:
[in]current_taskPointer to the task that is being chosen.
template<typename ValueType >
bool pfunc::detail::waiting_predicate_pair< prioS, 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 >
compare_type pfunc::detail::waiting_predicate_pair< prioS, ValueType >::comp
template<typename ValueType >
value_type pfunc::detail::waiting_predicate_pair< prioS, ValueType >::previous_task

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