Fix MSAN in vectorized casting evaluator

This commit is contained in:
Charles Schlosser 2025-05-08 09:38:35 +00:00 committed by Rasmus Munk Larsen
parent 6dbbf0a843
commit ee4f86f909

View File

@ -726,6 +726,7 @@ struct unary_evaluator<CwiseUnaryOp<core_cast_op<SrcType, DstType>, ArgType>, In
Index count) const {
constexpr int SrcLoadMode = plain_enum_min(SrcPacketBytes, LoadMode);
PacketBlock<PacketType, NumPackets> packets;
for (Index i = 0; i < NumPackets; i++) packets[i] = pzero(PacketType());
Index offset = begin / SrcPacketSize;
Index actualBegin = begin % SrcPacketSize;
for (; offset < NumPackets; offset++) {
@ -743,6 +744,7 @@ struct unary_evaluator<CwiseUnaryOp<core_cast_op<SrcType, DstType>, ArgType>, In
Index count) const {
constexpr int SrcLoadMode = plain_enum_min(SrcPacketBytes, LoadMode);
PacketBlock<PacketType, NumPackets> packets;
for (Index i = 0; i < NumPackets; i++) packets[i] = pzero(PacketType());
Index offset = begin / SrcPacketSize;
Index actualBegin = begin % SrcPacketSize;
for (; offset < NumPackets; offset++) {