-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathOp.cpp
More file actions
36 lines (29 loc) · 678 Bytes
/
Op.cpp
File metadata and controls
36 lines (29 loc) · 678 Bytes
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
#include "Op.h"
bool Op::forwardHasNext() {
return forwardRound < forwardTotal;
}
bool Op::backHasNext() {
return backRound < backTotal;
}
void Op::init() {
init(1, 1);
}
void Op::init(int forwardTotal, int backTotal) {
forwardRound = 0;
this->forwardTotal = forwardTotal;
backRound = 0;
this->backTotal = backTotal;
localRound = 0;
}
void Op::reset() {
forwardRound = 0;
backRound = 0;
}
void Op::reinit() {
forwardRound = (localRound == globalRound) ? forwardRound : 0;
localRound = globalRound;
forwardRound++;
}
void Op::print() {
DBGprint("forward round: %d forward total: %d\n", forwardRound, forwardTotal);
}