//================================================================================================== /* ROTGEN - Runtime Overlay for Eigen Copyright : CODE RECKONS SPDX-License-Identifier: BSL-1.0 */ //================================================================================================== #pragma once namespace rotgen::detail { template typename Wrapper> struct as_concrete { using type = Wrapper; }; template typename Wrapper> using as_concrete_t = typename as_concrete, Wrapper>::type; template inline constexpr bool has_same_vector_size = []() { // No vector = noo size if (!(M::IsVectorAtCompileTime && N::IsVectorAtCompileTime)) return false; // Row vectors -> same Cols if (M::RowsAtCompileTime == 1 && N::RowsAtCompileTime == 1) return M::ColsAtCompileTime == N::ColsAtCompileTime; // Col vectors -> same Rows if (M::ColsAtCompileTime == 1 && N::ColsAtCompileTime == 1) return M::RowsAtCompileTime == N::RowsAtCompileTime; // Mixing 1xN with Mx1 return false; }(); template using propagate_const = std::conditional_t, std::add_const_t, T>; template inline constexpr auto select_static = (M == rotgen::Dynamic || N == rotgen::Dynamic) ? rotgen::Dynamic : M; template typename Wrapper> using composite_type = Wrapper, select_static, M1::storage_order, select_static, select_static>; }