Skip to content

Commit

Permalink
fix unreachable for intel
Browse files Browse the repository at this point in the history
  • Loading branch information
fnrizzi committed Sep 19, 2023
1 parent 6a95b5f commit e950759
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions core/unit_test/TestMathematicalFunctions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@
#define MATHEMATICAL_FUNCTIONS_HAVE_LONG_DOUBLE_OVERLOADS
#endif

#if defined KOKKOS_COMPILER_INTEL
#define MATHEMATICAL_FUNCTIONS_TEST_UNREACHABLE __builtin_unreachable();
#else
#define MATHEMATICAL_FUNCTIONS_TEST_UNREACHABLE
#endif

namespace KE = Kokkos::Experimental;

// clang-format off
Expand Down Expand Up @@ -318,6 +324,7 @@ struct math_function_name;
math_unary_function_return_type_t<T>>::value); \
return std::FUNC(x); \
} \
MATHEMATICAL_FUNCTIONS_TEST_UNREACHABLE \
} \
static KOKKOS_FUNCTION double ulp_factor() { return ULP_FACTOR; } \
}; \
Expand Down Expand Up @@ -444,6 +451,7 @@ DEFINE_UNARY_FUNCTION_EVAL(logb, 2);
math_binary_function_return_type_t<T, U>>::value); \
return std::FUNC(x, y); \
} \
MATHEMATICAL_FUNCTIONS_TEST_UNREACHABLE \
} \
static KOKKOS_FUNCTION double ulp_factor() { return ULP_FACTOR; } \
}; \
Expand Down

0 comments on commit e950759

Please sign in to comment.