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:
Collaboration diagram for SimpleComputation:

List of all members.


 Struct to specify computations. More...

Public Member Functions

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

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.

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.

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: