OKlibrary  0.2.1.6
OKlib::Parallelism::Counter< N > Class Template Reference

Functor class, counting a counter down, to simulate some operation. More...

#include <ExperimentalThreads.hpp>

Inheritance diagram for OKlib::Parallelism::Counter< N >:
OKlib::Parallelism::CounterWithMutex< N >

List of all members.

Public Types

typedef unsigned int uint_type

Public Member Functions

 Counter ()
 Counter (const uint_type n)
void operator() () const

Static Public Member Functions

static uint_type counter ()

Detailed Description

template<int N>
class OKlib::Parallelism::Counter< N >

Functor class, counting a counter down, to simulate some operation.

Contains a static unsigned integer "counter", which is initialised by Counter(n), while Counter() does not change the current value. For an object c of type Counter the call c() runs through counter*multiplier many simple assignments. The purpose of the template parameter is to create independent classes.

Definition at line 38 of file ExperimentalThreads.hpp.


Member Typedef Documentation

template<int N>
typedef unsigned int OKlib::Parallelism::Counter< N >::uint_type

Definition at line 40 of file ExperimentalThreads.hpp.


Constructor & Destructor Documentation

template<int N>
OKlib::Parallelism::Counter< N >::Counter ( ) [inline]

Definition at line 43 of file ExperimentalThreads.hpp.

template<int N>
OKlib::Parallelism::Counter< N >::Counter ( const uint_type  n) [inline, explicit]

Definition at line 44 of file ExperimentalThreads.hpp.


Member Function Documentation

template<int N>
static uint_type OKlib::Parallelism::Counter< N >::counter ( ) [inline, static]

Definition at line 46 of file ExperimentalThreads.hpp.

template<int N>
void OKlib::Parallelism::Counter< N >::operator() ( ) const [inline]

Reimplemented in OKlib::Parallelism::CounterWithMutex< N >.

Definition at line 47 of file ExperimentalThreads.hpp.


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