From 44df2109c8c700222643a9a45f144676348f4df1 Mon Sep 17 00:00:00 2001 From: Francesco Mazzoli Date: Mon, 13 Jan 2020 16:15:30 +0100 Subject: Pick full packet unconditionally when EIGEN_UNALIGNED_VECTORIZE See comment for details. --- Eigen/src/Core/util/XprHelper.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'Eigen/src/Core/util') diff --git a/Eigen/src/Core/util/XprHelper.h b/Eigen/src/Core/util/XprHelper.h index 26aa609fe..22f8bdd6c 100644 --- a/Eigen/src/Core/util/XprHelper.h +++ b/Eigen/src/Core/util/XprHelper.h @@ -194,8 +194,20 @@ template struct unpacket_traits }; }; +// If we vectorize regardless of alignment, always pick the full-sized packet, +// if we have enough data to process. +// +// Otherwise, pick the packet size we know is going to work with the alignment +// of the given data. See +// for more +// information. +#if EIGEN_UNALIGNED_VECTORIZE template= unpacket_traits::size || is_same::half>::value> +#else +template::size)==0 || is_same::half>::value> +#endif struct find_best_packet_helper; template< int Size, typename PacketType> -- cgit v1.2.3