File tree Expand file tree Collapse file tree 1 file changed +2
-7
lines changed Expand file tree Collapse file tree 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
2121
2222 // constructors
2323 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 ) {}
2725
2826 // accumulate just the element of the range I have been asked to
2927 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 );
3329 }
3430
3531 // join my value with that of another Sum
3632 void join (const Sum& rhs) {
3733 value += rhs.value ;
38- printf (" join: added %f (value is now %f)\n " , rhs.value , value);
3934 }
4035};
4136
You can’t perform that action at this time.
0 commit comments