The problem seems to be that when building Eigen on ARM platforms with NEON enabled, compilation fails with errors like:
error: unknown type name 'float32x4_t'; did you mean 'Upp::float32x4_t'?
/usr/lib/llvm-18/lib/clang/18/include/arm_vector_types.h: note: 'Upp::float32x4_t' declared here
This happens whenever Eigen includes <arm_neon.h> after U++ headers are already processed.
U++ wraps many system headers inside the Upp namespace -- including <arm_neon.h> and <arm_vector_types.h> -- so NEON vector types like float32x4_t and intrinsics like vdupq_n_f32 are declared as Upp::float32x4_t, not in the global namespace.
However, Eigen expects these NEON types and intrinsics to exist in the global namespace, so it can't find them.
The easy solution would be including Eigen before U++ headers. Unfortunately this breaks the
#define eigen_assert(x) ASSERT(x)
in Eigen.h that links Eigen assertions with U++ ones.
The fix that is being implemented is to re-export NEON types and intrinsics from U++ into the global namespace before including Eigen headers.
This is done doing this in Eigen.h:
#ifdef CPU_NEON
namespace {
using Upp::float32x2_t;
using Upp::float32x4_t;
using Upp::int8x8_t;
...