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
A class that defines a custom parallel task performance model.
Definition: CustomParallelModel.h:23
Definition: Alarm.cpp:20
A virtual class (with convenient static methods) to define parallel task performance models.
Definition: ParallelModel.h:23