Skip to content

Commit

Permalink
fix intel compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
fnrizzi committed Sep 19, 2023
1 parent 6a95b5f commit bcb92a6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions algorithms/unit_tests/TestStdAlgorithmsTeamFindIf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ struct TestFunctorA {
const auto myRowIndex = member.league_rank();
auto myRowViewFrom = Kokkos::subview(m_dataView, myRowIndex, Kokkos::ALL());
const auto val = m_greaterThanValuesView(myRowIndex);
// FIXME_INTEL
#if defined(KOKKOS_COMPILER_INTEL) && (1900 == KOKKOS_COMPILER_INTEL)
GreaterEqualFunctor<
typename GreaterThanValuesViewType::non_const_value_type>
unaryPred{val};
#else
GreaterEqualFunctor unaryPred{val};
#endif

switch (m_apiPick) {
case 0: {
Expand Down Expand Up @@ -162,7 +169,12 @@ void test_A(const bool predicatesReturnTrue, std::size_t numTeams,
const auto rowFromBegin = KE::cbegin(rowFrom);
const auto rowFromEnd = KE::cend(rowFrom);
const auto val = greaterEqualValuesView_h(i);
// FIXME_INTEL
#if defined(KOKKOS_COMPILER_INTEL) && (1900 == KOKKOS_COMPILER_INTEL)
const GreaterEqualFunctor<ValueType> unaryPred{val};
#else
const GreaterEqualFunctor unaryPred{val};
#endif

auto it = std::find_if(rowFromBegin, rowFromEnd, unaryPred);

Expand Down
12 changes: 12 additions & 0 deletions algorithms/unit_tests/TestStdAlgorithmsTeamFindIfNot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,14 @@ struct TestFunctorA {
const auto myRowIndex = member.league_rank();
auto myRowViewFrom = Kokkos::subview(m_dataView, myRowIndex, Kokkos::ALL());
const auto val = m_greaterThanValuesView(myRowIndex);
// FIXME_INTEL
#if defined(KOKKOS_COMPILER_INTEL) && (1900 == KOKKOS_COMPILER_INTEL)
GreaterEqualFunctor<
typename GreaterThanValuesViewType::non_const_value_type>
unaryPred{val};
#else
GreaterEqualFunctor unaryPred{val};
#endif

switch (m_apiPick) {
case 0: {
Expand Down Expand Up @@ -157,7 +164,12 @@ void test_A(const bool predicatesReturnTrue, std::size_t numTeams,
const auto rowFromBegin = KE::cbegin(rowFrom);
const auto rowFromEnd = KE::cend(rowFrom);
const auto val = greaterEqualValuesView_h(i);
// FIXME_INTEL
#if defined(KOKKOS_COMPILER_INTEL) && (1900 == KOKKOS_COMPILER_INTEL)
const GreaterEqualFunctor<ValueType> unaryPred{val};
#else
const GreaterEqualFunctor unaryPred{val};
#endif

auto it = std::find_if_not(rowFromBegin, rowFromEnd, unaryPred);

Expand Down

0 comments on commit bcb92a6

Please sign in to comment.