48 #ifndef KOKKOS_PAIR_HPP 49 #define KOKKOS_PAIR_HPP 51 #include <Kokkos_Macros.hpp> 63 template <
class T1,
class T2>
81 KOKKOS_FORCEINLINE_FUNCTION
90 KOKKOS_FORCEINLINE_FUNCTION
91 pair(first_type
const& f, second_type
const& s)
99 template <
class U,
class V>
100 KOKKOS_FORCEINLINE_FUNCTION
102 : first(p.first), second(p.second)
109 template <
class U,
class V>
110 KOKKOS_FORCEINLINE_FUNCTION
119 template <
class U,
class V>
120 pair(
const std::pair<U,V> &p)
137 template <
class T1,
class T2>
138 struct pair<T1&, T2&>
154 KOKKOS_FORCEINLINE_FUNCTION
155 pair(first_type f, second_type s)
163 template <
class U,
class V>
164 KOKKOS_FORCEINLINE_FUNCTION
170 template <
class U,
class V>
171 pair(
const std::pair<U,V> &p)
179 template <
class U,
class V>
180 KOKKOS_FORCEINLINE_FUNCTION
201 template <
class T1,
class T2>
218 KOKKOS_FORCEINLINE_FUNCTION
219 pair(first_type
const& f, second_type s)
227 template <
class U,
class V>
228 KOKKOS_FORCEINLINE_FUNCTION
234 template <
class U,
class V>
235 pair(
const std::pair<U,V> &p)
243 template <
class U,
class V>
244 KOKKOS_FORCEINLINE_FUNCTION
265 template <
class T1,
class T2>
282 KOKKOS_FORCEINLINE_FUNCTION
283 pair(first_type f, second_type
const& s)
291 template <
class U,
class V>
292 KOKKOS_FORCEINLINE_FUNCTION
298 template <
class U,
class V>
299 pair(
const std::pair<U,V> &p)
307 template <
class U,
class V>
308 KOKKOS_FORCEINLINE_FUNCTION
330 template <
class T1,
class T2>
331 KOKKOS_FORCEINLINE_FUNCTION
336 template <
class T1,
class T2>
337 KOKKOS_FORCEINLINE_FUNCTION
339 {
return !(lhs==rhs); }
342 template <
class T1,
class T2>
343 KOKKOS_FORCEINLINE_FUNCTION
345 {
return lhs.
first<rhs.first || (!(rhs.first<lhs.first) && lhs.second<rhs.second); }
348 template <
class T1,
class T2>
349 KOKKOS_FORCEINLINE_FUNCTION
351 {
return !(rhs<lhs); }
354 template <
class T1,
class T2>
355 KOKKOS_FORCEINLINE_FUNCTION
360 template <
class T1,
class T2>
361 KOKKOS_FORCEINLINE_FUNCTION
363 {
return !(lhs<rhs); }
369 template <
class T1,
class T2>
370 KOKKOS_FORCEINLINE_FUNCTION
413 template <
class T1,
class T2>
414 KOKKOS_FORCEINLINE_FUNCTION
431 KOKKOS_FORCEINLINE_FUNCTION
436 KOKKOS_FORCEINLINE_FUNCTION
437 pair(
const first_type & f)
441 KOKKOS_FORCEINLINE_FUNCTION
442 pair(
const first_type & f,
int)
447 KOKKOS_FORCEINLINE_FUNCTION
453 KOKKOS_FORCEINLINE_FUNCTION
466 KOKKOS_FORCEINLINE_FUNCTION
471 KOKKOS_FORCEINLINE_FUNCTION
473 {
return !(lhs==rhs); }
476 KOKKOS_FORCEINLINE_FUNCTION
477 bool operator< (const pair<T1,void>& lhs,
const pair<T1,void>& rhs)
481 KOKKOS_FORCEINLINE_FUNCTION
482 bool operator<= (const pair<T1,void>& lhs,
const pair<T1,void>& rhs)
483 {
return !(rhs<lhs); }
486 KOKKOS_FORCEINLINE_FUNCTION
491 KOKKOS_FORCEINLINE_FUNCTION
493 {
return !(lhs<rhs); }
498 #endif //KOKKOS_PAIR_HPP KOKKOS_FORCEINLINE_FUNCTION pair()
Default constructor.
KOKKOS_INLINE_FUNCTION bool operator!=(const complex< RealType > &x, const complex< RealType > &y)
Inequality operator for two complex numbers.
T2 second_type
The second template parameter of this class.
Replacement for std::pair that works on CUDA devices.
KOKKOS_FORCEINLINE_FUNCTION pair(first_type const &f, second_type const &s)
Constructor that takes both elements of the pair.
std::pair< T1, T2 > to_std_pair() const
Return the std::pair version of this object.
first_type first
The first element of the pair.
KOKKOS_FORCEINLINE_FUNCTION bool operator>(const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
Greater-than operator for Kokkos::pair.
T1 first_type
The first template parameter of this class.
KOKKOS_INLINE_FUNCTION bool operator==(const complex< RealType > &x, const complex< RealType > &y)
Equality operator for two complex numbers.
KOKKOS_FORCEINLINE_FUNCTION bool operator>=(const pair< T1, T2 > &lhs, const pair< T1, T2 > &rhs)
Greater-than-or-equal-to operator for Kokkos::pair.
KOKKOS_FORCEINLINE_FUNCTION pair< T1 &, T2 & > tie(T1 &x, T2 &y)
Return a pair of references to the input arguments.
KOKKOS_FORCEINLINE_FUNCTION pair(const pair< U, V > &p)
Copy constructor.
second_type second
The second element of the pair.
KOKKOS_FORCEINLINE_FUNCTION pair< T1, T2 > make_pair(T1 x, T2 y)
Return a new pair.
KOKKOS_FORCEINLINE_FUNCTION pair< T1, T2 > & operator=(const pair< U, V > &p)
Assignment operator.