Created attachment 712 [details] Compile error fix in PacketMath.h The ARM DS-5 5.20 compiler fails compiling with the following errors: "src/Core/arch/NEON/PacketMath.h", line 113: Error: #146: too many initializer values Packet4f countdown = EIGEN_INIT_NEON_PACKET4(0, 1, 2, 3); ^ "src/Core/arch/NEON/PacketMath.h", line 118: Error: #146: too many initializer values Packet4i countdown = EIGEN_INIT_NEON_PACKET4(0, 1, 2, 3); ^ "src/Core/arch/NEON/Complex.h", line 30: Error: #146: too many initializer values static uint32x4_t p4ui_CONJ_XOR = EIGEN_INIT_NEON_PACKET4(0x00000000, 0x80000000, 0x00000000, 0x80000000); ^ "src/Core/arch/NEON/Complex.h", line 31: Error: #146: too many initializer values static uint32x2_t p2ui_CONJ_XOR = EIGEN_INIT_NEON_PACKET2(0x00000000, 0x80000000); ^ I am currently using version 3.0.5 but trying the latest code it has the same problem. Whenever this is fixed, I will be updating to the latest version.
Could you try switching to the other definition of EIGEN_INIT_NEON_PACKET2/EIGEN_INIT_NEON_PACKET4 (in the current devel version, either line 54-55 or 58-59 in src/Core/arch/NEON/PacketMath.h). If that works, tell us which branch works and a flag which can detect your compiler.
The LLVM branch gives me a warning "extra braces are nonstandard" and the same error, too many initializer values.
Ok, would have been too easy :D Do you have any documentation how to initialize a vector of 2/4 elements properly with your compiler? If nothing helps, we may have to resort to storing the values in a stack-local array then load them into the actual Packet. (This would require adapting every call of EIGEN_INIT_NEON_PACKET#)
I sure would like easy. :) There is this page on initializing vectors, though I wasn't sure if that was specific to the armcc compiler or not. http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0472k/chr1360928368293.html I'm not sure if you saw it or not, but I did attach a patch that works for me. It uses the load functions here http://infocenter.arm.com/help/topic/com.arm.doc.dui0472k/chr1360928371756.html
According to the neon guide, using loads is indeed the recommended way to go. Then, I would also use loads for the 2x cases too.
Applied: https://bitbucket.org/eigen/eigen/commits/2e8706a5cc31/ and also use load for the 2d case: https://bitbucket.org/eigen/eigen/commits/3d1962c9b176/ Summary: Bug 1240: Remove any assumption on NEON vector types.
Excellent! Thanks Gael!
-- 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/1240.