Product of empty array must be 1 and not 0.

This commit is contained in:
Christoph Hertzberg 2018-08-30 17:14:52 +02:00
parent 03326d9155
commit 5be00b0e29

View File

@ -188,7 +188,7 @@ EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE t array_prod(const array<t, n>& a) {
}
template<typename t>
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE t array_prod(const array<t, 0>& /*a*/) {
return 0;
return 1;
}
template<typename t>