mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-27 07:29:52 +08:00
Fix warnings in IndexList array_prod
This commit is contained in:
parent
42705ba574
commit
f313126dab
@ -351,9 +351,9 @@ struct IndexPairList : internal::IndexTuple<FirstType, OtherTypes...> {
|
||||
namespace internal {
|
||||
|
||||
template<typename FirstType, typename... OtherTypes>
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE size_t array_prod(const IndexList<FirstType, OtherTypes...>& sizes) {
|
||||
size_t result = 1;
|
||||
for (int i = 0; i < array_size<IndexList<FirstType, OtherTypes...> >::value; ++i) {
|
||||
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE DenseIndex array_prod(const IndexList<FirstType, OtherTypes...>& sizes) {
|
||||
DenseIndex result = 1;
|
||||
for (size_t i = 0; i < array_size<IndexList<FirstType, OtherTypes...> >::value; ++i) {
|
||||
result *= sizes[i];
|
||||
}
|
||||
return result;
|
||||
|
Loading…
Reference in New Issue
Block a user