RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
forall.hpp
Go to the documentation of this file.
1 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
2 // Copyright (c) Lawrence Livermore National Security, LLC and other
3 // RAJA Project Developers. See top-level LICENSE and COPYRIGHT
4 // files for dates and other details. No copyright assignment is required
5 // to contribute to RAJA.
6 //
7 // SPDX-License-Identifier: (BSD-3-Clause)
8 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
9 
10 #ifndef FORALL_PARAM_HPP
11 #define FORALL_PARAM_HPP
12 
13 
17 #include "camp/camp.hpp"
18 #include "camp/concepts.hpp"
19 #include "camp/tuple.hpp"
20 
23 
24 #include <utility>
25 
26 namespace RAJA
27 {
28 namespace expt
29 {
30 namespace detail
31 {
32 
33 template<typename... Params>
34 RAJA_HOST_DEVICE constexpr auto filter_reducers(camp::tuple<Params...>& params)
35 {
36  return camp::get_refs_to_elements_by_type_trait<is_instance_of_Reducer>(
37  params);
38 }
39 
40 template<typename ExecPol,
41  typename ParamTuple,
42  camp::idx_t... Seq,
43  typename... Args>
44 void resolve_params_helper(ParamTuple& params_tuple,
45  const camp::idx_seq<Seq...>&,
46  Args&&... args)
47 {
48  (param_resolve(ExecPol {}, camp::get<Seq>(params_tuple),
49  std::forward<Args>(args)...),
50  ...);
51 }
52 
53 template<typename ExecPol, typename... Params, typename... Args>
54 void resolve_params(camp::tuple<Params...>& params_tuple, Args&&... args)
55 {
56  auto params = filter_reducers(params_tuple);
57  using ParamTupleType = decltype(params);
58  resolve_params_helper<ExecPol>(
59  params, camp::make_idx_seq_t<camp::tuple_size<ParamTupleType>::value>(),
60  std::forward<Args>(args)...);
61 }
62 
63 template<typename ExecPol,
64  typename ParamTuple,
65  camp::idx_t... Seq,
66  typename... Args>
67 void init_params_helper(ParamTuple& params_tuple,
68  const camp::idx_seq<Seq...>&,
69  Args&&... args)
70 {
71  (param_init(ExecPol {}, camp::get<Seq>(params_tuple),
72  std::forward<Args>(args)...),
73  ...);
74 }
75 
76 template<typename ExecPol, typename... Params, typename... Args>
77 void init_params(camp::tuple<Params...>& params_tuple, Args&&... args)
78 {
79  auto params = filter_reducers(params_tuple);
80  using ParamTupleType = decltype(params);
81  init_params_helper<ExecPol>(
82  params, camp::make_idx_seq_t<camp::tuple_size<ParamTupleType>::value>(),
83  std::forward<Args>(args)...);
84 }
85 
86 template<typename ExecPol, typename ParamTuple, camp::idx_t... Seq>
87 RAJA_HOST_DEVICE void combine_params_helper(const camp::idx_seq<Seq...>&,
88  ParamTuple& params_tuple)
89 {
90  (param_combine(ExecPol {}, camp::get<Seq>(params_tuple)), ...);
91 }
92 
93 template<typename EXEC_POL, typename T>
94 camp::concepts::enable_if<
95  concepts::negate<is_instance_of_Reducer<camp::decay<T>>>,
96  concepts::negate<std::is_same<T, RAJA::detail::Name>>>
97 param_combine(EXEC_POL const&, T&, const T&)
98 {}
99 
100 template<typename ExecPol, typename ParamTuple, camp::idx_t... Seq>
101 RAJA_HOST_DEVICE void combine_params_helper(const camp::idx_seq<Seq...>&,
102  ParamTuple& params_tuple,
103  const ParamTuple& params_tuple_in)
104 {
105  (param_combine(ExecPol {}, camp::get<Seq>(params_tuple),
106  camp::get<Seq>(params_tuple_in)),
107  ...);
108 }
109 
110 template<typename ExecPol, typename... Params>
111 RAJA_HOST_DEVICE void combine_params(camp::tuple<Params...>& params_tuple)
112 {
113  auto params = filter_reducers(params_tuple);
114  using ParamTupleType = camp::decay<decltype(params)>;
115  combine_params_helper<ExecPol>(
116  camp::make_idx_seq_t<camp::tuple_size<ParamTupleType>::value>(), params);
117 }
118 
119 template<typename ExecPol, typename... Params>
121  camp::tuple<Params...>& params_tuple,
122  const camp::tuple<Params...>& params_tuple_in)
123 {
124  using ParamTupleType = camp::decay<decltype(params_tuple)>;
125  combine_params_helper<ExecPol>(
126  camp::make_idx_seq_t<camp::tuple_size<ParamTupleType>::value>(),
127  params_tuple, params_tuple_in);
128 }
129 
130 } // namespace detail
131 //
132 //
133 // Forall Parameter Packing type
134 //
135 //
136 struct ParamMultiplexer;
137 
138 template<typename... Params>
140 {
141 
142  friend struct ParamMultiplexer;
143 
144  using Base = camp::tuple<Params...>;
146 
147  static constexpr size_t param_tup_sz = camp::tuple_size<Base>::value;
148  using params_seq = camp::make_idx_seq_t<param_tup_sz>;
149 
150 private:
151  // Init
152  template<typename EXEC_POL, camp::idx_t... Seq, typename... Args>
153  static constexpr void parampack_init(EXEC_POL const& pol,
154  camp::idx_seq<Seq...>,
155  ForallParamPack& f_params,
156  Args&&... args)
157  {
158  (param_init(pol, camp::get<Seq>(f_params.param_tup),
159  std::forward<Args>(args)...),
160  ...);
161  }
162 
163  // Combine
164  template<typename EXEC_POL, camp::idx_t... Seq>
165  RAJA_HOST_DEVICE static constexpr void parampack_combine(
166  EXEC_POL const& pol,
167  camp::idx_seq<Seq...>,
168  ForallParamPack& out,
169  const ForallParamPack& in)
170  {
171  (param_combine(pol, camp::get<Seq>(out.param_tup),
172  camp::get<Seq>(in.param_tup)),
173  ...);
174  }
175 
176  template<typename EXEC_POL, camp::idx_t... Seq>
177  RAJA_HOST_DEVICE static constexpr void parampack_combine(
178  EXEC_POL const& pol,
179  camp::idx_seq<Seq...>,
180  ForallParamPack& f_params)
181  {
182  (param_combine(pol, camp::get<Seq>(f_params.param_tup)), ...);
183  }
184 
185  // Resolve
186  template<typename EXEC_POL, camp::idx_t... Seq, typename... Args>
187  static constexpr void parampack_resolve(EXEC_POL const& pol,
188  camp::idx_seq<Seq...>,
189  ForallParamPack& f_params,
190  Args&&... args)
191  {
192  (param_resolve(pol, camp::get<Seq>(f_params.param_tup),
193  std::forward<Args>(args)...),
194  ...);
195  }
196 
197  // Used to construct the argument TYPES that will be invoked with the lambda.
198  template<typename null_t = camp::nil>
199  static constexpr auto LAMBDA_ARG_TUP_T()
200  {
201  return camp::tuple<> {};
202  };
203 
204  template<typename null_t = camp::nil, typename First>
205  static constexpr auto LAMBDA_ARG_TUP_T()
206  {
207  return typename First::ARG_TUP_T();
208  };
209 
210  template<typename null_t = camp::nil,
211  typename First,
212  typename Second,
213  typename... Rest>
214  static constexpr auto LAMBDA_ARG_TUP_T()
215  {
216  return camp::tuple_cat_pair(typename First::ARG_TUP_T(),
217  LAMBDA_ARG_TUP_T<camp::nil, Second, Rest...>());
218  };
219 
220  using lambda_arg_tuple_t = decltype(LAMBDA_ARG_TUP_T<camp::nil, Params...>());
221 
222  // Use the size of param_tup to generate the argument list.
223  RAJA_HOST_DEVICE constexpr auto LAMBDA_ARG_TUP_V(camp::num<0>)
224  {
225  return camp::make_tuple();
226  }
227 
228  RAJA_HOST_DEVICE constexpr auto LAMBDA_ARG_TUP_V(camp::num<1>)
229  {
230  return camp::get<param_tup_sz - 1>(param_tup).get_lambda_arg_tup();
231  }
232 
233  template<camp::idx_t N>
234  RAJA_HOST_DEVICE constexpr auto LAMBDA_ARG_TUP_V(camp::num<N>)
235  {
236  return camp::tuple_cat_pair(
237  camp::get<param_tup_sz - N>(param_tup).get_lambda_arg_tup(),
238  LAMBDA_ARG_TUP_V(camp::num<N - 1>()));
239  }
240 
241 public:
243 
244  RAJA_HOST_DEVICE constexpr lambda_arg_tuple_t lambda_args()
245  {
246  return LAMBDA_ARG_TUP_V(camp::num<sizeof...(Params)>());
247  }
248 
250  camp::make_idx_seq_t<camp::tuple_size<lambda_arg_tuple_t>::value>;
251 
252  template<typename... Ts>
253  ForallParamPack(camp::tuple<Ts...>&& t) : param_tup(std::move(t)) {};
254 
255 }; // struct ForallParamPack
256 
257 //===========================================================================
258 //
259 //
260 // ParamMultiplexer is how we hook into the individual calls within forall_impl.
261 //
262 //
264 {
265  template<typename EXEC_POL,
266  typename... Params,
267  typename... Args,
268  typename FP = ForallParamPack<Params...>>
269  static void constexpr parampack_init(EXEC_POL const& pol,
270  ForallParamPack<Params...>& f_params,
271  Args&&... args)
272  {
273  constexpr bool has_reducers =
275  if constexpr (has_reducers)
276  {
277  FP::parampack_init(pol, typename FP::params_seq(), f_params,
278  std::forward<Args>(args)...);
279  }
280  }
281 
282  template<typename EXEC_POL,
283  typename... Params,
284  typename... Args,
285  typename FP = ForallParamPack<Params...>>
286  RAJA_HOST_DEVICE static void constexpr parampack_combine(
287  EXEC_POL const& pol,
288  ForallParamPack<Params...>& f_params,
289  Args&&... args)
290  {
291  constexpr bool has_reducers =
293  if constexpr (has_reducers)
294  {
295  FP::parampack_combine(pol, typename FP::params_seq(), f_params,
296  std::forward<Args>(args)...);
297  }
298  }
299 
300  template<typename EXEC_POL,
301  typename... Params,
302  typename... Args,
303  typename FP = ForallParamPack<Params...>>
304  static void constexpr parampack_resolve(EXEC_POL const& pol,
305  ForallParamPack<Params...>& f_params,
306  Args&&... args)
307  {
308  constexpr bool has_reducers =
310  if constexpr (has_reducers)
311  {
312  FP::parampack_resolve(pol, typename FP::params_seq(), f_params,
313  std::forward<Args>(args)...);
314  }
315  }
316 };
317 
318 //===========================================================================
319 
320 
321 //===========================================================================
322 //
323 //
324 // ForallParamPack generators.
325 //
326 //
327 RAJA_INLINE static auto get_empty_forall_param_pack()
328 {
329  static ForallParamPack<> p;
330  return p;
331 }
332 
333 namespace detail
334 {
335 // all_true trick to perform variadic expansion in static asserts.
336 // https://stackoverflow.com/questions/36933176/how-do-you-static-assert-the-values-in-a-parameter-pack-of-a-variadic-template
337 template<bool...>
338 struct bool_pack;
339 template<bool... bs>
340 using all_true = std::is_same<bool_pack<bs..., true>, bool_pack<true, bs...>>;
341 
342 template<typename Base, typename... Ts>
345 } // namespace detail
346 
347 template<typename... Ts>
348 constexpr auto make_forall_param_pack_from_tuple(camp::tuple<Ts...>&& tuple)
349 {
351  camp::decay<Ts>...>::value,
352  "Forall optional arguments do not derive ForallParamBase. "
353  "Please see Reducer, ReducerLoc and Name for examples.");
354  return ForallParamPack<camp::decay<Ts>...>(std::move(tuple));
355 }
356 
357 namespace detail
358 {
359 // Maybe we should do a lot of these with structs...
360 template<camp::idx_t... Seq, typename TupleType>
361 constexpr auto tuple_from_seq(const camp::idx_seq<Seq...>&, TupleType&& tuple)
362 {
363  return camp::forward_as_tuple(
364  camp::get<Seq>(std::forward<TupleType>(tuple))...);
365 };
366 
367 template<typename... Ts>
368 constexpr auto strip_last_elem(camp::tuple<Ts...>&& tuple)
369 {
370  return tuple_from_seq(camp::make_idx_seq_t<sizeof...(Ts) - 1> {},
371  std::move(tuple));
372 };
373 } // namespace detail
374 
375 // Make a tuple of the param pack except the final element...
376 template<typename... Args>
377 constexpr auto make_forall_param_pack(Args&&... args)
378 {
379  // We assume the last element of the pack is the lambda so we need to strip it
380  // from the list.
381  auto stripped_arg_tuple = detail::strip_last_elem(
382  camp::forward_as_tuple(std::forward<Args>(args)...));
383  return make_forall_param_pack_from_tuple(std::move(stripped_arg_tuple));
384 }
385 
386 //===========================================================================
387 
388 
389 //===========================================================================
390 //
391 //
392 // Callable should be the last argument in the param pack, just extract it...
393 //
394 //
395 template<typename... Args>
396 constexpr auto&& get_lambda(Args&&... args)
397 {
398  return camp::get<sizeof...(Args) - 1>(
399  camp::forward_as_tuple(std::forward<Args>(args)...));
400 }
401 
402 //===========================================================================
403 
404 //===========================================================================
405 //
406 //
407 // kernel_name can be anywhere in the paramater pack so we must search for it
408 //
409 //===========================================================================
410 template<std::size_t name_idx,
411  typename... Args,
412  std::enable_if_t<(name_idx < sizeof...(Args))>* = nullptr>
413 std::string get_kernel_name_string(camp::tuple<Args...>&& tuple_args)
414 {
415  return std::string(camp::get<name_idx>(std::move(tuple_args)).name);
416 }
417 
418 template<std::size_t name_idx,
419  typename... Args,
420  std::enable_if_t<(name_idx >= sizeof...(Args))>* = nullptr>
422  camp::tuple<Args...>&& RAJA_UNUSED_ARG(tuple_args))
423 {
424  return std::string();
425 }
426 
427 template<typename... Args, std::size_t... Idx>
429  camp::tuple<Args...>&& tuple_args,
430  std::index_sequence<Idx...> RAJA_UNUSED_ARG(i_seq))
431 {
432  constexpr std::size_t default_idx = std::numeric_limits<std::size_t>::max();
433  constexpr std::size_t name_idx = std::min(
434  {default_idx, (std::is_same<std::decay_t<Args>, RAJA::detail::Name>::value
435  ? Idx
436  : default_idx)...});
437 
438  return get_kernel_name_string<name_idx>(std::move(tuple_args));
439 }
440 
441 template<typename... Args>
442 std::string get_kernel_name(Args&&... args)
443 {
444  return get_kernel_name_helper(
445  camp::forward_as_tuple(std::forward<Args>(args)...),
446  std::make_index_sequence<sizeof...(Args)> {});
447 }
448 
449 //===========================================================================
450 
451 //===========================================================================
452 //
453 //
454 // Checking expected argument list against the assumed lambda.
455 //
456 //
457 namespace detail
458 {
459 
460 //
461 //
462 // Lambda traits Utilities
463 //
464 //
465 template<class F>
467 
468 template<class R, class C, class First, class... Rest>
469 struct lambda_traits<R (C::*)(First, Rest...)>
470 { // non-const specialization
471  using arg_type = First;
472 };
473 
474 template<class R, class C, class First, class... Rest>
475 struct lambda_traits<R (C::*)(First, Rest...) const>
476 { // const specialization
477  using arg_type = First;
478 };
479 
480 template<class T>
482 
483 //
484 //
485 // List manipulation Utilities
486 //
487 //
488 template<typename... Ts>
489 constexpr auto list_remove_pointer(const camp::list<Ts...>&)
490 {
491  return camp::list<camp::decay<typename std::remove_pointer<Ts>::type>...> {};
492 }
493 
494 template<typename... Ts>
495 constexpr auto list_add_lvalue_ref(const camp::list<Ts...>&)
496 {
497  return camp::list<typename std::add_lvalue_reference<Ts>::type...> {};
498 }
499 
500 template<typename... Ts>
501 constexpr auto tuple_to_list(const camp::tuple<Ts...>&)
502 {
503  return camp::list<Ts...> {};
504 }
505 
506 // TODO : Change to std::is_invocable at c++17
507 template<typename F, typename... Args>
509  : std::is_constructible<
510  std::function<void(Args...)>,
511  std::reference_wrapper<typename std::remove_reference<F>::type>>
512 {};
513 
514 template<class...>
515 using void_t = void;
516 
517 template<class F, class = void>
518 struct has_empty_op : std::false_type
519 {};
520 
521 template<class F>
522 struct has_empty_op<F, void_t<decltype(std::declval<F::operator()>)>>
523  : std::true_type
524 {};
525 
526 template<class F>
528 {
529  typedef typename std::remove_pointer<decltype(lambda_arg_helper(
530  &camp::decay<F>::operator()))>::type type;
531 };
532 
533 // If LAMBDA::operator() is not available this probably isn't a generic lambda
534 // and we can't extract and check args.
535 template<typename LAMBDA, typename... EXPECTED_ARGS>
536 constexpr concepts::enable_if<concepts::negate<has_empty_op<LAMBDA>>>
537 check_invocable(LAMBDA&&, const camp::list<EXPECTED_ARGS...>&)
538 {}
539 
540 template<typename LAMBDA, typename... EXPECTED_ARGS>
541 constexpr concepts::enable_if<has_empty_op<LAMBDA>> check_invocable(
542  LAMBDA&&,
543  const camp::list<EXPECTED_ARGS...>&)
544 {
545 #if !defined(RAJA_ENABLE_HIP)
546  static_assert(
548  EXPECTED_ARGS...>::value,
549  "LAMBDA Not invocable w/ EXPECTED_ARGS. Ordering and types must match "
550  "between RAJA::expt::Reduce() and ValOp arguments.");
551 #endif
552 }
553 
554 } // namespace detail
555 
556 template<typename Lambda, typename ForallParams>
557 constexpr void check_forall_optional_args(Lambda&& l, ForallParams& fpp)
558 {
559 
560  using expected_arg_type_list = decltype(detail::list_add_lvalue_ref(
562 
563  detail::check_invocable(std::forward<Lambda>(l), expected_arg_type_list {});
564 }
565 
566 //===========================================================================
567 
568 
569 //===========================================================================
570 //
571 //
572 // Invoke Forall with Params.
573 //
574 //
575 namespace detail
576 {
577 template<camp::idx_t Idx, typename FP>
578 RAJA_HOST_DEVICE constexpr auto get_lambda_args(FP& fpp)
579  -> decltype(*camp::get<Idx>(fpp.lambda_args()))
580 {
581  return (*camp::get<Idx>(fpp.lambda_args()));
582 }
583 
584 CAMP_SUPPRESS_HD_WARN
585 template<typename Fn, camp::idx_t... Sequence, typename Params, typename... Ts>
586 RAJA_HOST_DEVICE constexpr auto invoke_with_order(Params&& params,
587  Fn&& f,
588  camp::idx_seq<Sequence...>,
589  Ts&&... extra)
590 {
591  return f(std::forward<Ts...>(extra...),
592  (get_lambda_args<Sequence>(params))...);
593 }
594 } // namespace detail
595 
596 // CAMP_SUPPRESS_HD_WARN
597 template<typename Params, typename Fn, typename... Ts>
598 RAJA_HOST_DEVICE constexpr auto invoke_body(Params&& params,
599  Fn&& f,
600  Ts&&... extra)
601 {
602  using FPType = camp::decay<Params>;
603  constexpr bool has_reducers =
605  if constexpr (has_reducers)
606  {
608  camp::forward<Params>(params), camp::forward<Fn>(f),
609  typename camp::decay<Params>::lambda_arg_seq(),
610  camp::forward<Ts...>(extra)...);
611  }
612  else
613  {
614  return f(camp::forward<Ts...>(extra)...);
615  }
616 }
617 
618 //===========================================================================
619 
620 } // namespace expt
621 } // namespace RAJA
622 
623 #endif // FORALL_PARAM_HPP
Header file for RAJA CombingAdapter.
Header containing helper type traits for work with Reducers.
#define RAJA_HOST_DEVICE
Definition: macros.hpp:65
#define RAJA_UNUSED_ARG(x)
Definition: macros.hpp:97
Args args
Definition: WorkRunner.hpp:212
CAMP_SUPPRESS_HD_WARN constexpr RAJA_HOST_DEVICE auto invoke_with_order(Params &&params, Fn &&f, camp::idx_seq< Sequence... >, Ts &&... extra)
Definition: forall.hpp:586
constexpr auto list_add_lvalue_ref(const camp::list< Ts... > &)
Definition: forall.hpp:495
camp::concepts::enable_if< std::is_same< EXEC_POL, RAJA::seq_exec > > param_init(EXEC_POL const &, RAJA::detail::Name &)
Definition: kernel_name.hpp:24
constexpr RAJA_HOST_DEVICE auto get_lambda_args(FP &fpp) -> decltype(*camp::get< Idx >(fpp.lambda_args()))
Definition: forall.hpp:578
lambda_traits< T >::arg_type * lambda_arg_helper(T)
std::is_same< bool_pack< bs..., true >, bool_pack< true, bs... > > all_true
Definition: forall.hpp:340
RAJA_HOST_DEVICE void combine_params(camp::tuple< Params... > &params_tuple)
Definition: forall.hpp:111
void init_params_helper(ParamTuple &params_tuple, const camp::idx_seq< Seq... > &, Args &&... args)
Definition: forall.hpp:67
constexpr RAJA_HOST_DEVICE auto filter_reducers(camp::tuple< Params... > &params)
Definition: forall.hpp:34
constexpr auto strip_last_elem(camp::tuple< Ts... > &&tuple)
Definition: forall.hpp:368
camp::concepts::enable_if< concepts::negate< is_instance_of_Reducer< camp::decay< T > > >, concepts::negate< std::is_same< T, RAJA::detail::Name > > > param_combine(EXEC_POL const &, T &, const T &)
Definition: forall.hpp:97
void resolve_params_helper(ParamTuple &params_tuple, const camp::idx_seq< Seq... > &, Args &&... args)
Definition: forall.hpp:44
RAJA_HOST_DEVICE void combine_params_helper(const camp::idx_seq< Seq... > &, ParamTuple &params_tuple)
Definition: forall.hpp:87
void void_t
Definition: forall.hpp:515
void resolve_params(camp::tuple< Params... > &params_tuple, Args &&... args)
Definition: forall.hpp:54
constexpr auto tuple_from_seq(const camp::idx_seq< Seq... > &, TupleType &&tuple)
Definition: forall.hpp:361
void init_params(camp::tuple< Params... > &params_tuple, Args &&... args)
Definition: forall.hpp:77
constexpr auto list_remove_pointer(const camp::list< Ts... > &)
Definition: forall.hpp:489
constexpr concepts::enable_if< concepts::negate< has_empty_op< LAMBDA > > > check_invocable(LAMBDA &&, const camp::list< EXPECTED_ARGS... > &)
Definition: forall.hpp:537
all_true< std::is_convertible< Ts, Base >::value... > check_types_derive_base
Definition: forall.hpp:344
constexpr auto tuple_to_list(const camp::tuple< Ts... > &)
Definition: forall.hpp:501
camp::concepts::enable_if< std::is_same< EXEC_POL, RAJA::seq_exec > > param_resolve(EXEC_POL const &, RAJA::detail::Name &)
Definition: kernel_name.hpp:40
std::string get_kernel_name(Args &&... args)
Definition: forall.hpp:442
constexpr void check_forall_optional_args(Lambda &&l, ForallParams &fpp)
Definition: forall.hpp:557
constexpr auto make_forall_param_pack_from_tuple(camp::tuple< Ts... > &&tuple)
Definition: forall.hpp:348
constexpr RAJA_HOST_DEVICE auto invoke_body(Params &&params, Fn &&f, Ts &&... extra)
Definition: forall.hpp:598
constexpr auto && get_lambda(Args &&... args)
Definition: forall.hpp:396
std::string get_kernel_name_helper(camp::tuple< Args... > &&tuple_args, std::index_sequence< Idx... > RAJA_UNUSED_ARG(i_seq))
Definition: forall.hpp:428
std::string get_kernel_name_string(camp::tuple< Args... > &&tuple_args)
Definition: forall.hpp:413
constexpr auto make_forall_param_pack(Args &&... args)
Definition: forall.hpp:377
Definition: AlignedRangeIndexSetBuilders.cpp:35
RAJA_HOST_DEVICE constexpr RAJA_INLINE Result min(Args... args)
Definition: foldl.hpp:161
RAJA_HOST_DEVICE constexpr RAJA_INLINE RAJA::zip_tuple_element_t< I, zip_tuple< is_val, Ts... > > & get(zip_tuple< is_val, Ts... > &z) noexcept
Definition: zip_tuple.hpp:56
camp::list< internal::LambdaArg< internal::lambda_arg_param_t, args >... > Params
Definition: Lambda.hpp:95
RAJA_HOST_DEVICE constexpr RAJA_INLINE Result max(Args... args)
Definition: foldl.hpp:155
Definition: ListSegment.hpp:416
Definition: kernel_name.hpp:21
Definition: forall.hpp:140
Base param_tup
Definition: forall.hpp:145
ForallParamPack()
Definition: forall.hpp:242
constexpr RAJA_HOST_DEVICE lambda_arg_tuple_t lambda_args()
Definition: forall.hpp:244
camp::tuple< Params... > Base
Definition: forall.hpp:144
static constexpr size_t param_tup_sz
Definition: forall.hpp:147
ForallParamPack(camp::tuple< Ts... > &&t)
Definition: forall.hpp:253
camp::make_idx_seq_t< camp::tuple_size< lambda_arg_tuple_t >::value > lambda_arg_seq
Definition: forall.hpp:250
camp::make_idx_seq_t< param_tup_sz > params_seq
Definition: forall.hpp:148
Definition: forall.hpp:264
static constexpr void parampack_resolve(EXEC_POL const &pol, ForallParamPack< Params... > &f_params, Args &&... args)
Definition: forall.hpp:304
static constexpr void parampack_init(EXEC_POL const &pol, ForallParamPack< Params... > &f_params, Args &&... args)
Definition: forall.hpp:269
static RAJA_HOST_DEVICE constexpr void parampack_combine(EXEC_POL const &pol, ForallParamPack< Params... > &f_params, Args &&... args)
Definition: forall.hpp:286
Definition: params_base.hpp:282
Definition: forall.hpp:338
std::remove_pointer< decltype(lambda_arg_helper(&camp::decay< F >::operator()))>::type type
Definition: forall.hpp:530
Definition: forall.hpp:519
Definition: forall.hpp:512
Definition: forall.hpp:466