You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In this case, the value is used on a templated function where the deducted type is based on that constant, so the kernel essentially gets fixed to double precision and not T.
There are several other models that does T sum = 0.0; which is probably OK.
But for consistency I think we should probably be using aggregate initialisation for everything:
std::transform_reduce(..., T{});
T sum{};
The text was updated successfully, but these errors were encountered:
There are several instances where the double constant
0.0
is used in a way that promotes everything it touches.For example:
BabelStream/src/std-data/STDDataStream.cpp
Line 85 in 1d423fc
In this case, the value is used on a templated function where the deducted type is based on that constant, so the kernel essentially gets fixed to double precision and not
T
.There are several other models that does
T sum = 0.0;
which is probably OK.But for consistency I think we should probably be using aggregate initialisation for everything:
std::transform_reduce(..., T{}); T sum{};
The text was updated successfully, but these errors were encountered: