18 #if !defined(__FLECSI_PRIVATE__) 19 #error Do not include this file directly! 22 #if !defined(FLECSI_ENABLE_KOKKOS) 23 #error FLECSI_ENABLE_KOKKOS not defined! This file depends on Kokkos! 40 template<
typename ITERATOR,
typename LAMBDA>
43 std::string
const & name =
"") {
47 functor_t(ITERATOR & iterator, LAMBDA & lambda)
48 : iterator_(iterator), lambda_(lambda) {}
50 KOKKOS_INLINE_FUNCTION
void operator()(
int i)
const {
60 Kokkos::parallel_for(name, iterator.size(), functor_t{iterator, lambda});
73 template<
typename ITERATOR>
83 forall(ITERATOR iterator, std::string
const & name =
"")
84 : iterator_(iterator), name_(name) {}
92 template<
typename LAMBDA>
95 functor(ITERATOR iterator, LAMBDA lambda, std::string
const & name)
96 : iterator_(iterator), lambda_(lambda), name_(name) {}
98 void operator()(int64_t i)
const {
99 lambda_(iterator_[i]);
105 std::string &
const name_;
116 template<
typename CALLABLE>
118 Kokkos::parallel_for(
119 name_, iterator_.size(), functor_t{iterator_, lambda_});
124 std::string &
const name_;
Definition: kernel_interface.hh:74
void operator<<(CALLABLE l)
Definition: kernel_interface.hh:117
forall(ITERATOR iterator, std::string const &name="")
Definition: kernel_interface.hh:83
Definition: kernel_interface.hh:93
parallel_for(ITERATOR const iterator, LAMBDA const lambda, std::string const &name="")
Definition: kernel_interface.hh:41
Definition: control.hh:31