maxcoeff() on integer arrays produces incorrect results on NEON
Submitted by Akira MAEZAWA
Assigned to Nobody
Link to original bugzilla bug (#1059)
Version: 3.2
Description
Created attachment 601
Patch for Eigen/src/Core/arch/NEON/PacketMath.h
Using maxcoeff() on integer arrays (or vectors, etc) produces incorrect result.
To reproduce the error, put the maximum element on either 3+4n th or 2+4n th (n>0 integer) index on 4byte-aligned Array.
The error is due to a bug in predux_max<Packet4i>(const Packet4i& a) found in Core/arch/NEON/PacketMath.h , where it is missing
max = vpmax_s32(max, max);
The patch is attached.
Attachment 601, "Patch for Eigen/src/Core/arch/NEON/PacketMath.h":
file_1059.txt