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

@@ -67,6 +67,11 @@ struct get_compile_time_incr {
enum { value = UndefinedIncr };
};
template <typename T>
constexpr Index get_runtime_incr(const T&) EIGEN_NOEXCEPT {
return Index(1);
};
// Analogue of std::get<0>(x), but tailored for our needs.
template <typename T>
EIGEN_CONSTEXPR Index first(const T& x) EIGEN_NOEXCEPT {