Re: [eigen] Fix for ARM __builtin_prefetch fails |
[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]
On 19.11.2013 03:37, Rick Mann wrote:
On Nov 18, 2013, at 15:23 , Christoph Hertzberg <chtz@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:Ok, so the issue is that __has_builtin(__builtin_prefetch) is syntactically incorrect if __has_builtin is not defined. That means your patch resolves the issue only for GCC and the fix is to separate the && expression into two preprocessor lines. [...]Yes, I think that might be better. The engineer who found this is not around to ask right now if this change would work for him.
Next alternative: //This can be put in Core/util/* #ifdef __has_builtin # define EIGEN_HAS_BUILTIN(x) __has_builtin #else # define EIGEN_HAS_BUILTIN(x) 0 #endif // only the first line needs to be changed: #if EIGEN_HAS_BUILTIN(__builtin_prefetch) || defined(__GNUC__) #define EIGEN_ARM_PREFETCH(ADDR) __builtin_prefetch(ADDR); //... Does any compiler except LLVM support __has_builtin? Christoph -- ---------------------------------------------- Dipl.-Inf., Dipl.-Math. Christoph Hertzberg Cartesium 0.049 Universität Bremen Enrique-Schmidt-Straße 5 28359 Bremen Tel: +49 (421) 218-64252 ----------------------------------------------
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |