ThreadedLoop< In, Out > Class Template Reference
[Classes for basic data types and vectors/arrays (tjutils library)]

#include <tjthread.h>

Inheritance diagram for ThreadedLoop< In, Out >:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 ThreadedLoop ()
bool init (unsigned int numof_threads, unsigned int loopsize)
void destroy ()
bool execute (const In &in, STD_vector< Out > &outvec)


Detailed Description

template<typename In, typename Out>
class ThreadedLoop< In, Out >

Class to parallelize loops.

Definition at line 223 of file tjthread.h.


Constructor & Destructor Documentation

template<typename In, typename Out>
ThreadedLoop< In, Out >::ThreadedLoop (  )  [inline]

Default constructor.

Definition at line 230 of file tjthread.h.


Member Function Documentation

template<typename In, typename Out>
bool ThreadedLoop< In, Out >::init ( unsigned int  numof_threads,
unsigned int  loopsize 
) [inline]

Initialize to use 'numof_threads' executing 'loopsize' jobs in parallel. Starts the worker threads.

Definition at line 30 of file tjthread_code.h.

template<typename In, typename Out>
void ThreadedLoop< In, Out >::destroy (  )  [inline]

Stops the worker threads.

Definition at line 60 of file tjthread_code.h.

template<typename In, typename Out>
bool ThreadedLoop< In, Out >::execute ( const In &  in,
STD_vector< Out > &  outvec 
) [inline]

Execute loop using input 'in' and storing result from each thread in 'outvec'.

Definition at line 74 of file tjthread_code.h.


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

Generated on Wed Sep 30 15:33:28 2009 by  doxygen 1.5.6