#include <functional.h>
Public Types | |
typedef Ftor::result_type | result_type |
typedef Ftor::argument_type | argument_type |
Public Member Functions | |
unary_function_count () | |
result_type | operator() (const argument_type &aArg) |
bool | operator== (const unary_function_count &aUFC) const |
Private Types | |
typedef atomic< size_t > | atom_type |
This atomic type used a a counter of function calls. | |
Private Attributes | |
atom_type::atomic_type | _cnt |
This allows to check that algorithms work correctly : Typically, a functor must be called once per input element, whatever the number of threads is, or if the algorithm is called sequentially. Therefore, we can have a better proof that at the end of a parallel computation, things worked properly.
typedef Ftor::argument_type rpa::unary_function_count< Ftor >::argument_type |
typedef atomic<size_t> rpa::unary_function_count< Ftor >::atom_type [private] |
This atomic type used a a counter of function calls.
typedef Ftor::result_type rpa::unary_function_count< Ftor >::result_type |
rpa::unary_function_count< Ftor >::unary_function_count | ( | ) | [inline] |
The same functor may be called simultaneously by several threads. Therefore the need of an atomic counter.
result_type rpa::unary_function_count< Ftor >::operator() | ( | const argument_type & | aArg | ) | [inline] |
bool rpa::unary_function_count< Ftor >::operator== | ( | const unary_function_count< Ftor > & | aUFC | ) | const [inline] |
atom_type::atomic_type rpa::unary_function_count< Ftor >::_cnt [private] |