Skip to content

Commit

Permalink
remove unnecessary file, fix constraints
Browse files Browse the repository at this point in the history
  • Loading branch information
fnrizzi committed Aug 8, 2023
1 parent f49c11e commit 4d4fde3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 93 deletions.
5 changes: 3 additions & 2 deletions algorithms/src/std_algorithms/Kokkos_CountIf.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ template <typename TeamHandleType, typename IteratorType, typename Predicate,
KOKKOS_FUNCTION typename IteratorType::difference_type count_if(
const TeamHandleType& teamHandle, IteratorType first, IteratorType last,
Predicate predicate) {
return Impl::count_if_team_impl(teamHandle, first, last, std::move(predicate));
return Impl::count_if_team_impl(teamHandle, first, last,
std::move(predicate));
}

template <typename TeamHandleType, typename DataType, typename... Properties,
Expand All @@ -98,7 +99,7 @@ KOKKOS_FUNCTION auto count_if(const TeamHandleType& teamHandle,
Impl::static_assert_is_admissible_to_kokkos_std_algorithms(v);

namespace KE = ::Kokkos::Experimental;
return Impl::count_if_team_impl(ex, KE::cbegin(v), KE::cend(v),
return Impl::count_if_team_impl(teamHandle, KE::cbegin(v), KE::cend(v),
std::move(predicate));
}

Expand Down
31 changes: 15 additions & 16 deletions algorithms/src/std_algorithms/Kokkos_UniqueCopy.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#ifndef KOKKOS_STD_ALGORITHMS_UNIQUE_COPY_HPP
#define KOKKOS_STD_ALGORITHMS_UNIQUE_COPY_HPP

#include "./impl/Kokkos_IsRandomAccessIterator.hpp"
#include "impl/Kokkos_UniqueCopy.hpp"
#include "Kokkos_BeginEnd.hpp"

Expand All @@ -27,22 +26,22 @@ namespace Experimental {
//
// overload set1: default predicate, accepting execution space
//
template <typename ExecutionSpace, typename InputIterator,
typename OutputIterator,
std::enable_if_t<Impl::is_random_access_iterator_v<InputIterator> &&
is_execution_space_v<ExecutionSpace>,
int> = 0>
template <
typename ExecutionSpace, typename InputIterator, typename OutputIterator,
std::enable_if_t<Impl::are_iterators_v<InputIterator, OutputIterator> &&
is_execution_space_v<ExecutionSpace>,
int> = 0>
OutputIterator unique_copy(const ExecutionSpace& ex, InputIterator first,
InputIterator last, OutputIterator d_first) {
return Impl::unique_copy_exespace_impl(
"Kokkos::unique_copy_iterator_api_default", ex, first, last, d_first);
}

template <typename ExecutionSpace, typename InputIterator,
typename OutputIterator,
std::enable_if_t<Impl::is_random_access_iterator_v<InputIterator> &&
is_execution_space_v<ExecutionSpace>,
int> = 0>
template <
typename ExecutionSpace, typename InputIterator, typename OutputIterator,
std::enable_if_t<Impl::are_iterators_v<InputIterator, OutputIterator> &&
is_execution_space_v<ExecutionSpace>,
int> = 0>
OutputIterator unique_copy(const std::string& label, const ExecutionSpace& ex,
InputIterator first, InputIterator last,
OutputIterator d_first) {
Expand Down Expand Up @@ -140,11 +139,11 @@ auto unique_copy(const std::string& label, const ExecutionSpace& ex,
// Note: for now omit the overloads accepting a label
// since they cause issues on device because of the string allocation.
//
template <typename TeamHandleType, typename InputIterator,
typename OutputIterator,
std::enable_if_t<Impl::is_random_access_iterator_v<InputIterator> &&
Kokkos::is_team_handle_v<TeamHandleType>,
int> = 0>
template <
typename TeamHandleType, typename InputIterator, typename OutputIterator,
std::enable_if_t<Impl::are_iterators_v<InputIterator, OutputIterator> &&
Kokkos::is_team_handle_v<TeamHandleType>,
int> = 0>
KOKKOS_FUNCTION OutputIterator unique_copy(const TeamHandleType& teamHandle,
InputIterator first,
InputIterator last,
Expand Down

This file was deleted.

0 comments on commit 4d4fde3

Please sign in to comment.