WRENCH  1.11
Cyberinfrastructure Simulation Workbench
Overview Installation Getting Started WRENCH 101 WRENCH 102
CustomParallelModel.h
1 
10 #ifndef WRENCH_CUSTOMPARALLELMODEL_H
11 #define WRENCH_CUSTOMPARALLELMODEL_H
12 
13 #include "wrench/workflow/parallel_model/ParallelModel.h"
14 
15 #include <vector>
16 #include <functional>
17 
18 namespace wrench {
19 
24 
25  public:
26 
27  /***********************/
29  /***********************/
30 
31  std::vector<double> getWorkPerThread(double total_work, unsigned long num_threads) override;
32  ~CustomParallelModel() override {}
33 
34  /***********************/
36  /***********************/
37 
38  protected:
39 
40  private:
41  friend class ParallelModel;
42 
43  CustomParallelModel(std::function<std::vector<double>(double, unsigned long)> lambda);
44 
45  std::function<std::vector<double>(double, unsigned long)> lambda;
46  };
47 
48 
49 }
50 
51 #endif //WRENCH_CUSTOMPARALLELMODEL_H
wrench::CustomParallelModel::getWorkPerThread
std::vector< double > getWorkPerThread(double total_work, unsigned long num_threads) override
Returns the amount of work each thread much perform.
Definition: CustomParallelModel.cpp:34
wrench::CustomParallelModel
A class that defines a custom parallel task performance model.
Definition: CustomParallelModel.h:23
wrench
Definition: Action.cpp:28
wrench::ParallelModel
A virtual class (with convenient static methods) to define parallel task performance models.
Definition: ParallelModel.h:23