WRENCH  1.11
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
ParallelModel.h
1 
10 #ifndef WRENCH_PARALLELMODEL_H
11 #define WRENCH_PARALLELMODEL_H
12 
13 #include <vector>
14 #include <memory>
15 #include <functional>
16 
17 namespace wrench {
18 
23  class ParallelModel {
24 
25  public:
26 
27  static std::shared_ptr<ParallelModel> AMDAHL(double alpha);
28  static std::shared_ptr<ParallelModel> CONSTANTEFFICIENCY(double efficiency);
29  static std::shared_ptr<ParallelModel> CUSTOM(std::function<std::vector<double>(double, long)> lambda);
30 
31  /***********************/
33  /***********************/
34 
44  virtual std::vector<double> getWorkPerThread(double total_work, unsigned long num_threads) = 0;
45  virtual ~ParallelModel() {};
46 
47  /***********************/
49  /***********************/
50 
51  private:
52 
53  };
54 
55 }
56 
57 #endif //WRENCH_PARALLELMODEL_H
wrench::ParallelModel::AMDAHL
static std::shared_ptr< ParallelModel > AMDAHL(double alpha)
Create an instance of an "Amdahl" parallel model.
Definition: ParallelModel.cpp:31
wrench::ParallelModel::CUSTOM
static std::shared_ptr< ParallelModel > CUSTOM(std::function< std::vector< double >(double, long)> lambda)
Create an instance of a "Custom" parallel model.
Definition: ParallelModel.cpp:52
wrench::ParallelModel::getWorkPerThread
virtual std::vector< double > getWorkPerThread(double total_work, unsigned long num_threads)=0
A method the, for this parallel model, computes how much work each thread that is part of a parallel ...
wrench
Definition: Action.cpp:28
wrench::ParallelModel
A virtual class (with convenient static methods) to define parallel task performance models.
Definition: ParallelModel.h:23
wrench::ParallelModel::CONSTANTEFFICIENCY
static std::shared_ptr< ParallelModel > CONSTANTEFFICIENCY(double efficiency)
Create an instance of a "Constant Efficiency" parallel model.
Definition: ParallelModel.cpp:41