From 2620cb930b7ad87ed1d77a26319739f4b1c86d33 Mon Sep 17 00:00:00 2001 From: Charles Schlosser Date: Fri, 5 Apr 2024 18:30:39 +0000 Subject: [PATCH] Update file Geometry_SIMD.h --- Eigen/src/Geometry/arch/Geometry_SIMD.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/Eigen/src/Geometry/arch/Geometry_SIMD.h b/Eigen/src/Geometry/arch/Geometry_SIMD.h index ce3cfeabf..e8b210e70 100644 --- a/Eigen/src/Geometry/arch/Geometry_SIMD.h +++ b/Eigen/src/Geometry/arch/Geometry_SIMD.h @@ -62,16 +62,19 @@ struct quat_conj { template struct cross3_impl { - enum { ResAlignment = traits::type>::Alignment }; - static inline typename plain_matrix_type::type run(const VectorLhs& lhs, const VectorRhs& rhs) { + using DstPlainType = typename plain_matrix_type::type; + static constexpr int DstAlignment = evaluator::Alignment; + static constexpr int LhsAlignment = evaluator::Alignment; + static constexpr int RhsAlignment = evaluator::Alignment; + static inline DstPlainType run(const VectorLhs& lhs, const VectorRhs& rhs) { evaluator lhs_eval(lhs); evaluator rhs_eval(rhs); - Packet4f a = lhs_eval.template packet::Alignment, Packet4f>(0); - Packet4f b = rhs_eval.template packet::Alignment, Packet4f>(0); + Packet4f a = lhs_eval.template packet(0); + Packet4f b = rhs_eval.template packet(0); Packet4f mul1 = pmul(vec4f_swizzle1(a, 1, 2, 0, 3), vec4f_swizzle1(b, 2, 0, 1, 3)); Packet4f mul2 = pmul(vec4f_swizzle1(a, 2, 0, 1, 3), vec4f_swizzle1(b, 1, 2, 0, 3)); - typename plain_matrix_type::type res; - pstoret(&res.x(), psub(mul1, mul2)); + DstPlainType res; + pstoret(&res.x(), psub(mul1, mul2)); return res; } };