Enable direct access for IndexedView.

This commit is contained in:
Antonio Sánchez
2024-02-20 18:21:45 +00:00
committed by Rasmus Munk Larsen
parent 90087b990a
commit b56e30841c
4 changed files with 126 additions and 16 deletions

View File

@@ -226,6 +226,11 @@ struct get_compile_time_incr<ArithmeticSequence<FirstType, SizeType, IncrType> >
enum { value = get_fixed_value<IncrType, DynamicIndex>::value };
};
template <typename FirstType, typename SizeType, typename IncrType>
constexpr Index get_runtime_incr(const ArithmeticSequence<FirstType, SizeType, IncrType>& x) EIGEN_NOEXCEPT {
return static_cast<Index>(x.incrObject());
};
} // end namespace internal
/** \namespace Eigen::indexing