Warning, file /include/eigen3/Eigen/src/Core/util/ReshapedHelper.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef EIGEN_RESHAPED_HELPER_H
0012 #define EIGEN_RESHAPED_HELPER_H
0013
0014 namespace Eigen {
0015
0016 enum AutoSize_t { AutoSize };
0017 const int AutoOrder = 2;
0018
0019 namespace internal {
0020
0021 template<typename SizeType,typename OtherSize, int TotalSize>
0022 struct get_compiletime_reshape_size {
0023 enum { value = get_fixed_value<SizeType>::value };
0024 };
0025
0026 template<typename SizeType>
0027 Index get_runtime_reshape_size(SizeType size, Index , Index ) {
0028 return internal::get_runtime_value(size);
0029 }
0030
0031 template<typename OtherSize, int TotalSize>
0032 struct get_compiletime_reshape_size<AutoSize_t,OtherSize,TotalSize> {
0033 enum {
0034 other_size = get_fixed_value<OtherSize>::value,
0035 value = (TotalSize==Dynamic || other_size==Dynamic) ? Dynamic : TotalSize / other_size };
0036 };
0037
0038 inline Index get_runtime_reshape_size(AutoSize_t , Index other, Index total) {
0039 return total/other;
0040 }
0041
0042 template<int Flags, int Order>
0043 struct get_compiletime_reshape_order {
0044 enum { value = Order == AutoOrder ? Flags & RowMajorBit : Order };
0045 };
0046
0047 }
0048
0049 }
0050
0051 #endif