Toggle table of contents sidebar
for_each_n
¶
Header File: Kokkos_StdAlgorithms.hpp
namespace Kokkos{ namespace Experimental{ template <class ExecutionSpace, class InputIterator, class SizeType, class UnaryFunctorType> UnaryFunctorType for_each_n(const ExecutionSpace& exespace, InputIterator first, SizeType n, UnaryFunctorType functor); (1) template <class ExecutionSpace, class InputIterator, class SizeType, class UnaryFunctorType> UnaryFunctorType for_each_n(const std::string& label, const ExecutionSpace& exespace, InputIterator first, SizeType n UnaryFunctorType functor); (2) template <class ExecutionSpace, class DataType, class... Properties, class SizeType, class UnaryFunctorType> UnaryFunctorType for_each_n(const ExecutionSpace& exespace, const Kokkos::View<DataType, Properties...>& view, SizeType n, UnaryFunctorType functor); (3) template <class ExecutionSpace, class DataType, class... Properties, class SizeType, class UnaryFunctorType> UnaryFunctorType for_each_n(const std::string& label, const ExecutionSpace& exespace, const Kokkos::View<DataType, Properties...>& view, SizeType n, UnaryFunctorType func); (4) } //end namespace Experimental } //end namespace KokkosDescription¶
Applies the UnaryFunctorType func
to the result of dereferencing each iterator in [first,first+n]
for (1,2) and in (3,4) the functor is applied to the first n
elements of the view.
(1,2): overload set accepting iterators
(3,4): overload set accepting views
exespace
, first
, view
, func
: same as in for_each
label
:
for 1, the default string is: “Kokkos::for_each_n_iterator_api_default”
for 3, the default string is: “Kokkos::for_each_n_view_api_default”
n
:
number of elements to operate on
func
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