Details
-
Bug
-
Status: Closed (View Workflow)
-
High
-
Resolution: Fixed
-
master
-
None
-
Sarajevo
Description
Hi there, I just noticed that I put something in my clang-tidy talk for Wednesday that is a relevant bug and contributes to differences with IMT on and off (so I think it isn't fully fixed). If I've seen it correctly, this is still present in master:
See LossFunction.cxx, line 90:
auto redfunc = [](std::vector<Double_t> a) -> Double_t { return std::accumulate(a.begin(), a.end(), 0); };
This accumultes doubles in an integer! So use 0.0 instead of 0.
Question (you can discuss with me this week): is this really a hot path and needs to be accumuated in parallel? Is it really faster? (I'd doubt it, but without measuring I don't want to judge)
And why is the lambda taking the vector by value?!