A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://kokkos.github.io/kokkos-core-wiki/API/algorithms/std-algorithms/all/StdFind.html below:

find - Kokkos documentation

find

Header: <Kokkos_StdAlgorithms.hpp>

Description

Returns an iterator to the first element in a range or rank-1 View that equals a target value. Equality is checked using operator==.

Interface

Warning

This is currently inside the Kokkos::Experimental namespace.

Overload set accepting execution space
template <class ExecutionSpace, class InputIterator, class T>
InputIterator find(const ExecutionSpace& exespace,                                   (1)
                   InputIterator first, InputIterator last,
                   const T& value);

template <class ExecutionSpace, class InputIterator, class T>
InputIterator find(const std::string& label, const ExecutionSpace& exespace,         (2)
                   InputIterator first, InputIterator last,
                   const T& value);

template <class ExecutionSpace, class DataType, class... Properties, class T>
auto find(const ExecutionSpace& exespace,                                            (3)
          const Kokkos::View<DataType, Properties...>& view,
          const T& value);

template <class ExecutionSpace, class DataType, class... Properties, class T>
auto find(const std::string& label, const ExecutionSpace& exespace,                  (4)
          const Kokkos::View<DataType, Properties...>& view,
          const T& value);
Overload set accepting a team handle

Added in version 4.2.

template <class TeamHandleType, class InputIterator, class T>
KOKKOS_FUNCTION
InputIterator find(const TeamHandleType& teamHandle,                                 (5)
                   InputIterator first, InputIterator last,
                   const T& value);

template <class TeamHandleType, class DataType, class... Properties, class T>
KOKKOS_FUNCTION
auto find(const TeamHandleType& teamHandle,                                          (6)
          const Kokkos::View<DataType, Properties...>& view,
          const T& value);
Parameters and Requirements Return Value Example
namespace KE = Kokkos::Experimental;
auto exespace = Kokkos::DefaultExecutionSpace;
using view_type = Kokkos::View<exespace, int*>;
view_type a("a", 15);
// fill "a" somehow

auto exespace = Kokkos::DefaultExecutionSpace;
auto it1 = KE::find(exespace, KE::cbegin(a), KE::cend(a), 5);

// assuming OpenMP is enabled and "a" is host-accessible, you can also do
auto it2 = KE::find(Kokkos::OpenMP(), KE::begin(a), KE::end(a), 5);

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4