YANE-Framework Tutorial 1.1.0
Classes | Public Member Functions | Protected Member Functions

SimpleComputation Class Reference

Class to do an example of parallel computations. More...

#include <simplecomputation.h>

Inheritance diagram for SimpleComputation:
[legend]
Collaboration diagram for SimpleComputation:
[legend]

List of all members.

Classes

struct  T_COMPUTATIONINFO
 Struct to specify computations. More...

Public Member Functions

 SimpleComputation (const std::string &name, yane::Utils::DebugMaster *dm, int threads)
 Constructor.

Protected Member Functions

virtual void compute (yane::Utils::ParallelComputing::T_TASKINFO *task, yane::Utils::DebugClient *debugclient)
 Overwritten computation function.

Detailed Description

This class extends ParallelComputing and shows the use of this class.

Definition at line 30 of file simplecomputation.h.


Constructor & Destructor Documentation

SimpleComputation::SimpleComputation ( const std::string &  name,
yane::Utils::DebugMaster dm,
int  threads 
)

This creates the manager object.

Parameters:
nameName of the manager
dmDebugmaster to debug on.
threadsCount of threads to create and use.

Definition at line 22 of file simplecomputation.cpp.


Member Function Documentation

void SimpleComputation::compute ( yane::Utils::ParallelComputing::T_TASKINFO task,
yane::Utils::DebugClient debugclient 
) [protected, virtual]

Overwritten function to let the thread sleep depending on its weight.

Parameters:
taskPointer to struct with time to sleep.

Implements yane::Utils::ParallelComputing.

Definition at line 29 of file simplecomputation.cpp.

Here is the call graph for this function: