OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
double_sort::Value< T0, T1 > Struct Template Reference

#include <DoubleSort.h>

+ Collaboration diagram for double_sort::Value< T0, T1 >:

Public Member Functions

DEVICE Value (T0 *ptr0, T1 *ptr1)
 
 Value (Value &&b)
 
Valueoperator= (Value &&b)
 
DEVICE T0 value0 () const
 
DEVICE T1 value1 () const
 

Public Attributes

Variant< T0 > v0_
 
Variant< T1 > v1_
 
bool const ref_
 

Detailed Description

template<typename T0, typename T1>
struct double_sort::Value< T0, T1 >

Definition at line 48 of file DoubleSort.h.

Constructor & Destructor Documentation

template<typename T0 , typename T1 >
DEVICE double_sort::Value< T0, T1 >::Value ( T0 *  ptr0,
T1 *  ptr1 
)
inline

Definition at line 52 of file DoubleSort.h.

52 : v0_{ptr0}, v1_{ptr1}, ref_(true) {}
bool const ref_
Definition: DoubleSort.h:51
Variant< T0 > v0_
Definition: DoubleSort.h:49
Variant< T1 > v1_
Definition: DoubleSort.h:50
template<typename T0 , typename T1 >
double_sort::Value< T0, T1 >::Value ( Value< T0, T1 > &&  b)
inline

Definition at line 72 of file DoubleSort.h.

References double_sort::Value< T0, T1 >::v0_, double_sort::Value< T0, T1 >::v1_, and double_sort::Variant< T >::value_.

72  : ref_(false) {
73  v0_.value_ = b.ref_ ? std::move(*b.v0_.ptr_) : std::move(b.v0_.value_);
74  v1_.value_ = b.ref_ ? std::move(*b.v1_.ptr_) : std::move(b.v1_.value_);
75  }
bool const ref_
Definition: DoubleSort.h:51
Variant< T0 > v0_
Definition: DoubleSort.h:49
Variant< T1 > v1_
Definition: DoubleSort.h:50

Member Function Documentation

template<typename T0 , typename T1 >
Value& double_sort::Value< T0, T1 >::operator= ( Value< T0, T1 > &&  b)
inline

Definition at line 76 of file DoubleSort.h.

References double_sort::Variant< T >::ptr_, double_sort::Value< T0, T1 >::ref_, double_sort::Value< T0, T1 >::v0_, double_sort::Value< T0, T1 >::v1_, and double_sort::Variant< T >::value_.

76  {
77  if (ref_) {
78  *v0_.ptr_ = b.ref_ ? std::move(*b.v0_.ptr_) : std::move(b.v0_.value_);
79  *v1_.ptr_ = b.ref_ ? std::move(*b.v1_.ptr_) : std::move(b.v1_.value_);
80  } else {
81  v0_.value_ = b.ref_ ? std::move(*b.v0_.ptr_) : std::move(b.v0_.value_);
82  v1_.value_ = b.ref_ ? std::move(*b.v1_.ptr_) : std::move(b.v1_.value_);
83  }
84  return *this;
85  }
bool const ref_
Definition: DoubleSort.h:51
Variant< T0 > v0_
Definition: DoubleSort.h:49
Variant< T1 > v1_
Definition: DoubleSort.h:50
template<typename T0 , typename T1 >
DEVICE T0 double_sort::Value< T0, T1 >::value0 ( ) const
inline

Definition at line 87 of file DoubleSort.h.

References double_sort::Variant< T >::ptr_, double_sort::Value< T0, T1 >::ref_, double_sort::Value< T0, T1 >::v0_, and double_sort::Variant< T >::value_.

Referenced by quantile::detail::anonymous_namespace{quantile.h}::OrderByMeanAscCountDesc< RealType, IndexType >::operator()().

87  {
88  return ref_ ? *v0_.ptr_ : v0_.value_;
89  }
bool const ref_
Definition: DoubleSort.h:51
Variant< T0 > v0_
Definition: DoubleSort.h:49

+ Here is the caller graph for this function:

template<typename T0 , typename T1 >
DEVICE T1 double_sort::Value< T0, T1 >::value1 ( ) const
inline

Definition at line 90 of file DoubleSort.h.

References double_sort::Variant< T >::ptr_, double_sort::Value< T0, T1 >::ref_, double_sort::Value< T0, T1 >::v1_, and double_sort::Variant< T >::value_.

Referenced by quantile::detail::anonymous_namespace{quantile.h}::OrderByMeanAscCountDesc< RealType, IndexType >::operator()().

90  {
91  return ref_ ? *v1_.ptr_ : v1_.value_;
92  }
bool const ref_
Definition: DoubleSort.h:51
Variant< T1 > v1_
Definition: DoubleSort.h:50

+ Here is the caller graph for this function:

Member Data Documentation

template<typename T0 , typename T1 >
bool const double_sort::Value< T0, T1 >::ref_
template<typename T0 , typename T1 >
Variant<T0> double_sort::Value< T0, T1 >::v0_
template<typename T0 , typename T1 >
Variant<T1> double_sort::Value< T0, T1 >::v1_

The documentation for this struct was generated from the following file: