Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PsMultiThreadedBenchmarkingController Class Reference

a controller that uses a multi-threaded benchmarking scheduler More...

#include <PsMultiThreadedBenchmarkingController.h>

Inheritance diagram for PsMultiThreadedBenchmarkingController:

Inheritance graph
[legend]
Collaboration diagram for PsMultiThreadedBenchmarkingController:

Collaboration graph
[legend]
List of all members.

Public Methods

 PsMultiThreadedBenchmarkingController (PsObjectDescriptor &initialObjects, const PsDate &initialDate)
 constructor

virtual ~PsMultiThreadedBenchmarkingController ()
 destructor

virtual PsnSchedulercreateScheduler ()
 redefine to create a multihtreaded scheduler


Detailed Description

a controller that uses a multi-threaded benchmarking scheduler

Author:
David Margery ( last change by )
Version:

Definition at line 32 of file PsMultiThreadedBenchmarkingController.h.


Constructor & Destructor Documentation

PsMultiThreadedBenchmarkingController::PsMultiThreadedBenchmarkingController PsObjectDescriptor   initialObjects,
const PsDate   initialDate
 

constructor

Parameters:
numberOfThreads the number of threads to create

Definition at line 22 of file PsMultiThreadedBenchmarkingController.cxx.

References PsDate.

00023                                                                                                           : 
00024    PsBenchController<PsMultiThreadedController>(initialObjects,
00025                                                 initialDate)
00026 {
00027 
00028 }

PsMultiThreadedBenchmarkingController::~PsMultiThreadedBenchmarkingController   [virtual]
 

destructor

Definition at line 30 of file PsMultiThreadedBenchmarkingController.cxx.

00031 {
00032 
00033 }


Member Function Documentation

PsnScheduler * PsMultiThreadedBenchmarkingController::createScheduler   [virtual]
 

redefine to create a multihtreaded scheduler

Reimplemented from PsBenchController< PsMultiThreadedController >.

Definition at line 35 of file PsMultiThreadedBenchmarkingController.cxx.

References PsBenchController< PsMultiThreadedController >::_endSamplingDate, PsBenchController< PsMultiThreadedController >::_file, PsController::_nbStepsByCycle, PsBenchController< PsMultiThreadedController >::_numberOfSamples, PsBenchController< PsMultiThreadedController >::_sampleIndex, PsBenchController< PsMultiThreadedController >::_startSamplingDate, PsController::_stepPeriod, and PsController::initialSimulationDate.

00036 {
00037    PsnScheduler * res ;
00038 
00039    if (_startSamplingDate<PsController::initialSimulationDate) 
00040       {
00041          _startSamplingDate=PsController::initialSimulationDate;
00042          cout<<"PsBenchController::WARNING : no values before PsController::initialSimulationDate ("
00043              <<PsController::initialSimulationDate<<")"<<endl;
00044       }
00045 
00046    _numberOfSamples = (_endSamplingDate-_startSamplingDate)/_stepPeriod + 1;
00047 
00048    if ( _file != NULL ) 
00049       {
00050          res = new PsnMultiThreadedBenchmarkingScheduler(_nbStepsByCycle, 
00051                                                          _numberOfThreads, 
00052                                                          true, 
00053                                                          _sampleIndex, 
00054                                                          _numberOfSamples,
00055                                                          *_file) ;
00056       }
00057    else 
00058       {
00059          res = new PsnMultiThreadedBenchmarkingScheduler(_nbStepsByCycle, 
00060                                                          _numberOfThreads, 
00061                                                          true,
00062                                                          _sampleIndex, 
00063                                                          _numberOfSamples, 
00064                                                          cout ) ;
00065       }
00066    return res ;
00067 
00068 }


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

Documentation generated on Mon Nov 25 15:26:12 2002

Generated with doxygen 1.2.12 by Dimitri van Heesch ,   1997-2001