File tree 1 file changed +2
-7
lines changed
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -21,21 +21,16 @@ struct Sum : public Worker
21
21
22
22
// constructors
23
23
Sum (const NumericVector input) : input(input), value(0 ) {}
24
- Sum (const Sum& sum, Split) : input(sum.input), value(0 ) {
25
- printf (" ctor: invoking split constructor\n " );
26
- }
24
+ Sum (const Sum& sum, Split) : input(sum.input), value(0 ) {}
27
25
28
26
// accumulate just the element of the range I have been asked to
29
27
void operator ()(std::size_t begin, std::size_t end) {
30
- double extra = std::accumulate (input.begin () + begin, input.begin () + end, 0.0 );
31
- value += extra;
32
- printf (" work: added %f (value is now %f)\n " , extra, value);
28
+ value += std::accumulate (input.begin () + begin, input.begin () + end, 0.0 );
33
29
}
34
30
35
31
// join my value with that of another Sum
36
32
void join (const Sum& rhs) {
37
33
value += rhs.value ;
38
- printf (" join: added %f (value is now %f)\n " , rhs.value , value);
39
34
}
40
35
};
41
36
You can’t perform that action at this time.
0 commit comments