7#ifndef PROXSUITE_PROXQP_DENSE_VIEWS_HPP
8#define PROXSUITE_PROXQP_DENSE_VIEWS_HPP
16#define LDLT_CONCEPT(...) \
17 VEG_CONCEPT_MACRO(::proxsuite::proxqp::concepts, __VA_ARGS__)
18#define LDLT_CHECK_CONCEPT(...) \
19 VEG_CHECK_CONCEPT_MACRO(::proxqp::concepts, __VA_ARGS__)
24using usize =
decltype(
sizeof(0));
28template<
typename Ret_,
typename... Args>
37#define LDLT_IMPL_GET_PARAM(Fn, Idx) \
38 typename ::proxsuite::proxqp::detail::FnInfo< \
39 decltype Fn >::template Arg<(Idx)>,
41#define LDLT_IMPL_GET_PARAMS_0(NParams, ...) \
42 __VEG_PP_TUPLE_FOR_EACH(LDLT_IMPL_GET_PARAM, \
44 __VEG_PP_MAKE_TUPLE(__VEG_IMPL_PP_DEC(NParams)))
46#define LDLT_IMPL_GET_PARAMS_1(NParams, ...)
48#define LDLT_IMPL_GET_PARAMS(NParams, ...) \
49 __VEG_PP_CAT2(LDLT_IMPL_GET_PARAMS_, __VEG_IMPL_PP_IS_1(NParams)) \
50 (NParams, __VA_ARGS__)
52#define LDLT_EXPLICIT_TPL_DEF(NParams, ...) \
53 template auto __VA_ARGS__( \
54 LDLT_IMPL_GET_PARAMS(NParams, __VA_ARGS__) \
55 typename ::proxsuite::proxqp::detail::FnInfo< \
56 decltype(__VA_ARGS__)>::template Arg<(NParams) - 1>) -> \
57 typename ::proxsuite::proxqp::detail::FnInfo<decltype(__VA_ARGS__)>::Ret
58#define LDLT_EXPLICIT_TPL_DECL(NParams, ...) \
59 extern LDLT_EXPLICIT_TPL_DEF(NParams, __VA_ARGS__)
105 return a > b ? a : b;
113 return (a < b) ? a : b;
127template<
typename T, usize N>
143 T
const* data = list.begin();
144 isize len = isize(list.size());
146 T current_max = data[0];
147 for (isize i = 1; i < len; ++i) {
148 if (data[i] > current_max) {
149 current_max = data[i];
161template<typename T, bool = std::is_floating_point<T>::value>
166 for (
usize i = 0; i < n; ++i) {
178 std::memset(dest, 0, n *
sizeof(T));
192 return (n + k - 1) / k * k;
197 return (n + k - 1) / k * k;
203 using UPtr = std::uintptr_t;
205 UPtr mask = align - 1;
206 UPtr iptr = UPtr(ptr);
207 UPtr aligned_ptr = iptr & ~mask;
208 return isize(aligned_ptr - iptr);
213 using UPtr = std::uintptr_t;
215 UPtr mask = align - 1;
216 UPtr iptr = UPtr(ptr);
217 UPtr aligned_ptr = (iptr + mask) & ~mask;
218 return isize(aligned_ptr - iptr);
224 using BytePtr =
unsigned char*;
225 using VoidPtr =
void*;
231 using BytePtr =
unsigned char*;
232 using VoidPtr =
void*;
250 return Layout(1 - u32(l));
255 return l ==
colmajor ? Eigen::ColMajor : Eigen::RowMajor;
260 return (
unsigned(l) & Eigen::RowMajorBit) == Eigen::RowMajor ?
rowmajor
282 isize outer_stride)
noexcept -> T*
307 (void)ptr, (
void)dim, (void)outer_stride;
318 isize outer_stride)
noexcept -> T*
350 Eigen::OuterStride<Eigen::Dynamic>
355 Eigen::OuterStride<Eigen::Dynamic>(outer_stride),
390template<
typename... Ts>
393template<
typename Mat,
typename T>
396template<
typename Dummy,
398 template<
typename...>
406template<
typename Fallback,
template<
typename...>
class F,
typename... Ts>
413template<
typename Fallback,
template<
typename...>
class F,
typename... Ts>
425 isize(T::InnerStrideAtCompileTime)>;
430template<
typename T, Layout L>
443template<
typename T, Layout L>
457template<
typename T,
typename Str
ide>
467template<
typename T,
typename Str
ide>
478template<
typename T, Layout L>
480template<
typename T, Layout L>
482template<
typename T, Layout L>
484template<
typename T, Layout L>
516 constant<Layout, Layout(static_cast<unsigned char>(-1))>,
536 static_cast<Mat*
>(
nullptr)))::value);
539 is_plain_object_base,
541 static_cast<Mat*
>(
nullptr)))::value);
561 eigen_strided_vector_view,
566 eigen_strided_vector_view_mut,
576 eigen_vector_view_mut,
581inline namespace tags {
583VEG_TAG(from_ptr_size_stride, FromPtrSizeStride);
584VEG_TAG(from_ptr_rows_cols_stride, FromPtrRowsColsStride);
595 VectorView(FromPtrSize , T
const* _data, isize _dim) noexcept
605 (vec, Vec
const&)) noexcept
650 (vec, Vec&&)) noexcept
694 isize _stride) noexcept
702 requires(
LDLT_CONCEPT(eigen_strided_vector_view<Vec, T>)),
705 (vec, Vec
const&)) noexcept
708 ,
stride(vec.innerStride())
724 from_ptr_size_stride,
731 -> detail::EigenVecMap<T,
Eigen::InnerStride<
Eigen::Dynamic>>
737 Eigen::InnerStride<Eigen::Dynamic>(Eigen::Index(
stride)));
752 isize _stride) noexcept
760 requires(
LDLT_CONCEPT(eigen_strided_vector_view_mut<Vec, T>)),
763 (vec, Vec&&)) noexcept
766 ,
stride(vec.innerStride())
773 from_ptr_size_stride,
791 from_ptr_size_stride,
798 -> detail::EigenVecMapMut<T,
Eigen::InnerStride<
Eigen::Dynamic>>
804 Eigen::InnerStride<Eigen::Dynamic>(Eigen::Index(
stride)));
808template<
typename T, Layout L>
820 isize _outer_stride) noexcept
833 (mat, Mat
const&)) noexcept
855 from_ptr_rows_cols_stride,
876 isize c)
const noexcept -> StridedVectorView<T>
879 from_ptr_size_stride,
888 -> proxsuite::linalg::veg::meta::
894 -> proxsuite::linalg::veg::meta::
897 return trans().col(r);
912 Eigen::OuterStride<Eigen::Dynamic>(Eigen::Index(
outer_stride)));
916template<
typename T, Layout L>
928 isize _outer_stride) noexcept
941 (mat, Mat&&)) noexcept
963 from_ptr_rows_cols_stride,
984 isize c)
const noexcept -> StridedVectorViewMut<T>
987 from_ptr_size_stride,
996 -> proxsuite::linalg::veg::meta::
1002 -> proxsuite::linalg::veg::meta::
1005 return trans().col(r);
1020 Eigen::OuterStride<Eigen::Dynamic>(Eigen::Index(
outer_stride)));
1114 if ((dst.
cols == 0) || (dst.
rows == 0) || (lhs.
cols == 0)) {
1118#if !EIGEN_VERSION_AT_LEAST(3, 3, 8)
1119#define LAZY_PRODUCT(a, b) a.lazyProduct(b)
1121#define LAZY_PRODUCT(a, b) a.operator*(b)
1124 if (dst.
cols == 1 && dst.
rows == 1) {
1126 auto rhs_col = rhs.
col(0);
1127 auto lhs_row = lhs.
row(0);
1128 auto lhs_as_col = lhs.
col(0);
1129 lhs_as_col.dim = lhs_row.dim;
1130 if (lhs_row.stride == 1) {
1131 dst(0, 0) += factor * lhs_as_col.to_eigen().dot(rhs_col.to_eigen());
1133 dst(0, 0) += factor * lhs_row.to_eigen().dot(rhs_col.to_eigen());
1135 }
else if (dst.
cols == 1) {
1137 auto rhs_col = rhs.
col(0);
1138 auto dst_col = dst.
col(0);
1139 dst_col.to_eigen().noalias().operator+=(
1143#if !EIGEN_VERSION_AT_LEAST(3, 3, 8)
1144 else if ((dst.
rows < 20) && (dst.
cols < 20) && (rhs.
rows < 20)) {
1148 using Stride = Eigen::OuterStride<Eigen::Dynamic>;
1150 Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor, 20, 20>;
1151 using MapMut = Eigen::Map<Mat, Eigen::Unaligned, Stride>;
1152 using Map = Eigen::Map<Mat const, Eigen::Unaligned, Stride>;
1166 dst.
to_eigen().noalias().operator+=(
1180 detail::noalias_mul_add<T>(
1182 from_ptr_rows_cols_stride,
1190 from_ptr_rows_cols_stride,
1204 detail::noalias_mul_add<T>(
1206 from_ptr_rows_cols_stride,
1207 std::addressof(out),
1213 from_ptr_rows_cols_stride,
1220 from_ptr_rows_cols_stride,
1249 if (rhs.
cols == 1) {
1252 .template triangularView<Eigen::UnitUpper>()
1253 .template solveInPlace<Eigen::OnTheRight>(rhs.
col(0).to_eigen());
1257 .template triangularView<Eigen::UnitUpper>()
1258 .template solveInPlace<Eigen::OnTheRight>(rhs.
to_eigen());
1268 if (out.
cols == 1) {
1269 out.
col(0).to_eigen() =
1270 in.
col(0).to_eigen().operator*(d.
to_eigen().asDiagonal().inverse());
1282 if (out.
cols == 1) {
1283 out.
col(0).to_eigen() =
1284 in.
col(0).to_eigen().operator*(d.
to_eigen().asDiagonal());
1296 if (lhs.
cols == 1) {
1297 out.
to_eigen().template triangularView<Eigen::Lower>().operator-=(
1298 lhs.
col(0).to_eigen().operator*(
1299 Eigen::Map<Eigen::Matrix<T, 1, Eigen::Dynamic>
const>(
1302 out.
to_eigen().template triangularView<Eigen::Lower>().operator-=(
1324#if defined(EIGEN_RUNTIME_NO_MALLOC)
1328 Eigen::internal::set_is_malloc_allowed(
true);
1354template<
typename Scalar>
1394template<
typename Scalar>
1422 template<
typename T>
1431 template<
typename D>
1432 auto operator()(Eigen::MatrixBase<D>
const& mat)
const ->
typename D::Scalar
1434 if (mat.rows() == 0 || mat.cols() == 0) {
1435 return typename D::Scalar(0);
1437 return mat.template lpNorm<Eigen::Infinity>();
1443 template<
typename T>
1452 template<
typename T>
#define VEG_DEBUG_ASSERT(...)
#define LAZY_PRODUCT(a, b)
#define LDLT_CONCEPT(...)
#define VEG_TAG(Name, Type)
#define VEG_NIEBLOID(Name)
#define VEG_DEF_CONCEPT(Tpl, Name,...)
typename _detail::pack_ith_elem< I >::template Type< Ts... > ith
_detail::_meta::make_signed< usize >::Type isize
proxsuite::linalg::veg::meta::constant< isize, isize(T::RowsAtCompileTime)> CompTimeRowsImpl
auto prev_aligned(void *ptr, usize align) noexcept -> void *
void apply_diag_on_right(MatrixViewMut< T, colmajor > out, StridedVectorView< T > d, MatrixView< T, colmajor > in)
EigenVecMapMut< T, typename ElementAccess< L >::NextRowStride > ColToVecMut
constexpr auto cx_min_list(T const (&arr)[N]) noexcept -> T
auto is_eigen_matrix_base_impl(Eigen::MatrixBase< T > const volatile *) -> proxsuite::linalg::veg::meta::true_type
auto is_eigen_owning_matrix_base_impl(Eigen::PlainObjectBase< T > const volatile *) -> proxsuite::linalg::veg::meta::true_type
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic,(L==colmajor) ? Eigen::ColMajor :Eigen::RowMajor > const, Eigen::Unaligned, Eigen::OuterStride< Eigen::Dynamic > > EigenMatMap
EigenVecMap< T, Eigen::Stride< 0, 0 > > VecMap
auto bytes_to_prev_aligned(void *ptr, usize align) noexcept -> isize
auto next_aligned(void *ptr, usize align) noexcept -> void *
EigenVecMapMut< T, Eigen::Stride< 0, 0 > > VecMapMut
void noalias_mul_add(MatrixViewMut< T, colmajor > dst, MatrixView< T, colmajor > lhs, MatrixView< T, colmajor > rhs, T factor)
auto bytes_to_next_aligned(void *ptr, usize align) noexcept -> isize
constexpr auto min_list_impl(T init, T const *arr, usize n) noexcept -> T
EigenVecMap< T, typename ElementAccess< L >::NextRowStride > ColToVec
auto dot(StridedVectorView< T > lhs, VectorView< T > rhs) -> T
proxsuite::linalg::veg::meta::constant< isize, isize(T::ColsAtCompileTime)> CompTimeColsImpl
decltype(static_cast< T * >(VEG_DECLVAL(Mat &).data())) DataExpr
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic,(L==colmajor) ? Eigen::ColMajor :Eigen::RowMajor >, Eigen::Unaligned, Eigen::OuterStride< Eigen::Dynamic > > EigenMatMapMut
void set_zero(T *dest, usize n)
void apply_diag_inv_on_right(MatrixViewMut< T, colmajor > out, StridedVectorView< T > d, MatrixView< T, colmajor > in)
proxsuite::linalg::veg::meta::constant< isize, isize(T::InnerStrideAtCompileTime)> CompTimeInnerStrideImpl
EigenVecMapMut< T, typename ElementAccess< L >::NextColStride > RowToVecMut
EigenVecMap< T, typename ElementAccess< L >::NextColStride > RowToVec
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, 1 >, Eigen::Unaligned, Stride > EigenVecMapMut
void assign_scalar_prod(VectorViewMut< T > out, T factor, VectorView< T > in)
proxsuite::linalg::veg::meta:: constant< Layout,(bool(T::IsRowMajor) ? rowmajor :colmajor)> LayoutImpl
void trans_tr_unit_up_solve_in_place_on_right(MatrixView< T, colmajor > tr, MatrixViewMut< T, colmajor > rhs)
constexpr auto round_up(isize n, isize k) noexcept -> isize
void assign_cwise_prod(VectorViewMut< T > out, StridedVectorView< T > lhs, StridedVectorView< T > rhs)
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, 1 > const, Eigen::Unaligned, Stride > EigenVecMap
void noalias_mul_add_vec(VectorViewMut< T > dst, MatrixView< T, colmajor > lhs, VectorView< T > rhs, T factor)
void noalias_mul_sub_tr_lo(MatrixViewMut< T, colmajor > out, MatrixView< T, colmajor > lhs, MatrixView< T, rowmajor > rhs)
typename DetectedImpl< void, Fallback, F, Ts... >::Type Detected
constexpr auto uround_up(usize n, usize k) noexcept -> usize
detail::Detected< proxsuite::linalg::veg::meta::constant< isize, 0 >, detail::CompTimeColsImpl, T > CompTimeCols
detail::Detected< proxsuite::linalg::veg::meta::constant< isize, 0 >, detail::CompTimeInnerStrideImpl, T > CompTimeInnerStride
detail::Detected< proxsuite::linalg::veg::meta::constant< isize, 0 >, detail::CompTimeRowsImpl, T > CompTimeRows
detail::Detected< proxsuite::linalg::veg::meta:: constant< Layout, Layout(static_cast< unsigned char >(-1))>, detail::LayoutImpl, T > GetLayout
constexpr auto flip_layout(Layout l) noexcept -> Layout
constexpr auto from_eigen_layout(int l) -> Layout
decltype(sizeof(0)) usize
constexpr Layout colmajor
constexpr auto to_eigen_layout(Layout l) -> int
typename detail::unlref< T & >::Type unref
constexpr Layout rowmajor
VEG_INLINE auto l_mut() const noexcept -> MatrixViewMut< T, colmajor >
LdltViewMut(MatrixViewMut< T, colmajor > ld) noexcept
VEG_INLINE auto head(isize k) const -> LdltViewMut
VEG_INLINE auto d() const noexcept -> StridedVectorView< T >
VEG_INLINE auto d_mut() const noexcept -> StridedVectorViewMut< T >
VEG_INLINE auto as_const() const noexcept -> LdltView< T >
VEG_INLINE auto l() const noexcept -> MatrixView< T, colmajor >
VEG_INLINE auto tail(isize k) const -> LdltViewMut
VEG_INLINE auto d() const noexcept -> StridedVectorView< T >
VEG_INLINE auto head(isize k) const -> LdltView
LdltView(MatrixView< T, colmajor > ld) noexcept
VEG_INLINE auto l() const noexcept -> MatrixView< T, colmajor >
VEG_INLINE auto tail(isize k) const -> LdltView
VEG_INLINE auto row(isize r) const noexcept -> proxsuite::linalg::veg::meta::if_t<(L==rowmajor), VectorViewMut< T >, StridedVectorViewMut< T > >
VEG_INLINE auto operator()(isize row, isize col) const noexcept -> T &
VEG_TEMPLATE(typename Mat, requires(LDLT_CONCEPT(eigen_view< Mat, T >) &&eigen::GetLayout< unref< Mat > >::value==L), VEG_INLINE MatrixViewMut,(, FromEigen),(mat, Mat &&)) noexcept
VEG_INLINE auto trans() const noexcept -> MatrixViewMut< T, proxqp::flip_layout(L)>
VEG_INLINE auto to_eigen() const noexcept -> detail::EigenMatMapMut< T, L >
VEG_INLINE auto as_const() const noexcept -> MatrixView< T, L >
VEG_INLINE auto block(isize row, isize col, isize nrows, isize ncols) const noexcept -> MatrixViewMut
VEG_INLINE auto col(isize c) const noexcept -> proxsuite::linalg::veg::meta::if_t<(L==colmajor), VectorViewMut< T >, StridedVectorViewMut< T > >
VEG_INLINE MatrixViewMut(FromPtrRowsColsStride, T *_data, isize _rows, isize _cols, isize _outer_stride) noexcept
VEG_INLINE auto ptr(isize row, isize col) const noexcept -> T *
VEG_INLINE auto block(isize row, isize col, isize nrows, isize ncols) const noexcept -> MatrixView
VEG_INLINE auto operator()(isize row, isize col) const noexcept -> T const &
VEG_INLINE auto to_eigen() const noexcept -> detail::EigenMatMap< T, L >
VEG_INLINE MatrixView(FromPtrRowsColsStride, T const *_data, isize _rows, isize _cols, isize _outer_stride) noexcept
VEG_INLINE auto col(isize c) const noexcept -> proxsuite::linalg::veg::meta::if_t<(L==colmajor), VectorView< T >, StridedVectorView< T > >
VEG_INLINE auto row(isize r) const noexcept -> proxsuite::linalg::veg::meta::if_t<(L==rowmajor), VectorView< T >, StridedVectorView< T > >
VEG_INLINE auto trans() const noexcept -> MatrixView< T, proxqp::flip_layout(L)>
VEG_TEMPLATE(typename Mat, requires(LDLT_CONCEPT(eigen_view< Mat, T >) &&eigen::GetLayout< unref< Mat > >::value==L), VEG_INLINE MatrixView,(, FromEigen),(mat, Mat const &)) noexcept
VEG_INLINE auto ptr(isize row, isize col) const noexcept -> T const *
VEG_TEMPLATE(typename Vec, requires(LDLT_CONCEPT(eigen_strided_vector_view_mut< Vec, T >)), VEG_INLINE StridedVectorViewMut,(, FromEigen),(vec, Vec &&)) noexcept
VEG_INLINE auto as_const() const noexcept -> StridedVectorView< T >
VEG_INLINE auto operator()(isize index) const noexcept -> T &
VEG_INLINE auto ptr(isize index) const noexcept -> T *
VEG_INLINE StridedVectorViewMut(FromPtrSizeStride, T *_data, isize _dim, isize _stride) noexcept
VEG_INLINE auto to_eigen() const -> detail::EigenVecMapMut< T, Eigen::InnerStride< Eigen::Dynamic > >
VEG_INLINE auto segment(isize i, isize size) const noexcept -> StridedVectorViewMut
VEG_INLINE auto operator()(isize index) const noexcept -> T const &
VEG_INLINE auto segment(isize i, isize size) const noexcept -> StridedVectorView
VEG_INLINE auto ptr(isize index) const noexcept -> T const *
VEG_INLINE auto to_eigen() const -> detail::EigenVecMap< T, Eigen::InnerStride< Eigen::Dynamic > >
VEG_TEMPLATE(typename Vec, requires(LDLT_CONCEPT(eigen_strided_vector_view< Vec, T >)), VEG_INLINE StridedVectorView,(, FromEigen),(vec, Vec const &)) noexcept
VEG_INLINE StridedVectorView(FromPtrSizeStride, T const *_data, isize _dim, isize _stride) noexcept
VEG_INLINE auto segment(isize i, isize size) const noexcept -> VectorViewMut
VEG_TEMPLATE(typename Vec, requires(LDLT_CONCEPT(eigen_vector_view_mut< Vec, T >)), VEG_INLINE VectorViewMut,(, FromEigen),(vec, Vec &&)) noexcept
VEG_INLINE auto operator()(isize index) const noexcept -> T &
VEG_INLINE auto to_eigen() const -> detail::VecMapMut< T >
VEG_INLINE auto ptr(isize index) const noexcept -> T *
VEG_INLINE auto as_const() const noexcept -> VectorView< T >
VEG_INLINE VectorViewMut(FromPtrSize, T *_data, isize _dim) noexcept
VEG_INLINE auto ptr(isize index) const noexcept -> T const *
VEG_INLINE VectorView(FromPtrSize, T const *_data, isize _dim) noexcept
VEG_INLINE auto segment(isize i, isize size) const noexcept -> VectorView
VEG_INLINE auto to_eigen() const -> detail::VecMap< T >
VEG_INLINE auto operator()(isize index) const noexcept -> T const &
VEG_TEMPLATE(typename Vec, requires(LDLT_CONCEPT(eigen_vector_view< Vec, T >)), VEG_INLINE VectorView,(, FromEigen),(vec, Vec const &)) noexcept
EigenAllowAlloc(EigenAllowAlloc &&)=delete
auto operator=(EigenAllowAlloc const &) -> EigenAllowAlloc &=delete
EigenAllowAlloc(EigenAllowAlloc const &)=delete
auto operator=(EigenAllowAlloc &&) -> EigenAllowAlloc &=delete
EigenAllowAlloc()=default
MatrixViewMut< Scalar, layout > C
static constexpr Layout layout
VectorViewMut< Scalar > u_box
VEG_INLINE constexpr auto as_const() const noexcept -> QpViewBox< Scalar >
VectorViewMut< Scalar > l
VectorViewMut< Scalar > I
VectorViewMut< Scalar > u
MatrixViewMut< Scalar, layout > A
VectorViewMut< Scalar > b
MatrixViewMut< Scalar, layout > H
VectorViewMut< Scalar > g
VectorViewMut< Scalar > l_box
static constexpr Layout layout
VectorView< Scalar > u_box
MatrixView< Scalar, layout > H
VectorView< Scalar > l_box
MatrixView< Scalar, layout > C
MatrixView< Scalar, layout > A
MatrixViewMut< T, layout > A
MatrixViewMut< T, layout > C
VEG_INLINE constexpr auto as_const() const noexcept -> QpView< T >
MatrixViewMut< T, layout > H
static constexpr Layout layout
MatrixView< T, layout > A
MatrixView< T, layout > H
static constexpr Layout layout
MatrixView< T, layout > C
auto operator()(T x) const -> T
auto operator()(Eigen::MatrixBase< D > const &mat) const -> typename D::Scalar
auto operator()(T x, T y) const -> T
auto operator()(T x) const -> T
VEG_INLINE ~Defer() noexcept(noexcept(VEG_FWD(fn)()))
Eigen::InnerStride< Eigen::Dynamic > NextColStride
static VEG_INLINE auto next_row_stride(isize outer_stride) noexcept -> NextRowStride
Eigen::Stride< 0, 0 > NextRowStride
static VEG_INLINE auto next_col_stride(isize outer_stride) noexcept -> NextColStride
static VEG_INLINE constexpr auto offset(T *ptr, isize row, isize col, isize outer_stride) noexcept -> T *
static VEG_INLINE void transpose_if_rowmajor(T *ptr, isize dim, isize outer_stride)
static VEG_INLINE auto next_row_stride(isize outer_stride) noexcept -> NextRowStride
static VEG_INLINE void transpose_if_rowmajor(T *ptr, isize dim, isize outer_stride)
static VEG_INLINE constexpr auto offset(T *ptr, isize row, isize col, isize outer_stride) noexcept -> T *
Eigen::Stride< 0, 0 > NextColStride
Eigen::InnerStride< Eigen::Dynamic > NextRowStride
static VEG_INLINE auto next_col_stride(isize outer_stride) noexcept -> NextColStride
NoCopy(NoCopy const &)=delete
auto operator=(NoCopy &&) -> NoCopy &=delete
auto operator=(NoCopy const &) -> NoCopy &=delete
static void fn(T *dest, usize n)
static void fn(T *dest, usize n)
VEG_INLINE constexpr auto operator()(Fn fn) const -> Defer< Fn >
VEG_INLINE constexpr auto operator()(T const &a, T const &b) const -> T const &
VEG_INLINE auto operator()(std::initializer_list< T > list) const -> T
VEG_INLINE constexpr auto operator()(T a, T b) const -> T