11#ifndef EIGEN_RESHAPED_HELPER_H
12#define EIGEN_RESHAPED_HELPER_H
15#include "../InternalHeaderCheck.h"
19enum AutoSize_t { AutoSize };
20const int AutoOrder = 2;
24template <
typename SizeType,
typename OtherSize,
int TotalSize>
25struct get_compiletime_reshape_size : get_fixed_value<SizeType> {};
27template <
typename SizeType>
28Index get_runtime_reshape_size(SizeType size, Index , Index ) {
29 return internal::get_runtime_value(size);
32template <
typename OtherSize,
int TotalSize>
33struct get_compiletime_reshape_size<AutoSize_t, OtherSize, TotalSize> {
35 other_size = get_fixed_value<OtherSize>::value,
36 value = (TotalSize == Dynamic || other_size == Dynamic) ? Dynamic : TotalSize / other_size
40inline Index get_runtime_reshape_size(AutoSize_t , Index other, Index total) {
return total / other; }
42constexpr int get_compiletime_reshape_order(
int flags,
int order) {
43 return order == AutoOrder ? flags &
RowMajorBit : order;
constexpr unsigned int RowMajorBit
Definition Constants.h:71