Bugzilla – Bug 1059
maxcoeff() on integer arrays produces incorrect results on NEON
Last modified: 2015-09-01 14:31:43 UTC
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.