RAJA
RAJA provides a collection of platform portability abstractions for C++ HPC applications.
zip_tuple.hpp
Go to the documentation of this file.
1 
11 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
12 // Copyright (c) Lawrence Livermore National Security, LLC and other
13 // RAJA Project Developers. See top-level LICENSE and COPYRIGHT
14 // files for dates and other details. No copyright assignment is required
15 // to contribute to RAJA.
16 //
17 // SPDX-License-Identifier: (BSD-3-Clause)
18 //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
19 
20 
21 #ifndef RAJA_util_zip_ref_HPP
22 #define RAJA_util_zip_ref_HPP
23 
24 #include "RAJA/config.hpp"
25 
26 #include <iostream>
27 #include <type_traits>
28 
31 #include "RAJA/util/concepts.hpp"
32 
33 namespace RAJA
34 {
35 
36 template<bool is_val, typename... Ts>
37 struct zip_tuple;
38 
39 template<camp::idx_t I, typename ZT>
41 
42 template<camp::idx_t I, bool is_val, typename... Ts>
43 struct zip_tuple_element<I, zip_tuple<is_val, Ts...>>
44  : camp::tuple_element<I, typename zip_tuple<is_val, Ts...>::value_type>
45 {};
46 
47 template<camp::idx_t I, typename ZT>
49 
50 // get function declarations for zip_tuple
51 // the reference type returned by get depends on the reference type
52 // of the zip_tuple that get is called on
53 template<camp::idx_t I, bool is_val, typename... Ts>
54 RAJA_HOST_DEVICE RAJA_INLINE constexpr RAJA::
55  zip_tuple_element_t<I, zip_tuple<is_val, Ts...>>&
57 {
58  return z.template get<I>();
59 }
60 
61 template<camp::idx_t I, bool is_val, typename... Ts>
62 RAJA_HOST_DEVICE RAJA_INLINE constexpr RAJA::
63  zip_tuple_element_t<I, zip_tuple<is_val, Ts...>> const&
64  get(zip_tuple<is_val, Ts...> const& z) noexcept
65 {
66  return z.template get<I>();
67 }
68 
69 template<camp::idx_t I, bool is_val, typename... Ts>
70 RAJA_HOST_DEVICE RAJA_INLINE constexpr std::remove_reference_t<
71  RAJA::zip_tuple_element_t<I, zip_tuple<is_val, Ts...>>>&&
73 {
74  return std::move(z).template get<I>();
75 }
76 
77 template<camp::idx_t I, bool is_val, typename... Ts>
78 RAJA_HOST_DEVICE RAJA_INLINE constexpr std::remove_reference_t<
79  RAJA::zip_tuple_element_t<I, zip_tuple<is_val, Ts...>>> const&&
80 get(zip_tuple<is_val, Ts...> const&& z) noexcept
81 {
82  return std::move(z).template get<I>();
83 }
84 
85 namespace detail
86 {
87 
89 {
90  template<typename T>
91  RAJA_HOST_DEVICE RAJA_INLINE constexpr auto operator()(T&& t) const
92  -> decltype(std::forward<T>(t))
93  {
94  return std::forward<T>(t);
95  }
96 };
97 
98 struct Move
99 {
100  template<typename T>
101  RAJA_HOST_DEVICE RAJA_INLINE constexpr auto operator()(T&& t) const
102  -> decltype(std::move(t))
103  {
104  return std::move(t);
105  }
106 };
107 
108 struct PreInc
109 {
110  template<typename Iter>
111  RAJA_HOST_DEVICE RAJA_INLINE constexpr auto operator()(Iter&& iter) const
112  -> decltype(++std::forward<Iter>(iter))
113  {
114  return ++std::forward<Iter>(iter);
115  }
116 };
117 
118 struct PreDec
119 {
120  template<typename Iter>
121  RAJA_HOST_DEVICE RAJA_INLINE constexpr auto operator()(Iter&& iter) const
122  -> decltype(--std::forward<Iter>(iter))
123  {
124  return --std::forward<Iter>(iter);
125  }
126 };
127 
128 template<typename difference_type>
129 struct PlusEq
130 {
131  const difference_type& rhs;
132 
133  template<typename Iter>
134  RAJA_HOST_DEVICE RAJA_INLINE constexpr auto operator()(Iter&& iter) const
135  -> decltype(std::forward<Iter>(iter) += rhs)
136  {
137  return std::forward<Iter>(iter) += rhs;
138  }
139 };
140 
141 template<typename difference_type>
142 struct MinusEq
143 {
144  const difference_type& rhs;
145 
146  template<typename Iter>
147  RAJA_HOST_DEVICE RAJA_INLINE constexpr auto operator()(Iter&& iter) const
148  -> decltype(std::forward<Iter>(iter) -= rhs)
149  {
150  return std::forward<Iter>(iter) -= rhs;
151  }
152 };
153 
154 struct DeRef
155 {
156  template<typename Iter>
157  RAJA_HOST_DEVICE RAJA_INLINE constexpr auto operator()(Iter&& iter) const
158  -> decltype(*std::forward<Iter>(iter))
159  {
160  return *std::forward<Iter>(iter);
161  }
162 };
163 
164 struct Swap
165 {
166  template<typename T0, typename T1>
167  RAJA_HOST_DEVICE RAJA_INLINE constexpr int operator()(T0&& t0, T1&& t1) const
168  {
169  using camp::safe_swap;
170  safe_swap(std::forward<T0>(t0), std::forward<T1>(t1));
171  return 1;
172  }
173 };
174 
175 struct IterSwap
176 {
177  template<typename T0, typename T1>
178  RAJA_HOST_DEVICE RAJA_INLINE constexpr int operator()(T0&& t0, T1&& t1) const
179  {
180  using RAJA::safe_iter_swap;
181  safe_iter_swap(std::forward<T0>(t0), std::forward<T1>(t1));
182  return 1;
183  }
184 };
185 
189 template<typename Tuple, typename F, camp::idx_t... Is>
190 RAJA_HOST_DEVICE RAJA_INLINE constexpr void zip_for_each_impl(
191  Tuple&& t,
192  F&& f,
193  camp::idx_seq<Is...>)
194 {
195  camp::sink(std::forward<F>(f)(RAJA::get<Is>(std::forward<Tuple>(t)))...);
196 }
197 
201 template<typename Tuple0, typename Tuple1, typename F, camp::idx_t... Is>
202 RAJA_HOST_DEVICE RAJA_INLINE constexpr void zip_for_each_impl(
203  Tuple0&& t0,
204  Tuple1&& t1,
205  F&& f,
206  camp::idx_seq<Is...>)
207 {
208  camp::sink(std::forward<F>(f)(RAJA::get<Is>(std::forward<Tuple0>(t0)),
209  RAJA::get<Is>(std::forward<Tuple1>(t1)))...);
210 }
211 
215 template<typename Tuple, typename F>
216 RAJA_HOST_DEVICE RAJA_INLINE constexpr void zip_for_each(Tuple&& t, F&& f)
217 {
218  zip_for_each_impl(std::forward<Tuple>(t), std::forward<F>(f),
219  typename camp::decay<Tuple>::IdxSeq {});
220 }
221 
225 template<typename Tuple0, typename Tuple1, typename F>
226 RAJA_HOST_DEVICE RAJA_INLINE constexpr void zip_for_each(Tuple0&& t0,
227  Tuple1&& t1,
228  F&& f)
229 {
230  static_assert(std::is_same<typename camp::decay<Tuple0>::IdxSeq,
231  typename camp::decay<Tuple1>::IdxSeq>::value,
232  "Tuple0 and Tuple1 must have the same size");
233  zip_for_each_impl(std::forward<Tuple0>(t0), std::forward<Tuple1>(t1),
234  std::forward<F>(f),
235  typename camp::decay<Tuple0>::IdxSeq {});
236 }
237 
238 } // end namespace detail
239 
245 template<bool is_val, typename... Ts>
246 struct zip_tuple
247 {
248  using value_type = RAJA::tuple<Ts...>;
249 
250  template<typename T>
251  using opp_type =
252  typename std::conditional<is_val,
253  typename std::add_lvalue_reference<T>::type,
254  typename std::remove_reference<T>::type>::type;
255 
256  // zip_tuple type with opposite is_val
258 
259  // camp::idx_seq for this type, also used by zip_for_each
260  using IdxSeq = camp::make_idx_seq_t<sizeof...(Ts)>;
261 
262  // constructor from types convertible to Ts
263  template<
264  typename... Os,
265  typename = concepts::enable_if<type_traits::convertible_to<Os&&, Ts>...>>
266  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple(Os&&... os)
267  : m_tuple(std::forward<Os>(os)...)
268  {}
269 
270  // assignment from types convertible to Ts
271  template<typename... Os,
272  typename = concepts::enable_if<type_traits::convertible_to<
273  Os&&,
274  typename std::remove_reference<Ts>::type>...>>
275  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple& assign(Os&&... os)
276  {
277  return assign_helper(IdxSeq {}, std::forward<Os>(os)...);
278  }
279 
280  // copy and move constructors
281  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple(zip_tuple& o)
282  : zip_tuple(o, IdxSeq {})
283  {}
284 
285  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple(zip_tuple const& o)
286  : zip_tuple(o, IdxSeq {})
287  {}
288 
289  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple(zip_tuple&& o)
290  : zip_tuple(std::move(o), IdxSeq {})
291  {} // move if is_val, pass-through otherwise
292 
293  // copy and move assignment operators
294  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple& operator=(zip_tuple& o)
295  {
296  return assign_helper(o, IdxSeq {});
297  }
298 
299  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple& operator=(
300  zip_tuple const& o)
301  {
302  return assign_helper(o, IdxSeq {});
303  }
304 
305  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple& operator=(zip_tuple&& o)
306  {
307  return assign_helper(std::move(o), IdxSeq {});
308  }
309 
310  // copy and move constructors from opp_tuple type zip_tuples
311  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple(opp_tuple& o)
312  : zip_tuple(o, IdxSeq {})
313  {}
314 
315  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple(opp_tuple const& o)
316  : zip_tuple(o, IdxSeq {})
317  {}
318 
319  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple(opp_tuple&& o)
320  : zip_tuple(std::move(o), IdxSeq {})
321  {} // move if is_val, pass-through otherwise
322 
323  // copy and move assignment operators from opp_tuple type zip_tuples
324  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple& operator=(opp_tuple& o)
325  {
326  return assign_helper(o, IdxSeq {});
327  }
328 
329  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple& operator=(
330  opp_tuple const& o)
331  {
332  return assign_helper(o, IdxSeq {});
333  }
334 
335  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple& operator=(opp_tuple&& o)
336  {
337  return assign_helper(std::move(o), IdxSeq {});
338  }
339 
340  // get member functions for zip_tuples
341  // the reference type returned by get depends on the reference type
342  // of the zip_tuple that get is called on
343  template<camp::idx_t I>
344  RAJA_HOST_DEVICE RAJA_INLINE constexpr RAJA::tuple_element_t<I, value_type>&
345  get() & noexcept
346  {
347  return RAJA::get<I>(m_tuple);
348  }
349 
350  template<camp::idx_t I>
351  RAJA_HOST_DEVICE RAJA_INLINE constexpr RAJA::
352  tuple_element_t<I, value_type> const&
353  get() const& noexcept
354  {
355  return RAJA::get<I>(m_tuple);
356  }
357 
358  template<camp::idx_t I>
359  RAJA_HOST_DEVICE RAJA_INLINE constexpr std::remove_reference_t<
360  RAJA::tuple_element_t<I, value_type>>&&
361  get() && noexcept
362  {
363  return std::move(RAJA::get<I>(m_tuple));
364  }
365 
366  template<camp::idx_t I>
367  RAJA_HOST_DEVICE RAJA_INLINE constexpr std::remove_reference_t<
368  RAJA::tuple_element_t<I, value_type>> const&&
369  get() const&& noexcept
370  {
371  return std::move(RAJA::get<I>(m_tuple));
372  }
373 
374  // safe_swap that calls swap on each pair in the tuple
375  RAJA_HOST_DEVICE RAJA_INLINE constexpr friend void safe_swap(zip_tuple& lhs,
376  zip_tuple& rhs)
377  {
378  detail::zip_for_each(lhs, rhs, detail::Swap {});
379  }
380 
381  // safe_swap for swapping zip_tuples with opposite is_val
382  // calls swap on each pair in the tuple
383  RAJA_HOST_DEVICE RAJA_INLINE constexpr friend void safe_swap(zip_tuple& lhs,
384  opp_tuple& rhs)
385  {
386  detail::zip_for_each(lhs, rhs, detail::Swap {});
387  }
388 
389  // allow printing of zip_tuples by printing value_type
390  friend inline std::ostream& operator<<(std::ostream& o, zip_tuple const& v)
391  {
392  return o << v.m_tuple;
393  }
394 
395 private:
396  // move if is_val is true, otherwise copy in move constructor
397  // this allows values to be moved, and references to stay lvalue references
398  using IsValMover = typename std::
399  conditional<is_val, detail::Move, detail::PassThrough>::type;
400 
401  value_type m_tuple;
402 
403  // assignment helper from types convertible to Ts
404  template<typename... Os, camp::idx_t... Is>
405  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple& assign_helper(
406  camp::idx_seq<Is...>,
407  Os&&... os)
408  {
409  camp::sink(get<Is>() = std::forward<Os>(os)...);
410  return *this;
411  }
412 
413  // copy and move constructor helpers
414  template<camp::idx_t... Is>
415  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple(zip_tuple& o,
416  camp::idx_seq<Is...>)
417  : zip_tuple(RAJA::get<Is>(o)...)
418  {}
419 
420  template<camp::idx_t... Is>
421  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple(zip_tuple const& o,
422  camp::idx_seq<Is...>)
423  : zip_tuple(RAJA::get<Is>(o)...)
424  {}
425 
426  template<camp::idx_t... Is>
427  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple(zip_tuple&& o,
428  camp::idx_seq<Is...>)
429  : zip_tuple(RAJA::get<Is>(IsValMover {}(o))...)
430  {} // move if is_val, pass-through otherwise
431 
432  // copy and move assignment operator helpers
433  template<camp::idx_t... Is>
434  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple& assign_helper(
435  zip_tuple& o,
436  camp::idx_seq<Is...>)
437  {
438  if (this != &o)
439  {
440  camp::sink(get<Is>() = RAJA::get<Is>(o)...);
441  }
442  return *this;
443  }
444 
445  template<camp::idx_t... Is>
446  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple& assign_helper(
447  zip_tuple const& o,
448  camp::idx_seq<Is...>)
449  {
450  if (this != &o)
451  {
452  camp::sink(get<Is>() = RAJA::get<Is>(o)...);
453  }
454  return *this;
455  }
456 
457  template<camp::idx_t... Is>
458  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple& assign_helper(
459  zip_tuple&& o,
460  camp::idx_seq<Is...>)
461  {
462  if (this != &o)
463  {
464  camp::sink(get<Is>() = RAJA::get<Is>(std::move(o))...);
465  }
466  return *this;
467  }
468 
469  // copy and move constructor helpers from opp_tuple type zip_tuples
470  template<camp::idx_t... Is>
471  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple(opp_tuple& o,
472  camp::idx_seq<Is...>)
473  : zip_tuple(RAJA::get<Is>(o)...)
474  {}
475 
476  template<camp::idx_t... Is>
477  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple(opp_tuple const& o,
478  camp::idx_seq<Is...>)
479  : zip_tuple(RAJA::get<Is>(o)...)
480  {}
481 
482  template<camp::idx_t... Is>
483  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple(opp_tuple&& o,
484  camp::idx_seq<Is...>)
485  : zip_tuple(RAJA::get<Is>(IsValMover {}(o))...)
486  {} // move if is_val, pass-through otherwise
487 
488  // copy and move assignment operator helpers from opp_tuple type zip_tuples
489  template<camp::idx_t... Is>
490  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple& assign_helper(
491  opp_tuple& o,
492  camp::idx_seq<Is...>)
493  {
494  camp::sink(get<Is>() = RAJA::get<Is>(o)...);
495  return *this;
496  }
497 
498  template<camp::idx_t... Is>
499  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple& assign_helper(
500  opp_tuple const& o,
501  camp::idx_seq<Is...>)
502  {
503  camp::sink(get<Is>() = RAJA::get<Is>(o)...);
504  return *this;
505  }
506 
507  template<camp::idx_t... Is>
508  RAJA_HOST_DEVICE RAJA_INLINE constexpr zip_tuple& assign_helper(
509  opp_tuple&& o,
510  camp::idx_seq<Is...>)
511  {
512  camp::sink(get<Is>() = RAJA::get<Is>(std::move(o))...);
513  return *this;
514  }
515 };
516 
517 // alias zip_ref to zip_tuple capable of storing references (!is_val)
518 template<typename... Ts>
519 using zip_ref = zip_tuple<false, Ts...>;
520 
521 // alias zip_val to zip_tuple suitable for storing values (is_val)
522 template<typename... Ts>
523 using zip_val = zip_tuple<true, Ts...>;
524 
525 } // end namespace RAJA
526 
527 #endif
Header file for RAJA algorithm definitions.
Header file with aliases to camp types.
Header file for RAJA concept definitions.
#define RAJA_HOST_DEVICE
Definition: macros.hpp:65
RAJA_HOST_DEVICE constexpr RAJA_INLINE void zip_for_each_impl(Tuple &&t, F &&f, camp::idx_seq< Is... >)
Call f on each member of t (f(t)...).
Definition: zip_tuple.hpp:190
RAJA_HOST_DEVICE constexpr RAJA_INLINE void zip_for_each(Tuple &&t, F &&f)
Call f on each member of t (f(t)...).
Definition: zip_tuple.hpp:216
value_type::device_call &[i_loop] iter
Definition: WorkRunner.hpp:216
Definition: AlignedRangeIndexSetBuilders.cpp:35
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
RAJA_HOST_DEVICE RAJA_INLINE void safe_iter_swap(Iter lhs, Iter rhs)
swap values at iterators lhs and rhs
Definition: algorithm.hpp:75
typename zip_tuple_element< I, ZT >::type zip_tuple_element_t
Definition: zip_tuple.hpp:48
Definition: ListSegment.hpp:416
Definition: zip_tuple.hpp:155
RAJA_HOST_DEVICE constexpr RAJA_INLINE auto operator()(Iter &&iter) const -> decltype(*std::forward< Iter >(iter))
Definition: zip_tuple.hpp:157
Definition: zip_tuple.hpp:176
RAJA_HOST_DEVICE constexpr RAJA_INLINE int operator()(T0 &&t0, T1 &&t1) const
Definition: zip_tuple.hpp:178
Definition: zip_tuple.hpp:143
const difference_type & rhs
Definition: zip_tuple.hpp:144
RAJA_HOST_DEVICE constexpr RAJA_INLINE auto operator()(Iter &&iter) const -> decltype(std::forward< Iter >(iter) -=rhs)
Definition: zip_tuple.hpp:147
Definition: zip_tuple.hpp:99
RAJA_HOST_DEVICE constexpr RAJA_INLINE auto operator()(T &&t) const -> decltype(std::move(t))
Definition: zip_tuple.hpp:101
Definition: zip_tuple.hpp:89
RAJA_HOST_DEVICE constexpr RAJA_INLINE auto operator()(T &&t) const -> decltype(std::forward< T >(t))
Definition: zip_tuple.hpp:91
Definition: zip_tuple.hpp:130
const difference_type & rhs
Definition: zip_tuple.hpp:131
RAJA_HOST_DEVICE constexpr RAJA_INLINE auto operator()(Iter &&iter) const -> decltype(std::forward< Iter >(iter)+=rhs)
Definition: zip_tuple.hpp:134
Definition: zip_tuple.hpp:119
RAJA_HOST_DEVICE constexpr RAJA_INLINE auto operator()(Iter &&iter) const -> decltype(--std::forward< Iter >(iter))
Definition: zip_tuple.hpp:121
Definition: zip_tuple.hpp:109
RAJA_HOST_DEVICE constexpr RAJA_INLINE auto operator()(Iter &&iter) const -> decltype(++std::forward< Iter >(iter))
Definition: zip_tuple.hpp:111
Definition: zip_tuple.hpp:165
RAJA_HOST_DEVICE constexpr RAJA_INLINE int operator()(T0 &&t0, T1 &&t1) const
Definition: zip_tuple.hpp:167
Definition: zip_tuple.hpp:40
Tuple used by ZipIterator for storing multiple references and values. Acts like a reference to its me...
Definition: zip_tuple.hpp:247
RAJA_HOST_DEVICE constexpr RAJA_INLINE std::remove_reference_t< RAJA::tuple_element_t< I, value_type > > const && get() const &&noexcept
Definition: zip_tuple.hpp:369
RAJA_HOST_DEVICE constexpr RAJA_INLINE RAJA::tuple_element_t< I, value_type > & get() &noexcept
Definition: zip_tuple.hpp:345
RAJA_HOST_DEVICE constexpr RAJA_INLINE zip_tuple & operator=(zip_tuple &o)
Definition: zip_tuple.hpp:294
RAJA_HOST_DEVICE constexpr RAJA_INLINE zip_tuple & operator=(opp_tuple &o)
Definition: zip_tuple.hpp:324
RAJA_HOST_DEVICE constexpr RAJA_INLINE std::remove_reference_t< RAJA::tuple_element_t< I, value_type > > && get() &&noexcept
Definition: zip_tuple.hpp:361
RAJA_HOST_DEVICE constexpr RAJA_INLINE zip_tuple & operator=(zip_tuple &&o)
Definition: zip_tuple.hpp:305
RAJA_HOST_DEVICE constexpr RAJA_INLINE zip_tuple(zip_tuple &&o)
Definition: zip_tuple.hpp:289
RAJA_HOST_DEVICE constexpr RAJA_INLINE friend void safe_swap(zip_tuple &lhs, opp_tuple &rhs)
Definition: zip_tuple.hpp:383
RAJA_HOST_DEVICE constexpr RAJA_INLINE zip_tuple & assign(Os &&... os)
Definition: zip_tuple.hpp:275
RAJA_HOST_DEVICE constexpr RAJA_INLINE zip_tuple & operator=(zip_tuple const &o)
Definition: zip_tuple.hpp:299
RAJA_HOST_DEVICE constexpr RAJA_INLINE RAJA::tuple_element_t< I, value_type > const & get() const &noexcept
Definition: zip_tuple.hpp:353
RAJA_HOST_DEVICE constexpr RAJA_INLINE zip_tuple(opp_tuple &o)
Definition: zip_tuple.hpp:311
zip_tuple<!is_val, opp_type< Ts >... > opp_tuple
Definition: zip_tuple.hpp:257
RAJA_HOST_DEVICE constexpr RAJA_INLINE zip_tuple(zip_tuple const &o)
Definition: zip_tuple.hpp:285
RAJA_HOST_DEVICE constexpr RAJA_INLINE zip_tuple(Os &&... os)
Definition: zip_tuple.hpp:266
camp::make_idx_seq_t< sizeof...(Ts)> IdxSeq
Definition: zip_tuple.hpp:260
RAJA_HOST_DEVICE constexpr RAJA_INLINE zip_tuple & operator=(opp_tuple &&o)
Definition: zip_tuple.hpp:335
typename std::conditional< is_val, typename std::add_lvalue_reference< T >::type, typename std::remove_reference< T >::type >::type opp_type
Definition: zip_tuple.hpp:254
RAJA_HOST_DEVICE constexpr RAJA_INLINE zip_tuple & operator=(opp_tuple const &o)
Definition: zip_tuple.hpp:329
friend std::ostream & operator<<(std::ostream &o, zip_tuple const &v)
Definition: zip_tuple.hpp:390
RAJA_HOST_DEVICE constexpr RAJA_INLINE zip_tuple(zip_tuple &o)
Definition: zip_tuple.hpp:281
RAJA_HOST_DEVICE constexpr RAJA_INLINE friend void safe_swap(zip_tuple &lhs, zip_tuple &rhs)
Definition: zip_tuple.hpp:375
RAJA_HOST_DEVICE constexpr RAJA_INLINE zip_tuple(opp_tuple &&o)
Definition: zip_tuple.hpp:319
RAJA_HOST_DEVICE constexpr RAJA_INLINE zip_tuple(opp_tuple const &o)
Definition: zip_tuple.hpp:315
RAJA::tuple< Ts... > value_type
Definition: zip_tuple.hpp:248