Skip to content

Commit

Permalink
Workaround icpc "missing return statement at end of non-void function"
Browse files Browse the repository at this point in the history
Workaround "missing return statement at end of non-void function" warnings triggering -Werror with intel classic compilers
Address issue kokkos#7071
  • Loading branch information
ndellingwood committed Jun 13, 2024
1 parent d546199 commit 63d8093
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions containers/src/Kokkos_OffsetView.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,9 @@ class OffsetView : public ViewTraits<DataType, Properties...> {
return m_map.m_impl_handle[j0 * m_map.m_impl_offset.m_stride.S0 +
j1 * m_map.m_impl_offset.m_stride.S1];
}
#if defined KOKKOS_COMPILER_INTEL
__builtin_unreachable();
#endif
}

//------------------------------
Expand Down
6 changes: 6 additions & 0 deletions core/src/Kokkos_View.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -970,6 +970,9 @@ class View : public ViewTraits<DataType, Properties...> {
return m_map.m_impl_handle[i0 * m_map.m_impl_offset.m_stride.S0 +
i1 * m_map.m_impl_offset.m_stride.S1];
}
#if defined KOKKOS_COMPILER_INTEL
__builtin_unreachable();
#endif
}

// Rank 0 -> 8 operator() except for rank-1 and rank-2 with default map which
Expand Down Expand Up @@ -1083,6 +1086,9 @@ class View : public ViewTraits<DataType, Properties...> {
return m_map.m_impl_handle[i0 * m_map.m_impl_offset.m_stride.S0 +
i1 * m_map.m_impl_offset.m_stride.S1];
}
#if defined KOKKOS_COMPILER_INTEL
__builtin_unreachable();
#endif
}

//------------------------------
Expand Down

0 comments on commit 63d8093

Please sign in to comment.