Created attachment 601 [details] 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.
Makes sense to me. Can someone with access to a NEON CPU confirm this and apply it to 3.2 and the devel-branch? If nobody does, and no objections arise, I'll apply this myself within the next days.
Thank you for noticing this issue. It was already fixed in the default branch. https://bitbucket.org/eigen/eigen/commits/21957a1ddbb6
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1059.