10#ifndef EIGEN_RESHAPED_HELPER_H
11#define EIGEN_RESHAPED_HELPER_H
14#include "../InternalHeaderCheck.h"
18enum AutoSize_t { AutoSize };
19const int AutoOrder = 2;
23template <
typename SizeType,
typename OtherSize,
int TotalSize>
24struct get_compiletime_reshape_size {
25 enum { value = get_fixed_value<SizeType>::value };
28template <
typename SizeType>
29Index get_runtime_reshape_size(SizeType size, Index , Index ) {
30 return internal::get_runtime_value(size);
33template <
typename OtherSize,
int TotalSize>
34struct get_compiletime_reshape_size<AutoSize_t, OtherSize, TotalSize> {
36 other_size = get_fixed_value<OtherSize>::value,
41inline Index get_runtime_reshape_size(AutoSize_t , Index other, Index total) {
return total / other; }
43constexpr inline int get_compiletime_reshape_order(
int flags,
int order) {
44 return order == AutoOrder ? flags &
RowMajorBit : order;
const unsigned int RowMajorBit
Definition Constants.h:70
Namespace containing all symbols from the Eigen library.
Definition Core:137
const int Dynamic
Definition Constants.h:25