diff options
author | Kevin DuBois <kevindubois@google.com> | 2020-08-25 12:36:49 -0700 |
---|---|---|
committer | Kevin DuBois <kevindubois@google.com> | 2020-08-25 12:40:32 -0700 |
commit | 9c07d4616b600d8b392beb6c693ba56e16b245d4 (patch) | |
tree | c8b6c1e56c3cbbd3472f2f1fa059d5ed617d1503 | |
parent | a96db2f067659434e442cc81f0e5c22dfc2995ce (diff) | |
download | ComputeLibrary-9c07d4616b600d8b392beb6c693ba56e16b245d4.tar.gz |
Add include guards to half.h header
Two macros, HALF_ENABLE_CPP11_CMATH and HALF_ROUND_TIES_TO_EVEN had
conflicting macro definitions in the armnn test suite. Add include
guards to work around this compile error.
Test: local build
Change-Id: I4a3b9476600406800e1818ac1a5da6b535a44b78
-rw-r--r-- | support/Half.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/support/Half.h b/support/Half.h index ae31be328..6790dec1a 100644 --- a/support/Half.h +++ b/support/Half.h @@ -26,12 +26,17 @@ #if(__ANDROID__ || BARE_METAL) // Android toolchain is broken and doesn't support all CPP11 math functions. +#ifndef HALF_ENABLE_CPP11_CMATH #define HALF_ENABLE_CPP11_CMATH 0 +#endif /* HALF_ENABLE_CPP11_CMATH */ #endif /* __ANDROID__ || BARE_METAL */ // Set style to round to nearest #define HALF_ROUND_STYLE 1 + +#ifndef HALF_ROUND_TIES_TO_EVEN #define HALF_ROUND_TIES_TO_EVEN 1 +#endif /* HALF_ROUND_TIES_TO_EVEN */ #include "half/half.hpp" |