Align temporary array in TensorSelectOp packet evaluator.

This commit is contained in:
Rasmus Munk Larsen
2025-11-05 19:44:47 +00:00
parent 142caf889c
commit 7c7d84735e

View File

@@ -789,7 +789,7 @@ struct TensorEvaluator<const TensorSelectOp<IfArgType, ThenArgType, ElseArgType>
template <int LoadMode, bool UseTernary = TernaryPacketAccess, std::enable_if_t<!UseTernary, bool> = true>
EIGEN_DEVICE_FUNC PacketReturnType packet(Index index) const {
std::remove_const_t<Scalar> arr[PacketSize];
EIGEN_ALIGN_TO_BOUNDARY(sizeof(PacketReturnType)) std::remove_const_t<Scalar> arr[PacketSize];
EIGEN_UNROLL_LOOP
for (Index i = 0; i < PacketSize; ++i) {
arr[i] = m_condImpl.coeff(index + i) ? Scalar(-1) : Scalar(0);