diff options
author | 2009-09-19 19:45:58 -0400 | |
---|---|---|
committer | 2009-09-19 19:45:58 -0400 | |
commit | 828a79ac783001f7c4d56bd06ef221f31f32f2ba (patch) | |
tree | 0246dc3da77511053af14f8bea58ce6647c41ffe /Eigen | |
parent | 3c780fd4729cad99363d28c4c62c73471bdc7e2b (diff) |
allow to override EIGEN_RESTRICT, to satisfy a smart ass blogger who claims
that eigen2 owes all its performance to nonstandard restrict keyword.
well, this can also improve portability in case some compiler doesn't have __restrict.
Diffstat (limited to 'Eigen')
-rw-r--r-- | Eigen/src/Core/util/Macros.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index ec8337e33..4b62891d9 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -221,7 +221,12 @@ using Eigen::ei_cos; #error Please tell me what is the equivalent of __attribute__((aligned(16))) for your compiler #endif -#define EIGEN_RESTRICT __restrict +#ifdef EIGEN_DONT_USE_RESTRICT_KEYWORD + #define EIGEN_RESTRICT +#endif +#ifndef EIGEN_RESTRICT + #define EIGEN_RESTRICT __restrict +#endif #ifndef EIGEN_STACK_ALLOCATION_LIMIT #define EIGEN_STACK_ALLOCATION_LIMIT 1000000 |