Remove slow index check in Tensor::resize from release mode.

This commit is contained in:
Rasmus Munk Larsen
2024-03-18 23:43:25 +00:00
parent 386e2079e4
commit d3cd312652
6 changed files with 25 additions and 149 deletions

View File

@@ -55,12 +55,10 @@ template <>
struct is_input_scalar<Sizes<>> {
static const bool value = true;
};
#ifndef EIGEN_EMULATE_CXX11_META_H
template <typename std::ptrdiff_t... Indices>
struct is_input_scalar<Sizes<Indices...>> {
static const bool value = (Sizes<Indices...>::total_size == 1);
static constexpr bool value = (Sizes<Indices...>::total_size == 1);
};
#endif
} // end namespace internal