Fix accumulate bug

This commit is contained in:
Alejandro Gallo 2021-10-01 17:42:57 +02:00
parent aa2d88ee2f
commit 8c64423052
4 changed files with 6 additions and 6 deletions

View File

@ -546,7 +546,7 @@ namespace atrip {
: lengths(lens) : lengths(lens)
, np(np_) , np(np_)
, size(std::accumulate(lengths.begin(), lengths.end(), , size(std::accumulate(lengths.begin(), lengths.end(),
1, std::multiplies<size_t>())) 1UL, std::multiplies<size_t>()))
{ assert(lengths.size() <= 2); } { assert(lengths.size() <= 2); }
size_t find(Slice::Location const& p) const noexcept { size_t find(Slice::Location const& p) const noexcept {
@ -933,7 +933,7 @@ namespace atrip {
std::vector<F> std::vector<F>
(std::accumulate(sliceLength.begin(), (std::accumulate(sliceLength.begin(),
sliceLength.end(), sliceLength.end(),
1, std::multiplies<size_t>()))) 1UL, std::multiplies<size_t>())))
, name(name_) , name(name_)
, sliceTypes(sliceTypes_) , sliceTypes(sliceTypes_)
, sliceBuffers(nSliceBuffers, sources[0]) , sliceBuffers(nSliceBuffers, sources[0])
@ -1190,7 +1190,7 @@ namespace atrip {
== ==
( std::accumulate(n_tuples_per_rank.begin(), ( std::accumulate(n_tuples_per_rank.begin(),
n_tuples_per_rank.end(), n_tuples_per_rank.end(),
0) 0UL)
+ nExtraInvalid + nExtraInvalid
)); ));
#endif #endif

View File

@ -16,7 +16,7 @@ namespace atrip {
: lengths(lens) : lengths(lens)
, np(np_) , np(np_)
, size(std::accumulate(lengths.begin(), lengths.end(), , size(std::accumulate(lengths.begin(), lengths.end(),
1, std::multiplies<size_t>())) 1UL, std::multiplies<size_t>()))
{ assert(lengths.size() <= 2); } { assert(lengths.size() <= 2); }
size_t find(Slice::Location const& p) const noexcept { size_t find(Slice::Location const& p) const noexcept {

View File

@ -340,7 +340,7 @@ namespace atrip {
std::vector<F> std::vector<F>
(std::accumulate(sliceLength.begin(), (std::accumulate(sliceLength.begin(),
sliceLength.end(), sliceLength.end(),
1, std::multiplies<size_t>()))) 1UL, std::multiplies<size_t>())))
, name(name_) , name(name_)
, sliceTypes(sliceTypes_) , sliceTypes(sliceTypes_)
, sliceBuffers(nSliceBuffers, sources[0]) , sliceBuffers(nSliceBuffers, sources[0])

View File

@ -51,7 +51,7 @@ namespace atrip {
== ==
( std::accumulate(n_tuples_per_rank.begin(), ( std::accumulate(n_tuples_per_rank.begin(),
n_tuples_per_rank.end(), n_tuples_per_rank.end(),
0) 0UL)
+ nExtraInvalid + nExtraInvalid
)); ));
#endif #endif