Skip to content

Commit

Permalink
Fix kokkos#6334: intel compiler does not like returning inside if con…
Browse files Browse the repository at this point in the history
…stexpr (kokkos#6335)

* fixes kokkos#6334

* try fixing windows

* try another solution

* fix rank

* format

* try sfinae on return type (intentionally avoid jenkins via wrong format)

* try suggestion

* try ctad

* try sfinae for both functions

* last try for today

* last resort solution [skip ci]

* format

* use unreachable
  • Loading branch information
fnrizzi committed Aug 7, 2023
1 parent 40fb259 commit 639c1da
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions algorithms/unit_tests/TestStdAlgorithmsCommon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,12 @@ auto create_deep_copyable_compatible_view_with_same_extent(ViewType view) {
const std::size_t ext1 = view.extent(1);
return view_deep_copyable_t{"view_dc", ext0, ext1};
}

// this is needed for intel to avoid
// error #1011: missing return statement at end of non-void function
#if defined KOKKOS_COMPILER_INTEL
__builtin_unreachable();
#endif
}

template <class ViewType>
Expand Down

0 comments on commit 639c1da

Please sign in to comment.