WRENCH
1.11
Cyberinfrastructure Simulation Workbench
Overview
Installation
Getting Started
WRENCH 101
WRENCH 102
APIs Reference
User
Developer
Internal
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Functions
Typedefs
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
y
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
y
~
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Enumerations
Enumerator
c
d
e
f
k
n
p
r
s
t
u
Files
File List
•
All
Classes
Namespaces
Functions
Variables
Typedefs
Enumerations
Enumerator
Pages
include
wrench
workflow
parallel_model
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
23
class
CustomParallelModel
:
public
ParallelModel
{
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