-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathComputation.h
More file actions
executable file
·79 lines (67 loc) · 2.27 KB
/
Computation.h
File metadata and controls
executable file
·79 lines (67 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/*
* Computation.h
*
* Created on: Nov 11, 2019
* Author: joseph
*/
#ifndef COMPUTATION_H_
#define COMPUTATION_H_
#include "Arduino.h"
class Computation {
public:
/** The main computation which will be calculated is a generic sum based on two for-loops inside each other. The outer
* one can be separated in different sub sums to perform in parallel. Therefore the loopOneStart and loopOneEnd has to be split too.
* The loopOneStart or loopOneEnd can be set through this constructor and will result in different performance/execution time results due to the fact
* that the ESP32 now has more to calculate.
*
* @param specify the loopOneStart property of the outer for-loop in void compute(). For a single core execution, this value will be 0.
* For parallel processing, this threshold has to be evaluated and will be a set of different limits regarding to Benchmark.cpp line 93-95. This limits
* will represent the sub sums, which now can be calculated in different threads.
* @param specify the loopOneEnd property of the outer for-loop in void compute() through @upperLimitSum from Benchmark.h;
* by default, upperLimitSum will be set to 50000 in the constructor of Benchmark.h.
* @param deprecated value loopTwoStart of the inner for-loop; this one should never be changed and is by default 0.
* @param specify the loopTwoEnd property of the inner for-loop in void compute() through @upperLimitMul from Benchmark.h;
* by default, upperLimitMul will be set to 10000 in the constructor of Benchmark.h.
* @param &refParamQueue is necessary for the inner task communication and contains the pointer to the current queue object.
* @return ---
*/
Computation(int loopOneStart, int loopOneEnd, int loopTwoStart,int loopTwoEnd, QueueHandle_t &refParamQueue);
~Computation();
/** ...
*
* @param
* @return ---
*/
void compute();
/** ...
*
* @param
* @return ---
*/
int getLoopOneEnd();
/** ...
*
* @param
* @return ---
*/
int getLoopOneStart();
/** ...
*
* @param
* @return ---
*/
int getLoopTwoEnd();
/** ...
*
* @param
* @return ---
*/
int getLoopTwoStart();
private:
int loopOneStart;
int loopOneEnd;
int loopTwoStart;
int loopTwoEnd;
QueueHandle_t *queue;
};
#endif /* COMPUTATION_H_ */