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 c2f4e8c08e
commit 023ed6b9a8

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>