Adding another method to simply add the increment.
This commit is contained in:
parent
77d5c44664
commit
3e73710245
@ -62,6 +62,12 @@ public:
|
|||||||
++_current_value;
|
++_current_value;
|
||||||
printStatus(_current_value);
|
printStatus(_current_value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void printAddition(const unsigned addition) {
|
||||||
|
#pragma omp atomic
|
||||||
|
_current_value += addition;
|
||||||
|
printStatus(_current_value);
|
||||||
|
}
|
||||||
private:
|
private:
|
||||||
unsigned _current_value;
|
unsigned _current_value;
|
||||||
unsigned _maxValue;
|
unsigned _maxValue;
|
||||||
|
Loading…
Reference in New Issue
Block a user