In file included from ../eigen/Eigen/Core:293:0,
../eigen/Eigen/src/Core/arch/NEON/PacketMath.h:55:45: error: missing binary operator before token "("
#if (defined(__has_builtin) && __has_builtin(__builtin_prefetch)) || defined(__GNUC__)
I am using arm-linux-gcc 4.8.
According to http://stackoverflow.com/questions/25584920/how-to-fix-error-in-eigen-for-arm-neon , this is the same issue as discussed on the mailing list in the thread starting at http://listengine.tuxfamily.org/lists.tuxfamily.org/eigen/2013/11/msg00011.html , but it looks like the solution proposed by Christoph in http://listengine.tuxfamily.org/lists.tuxfamily.org/eigen/2013/11/msg00048.html was never acted on. Time to revisit this?
I modified PacketMath.h according to msg00048, and it did pass compiling. However, the output assembly code was not as I expected.
Eigen::Vector4f X, Y;
// X = ...
// Y = ...
X = X + Y;
There were four fadds instead of one vadd.
(In reply to Jitse Niesen from comment #1)
> According to
> arm-neon , this is the same issue as discussed on the mailing list in the
> thread starting at
> html , but it looks like the solution proposed by Christoph in
> html was never acted on. Time to revisit this?
I applied the needed changes:
@phil.wang, make sure you compiled with neon enabled, for instance with "-mfpu=neon -mcpu=cortex-a8".
I have a file name eigen-neon-example.cpp:
I compile it with arm-linux-gcc, with flags "-mfpu=neon -mcpu=cortex-a8".
Output assembly shows that addition between Eigen::Vector4f has not been parallelized.