mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-05-31 02:23:59 +08:00
Fix MSAN in vectorized casting evaluator
This commit is contained in:
parent
6dbbf0a843
commit
ee4f86f909
@ -726,6 +726,7 @@ struct unary_evaluator<CwiseUnaryOp<core_cast_op<SrcType, DstType>, ArgType>, In
|
|||||||
Index count) const {
|
Index count) const {
|
||||||
constexpr int SrcLoadMode = plain_enum_min(SrcPacketBytes, LoadMode);
|
constexpr int SrcLoadMode = plain_enum_min(SrcPacketBytes, LoadMode);
|
||||||
PacketBlock<PacketType, NumPackets> packets;
|
PacketBlock<PacketType, NumPackets> packets;
|
||||||
|
for (Index i = 0; i < NumPackets; i++) packets[i] = pzero(PacketType());
|
||||||
Index offset = begin / SrcPacketSize;
|
Index offset = begin / SrcPacketSize;
|
||||||
Index actualBegin = begin % SrcPacketSize;
|
Index actualBegin = begin % SrcPacketSize;
|
||||||
for (; offset < NumPackets; offset++) {
|
for (; offset < NumPackets; offset++) {
|
||||||
@ -743,6 +744,7 @@ struct unary_evaluator<CwiseUnaryOp<core_cast_op<SrcType, DstType>, ArgType>, In
|
|||||||
Index count) const {
|
Index count) const {
|
||||||
constexpr int SrcLoadMode = plain_enum_min(SrcPacketBytes, LoadMode);
|
constexpr int SrcLoadMode = plain_enum_min(SrcPacketBytes, LoadMode);
|
||||||
PacketBlock<PacketType, NumPackets> packets;
|
PacketBlock<PacketType, NumPackets> packets;
|
||||||
|
for (Index i = 0; i < NumPackets; i++) packets[i] = pzero(PacketType());
|
||||||
Index offset = begin / SrcPacketSize;
|
Index offset = begin / SrcPacketSize;
|
||||||
Index actualBegin = begin % SrcPacketSize;
|
Index actualBegin = begin % SrcPacketSize;
|
||||||
for (; offset < NumPackets; offset++) {
|
for (; offset < NumPackets; offset++) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user