11#ifndef EIGEN_INTEGRAL_CONSTANT_H
12#define EIGEN_INTEGRAL_CONSTANT_H
18template<
int N>
class FixedInt;
19template<
int N>
class VariableAndFixedInt;
54 static const int value = N;
55 EIGEN_CONSTEXPR
operator int()
const {
return value; }
58 #ifndef EIGEN_INTERNAL_DEBUGGING
59 EIGEN_UNUSED_VARIABLE(other);
61 eigen_internal_assert(
int(other)==N);
80#if EIGEN_HAS_CXX14_VARIABLE_TEMPLATES
90 FixedInt(std::integral_constant<int,N>) {}
126 static const int value = N;
127 operator int()
const {
return m_value; }
134 static const int value = Default;
138 static const int value = N;
141#if !EIGEN_HAS_CXX14_VARIABLE_TEMPLATES
143 static const int value = N;
148 static const int value = N ;
151template<
typename T,
int N,
int Default>
153 static const int value = N;
156template<
typename T> EIGEN_DEVICE_FUNC
Index get_runtime_value(
const T &x) {
return x; }
157#if !EIGEN_HAS_CXX14_VARIABLE_TEMPLATES
158template<
int N> EIGEN_DEVICE_FUNC
Index get_runtime_value(
FixedInt<N> (*)()) {
return N; }
169#if !EIGEN_HAS_CXX14_VARIABLE_TEMPLATES
185#ifndef EIGEN_PARSED_BY_DOXYGEN
187#if EIGEN_HAS_CXX14_VARIABLE_TEMPLATES
189static const internal::FixedInt<N> fix{};
192inline internal::FixedInt<N> fix() {
return internal::FixedInt<N>(); }
196template<
int N,
typename T>
197inline internal::VariableAndFixedInt<N> fix(T val) {
return internal::VariableAndFixedInt<N>(internal::convert_index<int>(val)); }
235static const auto fix();
266static const auto fix(
int val);
Base class for all dense matrices, vectors, and expressions.
Definition MatrixBase.h:50
Definition IntegralConstant.h:52
Definition IntegralConstant.h:124
Definition XprHelper.h:130
Namespace containing all symbols from the Eigen library.
Definition LDLT.h:16
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition Meta.h:74
Definition IntegralConstant.h:164
Definition IntegralConstant.h:133