diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/half_float.cpp | 2 | ||||
-rw-r--r-- | test/main.h | 16 |
2 files changed, 14 insertions, 4 deletions
diff --git a/test/half_float.cpp b/test/half_float.cpp index 7734f82cc..1b0ea9482 100644 --- a/test/half_float.cpp +++ b/test/half_float.cpp @@ -9,7 +9,7 @@ #include "main.h" -#include <Eigen/src/Core/arch/CUDA/Half.h> +#include <Eigen/src/Core/arch/GPU/Half.h> // Make sure it's possible to forward declare Eigen::half namespace Eigen { diff --git a/test/main.h b/test/main.h index 5691af52b..95bbc9eb0 100644 --- a/test/main.h +++ b/test/main.h @@ -68,9 +68,19 @@ // are defined here and any not-parenthesized min/max call will cause a // compiler error. #if !defined(__HIPCC__) - // HIP headers include the <thread> header which contains not-parenthesized - // calls to "max", triggering the following check and causing the compile to fail - // so disabling the following checks for HIP + // + // HIP header files include the following files + // <thread> + // <regex> + // <unordered_map> + // which seem to contain not-parenthesized calls to "max"/"min", triggering the following check and causing the compile to fail + // + // Including those header files before the following macro definition for "min" / "max", only partially resolves the issue + // This is because other HIP header files also define "isnan" / "isinf" / "isfinite" functions, which are needed in other + // headers. + // + // So instead choosing to simply disable this check for HIP + // #define min(A,B) please_protect_your_min_with_parentheses #define max(A,B) please_protect_your_max_with_parentheses #define isnan(X) please_protect_your_isnan_with_parentheses |