Public Member Functions | List of all members
ThreadedLoop< In, Out, Local > Class Template Referenceabstract

#include <tjthread.h>

Inheritance diagram for ThreadedLoop< In, Out, Local >:
Inheritance graph
[legend]

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, typename Local>
class ThreadedLoop< In, Out, Local >

Class to parallelize loops.

Definition at line 223 of file tjthread.h.

Constructor & Destructor Documentation

§ ThreadedLoop()

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

Default constructor.

Definition at line 230 of file tjthread.h.

Member Function Documentation

§ destroy()

template<typename In , typename Out , typename Local >
void ThreadedLoop< In, Out, Local >::destroy ( )

Stops the worker threads.

Definition at line 60 of file tjthread_code.h.

§ execute()

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

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

Definition at line 74 of file tjthread_code.h.

§ init()

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

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

Definition at line 30 of file tjthread_code.h.


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