OmniSciDB  1dac507f6e
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
is_null_order_entry< K, I > Struct Template Reference

Public Types

typedef I argument_type
 

Public Member Functions

 is_null_order_entry (const int8_t *base, const size_t stride, const int64_t nul)
 
__host__ __device__ bool operator() (const I index)
 

Public Attributes

const int8_t * oe_base
 
const size_t oe_stride
 
const int64_t null_val
 

Detailed Description

template<class K, class I = int32_t>
struct is_null_order_entry< K, I >

Definition at line 50 of file TopKSort.cu.

Member Typedef Documentation

template<class K , class I = int32_t>
typedef I is_null_order_entry< K, I >::argument_type

Definition at line 51 of file TopKSort.cu.

Constructor & Destructor Documentation

template<class K , class I = int32_t>
is_null_order_entry< K, I >::is_null_order_entry ( const int8_t *  base,
const size_t  stride,
const int64_t  nul 
)
inline

Definition at line 52 of file TopKSort.cu.

53  : oe_base(base), oe_stride(stride), null_val(nul) {}
const int8_t * oe_base
Definition: TopKSort.cu:66
const int64_t null_val
Definition: TopKSort.cu:68
const size_t oe_stride
Definition: TopKSort.cu:67

Member Function Documentation

template<class K , class I = int32_t>
__host__ __device__ bool is_null_order_entry< K, I >::operator() ( const I  index)
inline

Definition at line 54 of file TopKSort.cu.

References is_null_order_entry< K, I >::null_val, is_null_order_entry< K, I >::oe_base, and is_null_order_entry< K, I >::oe_stride.

54  {
55  const auto oe_val = *reinterpret_cast<const K*>(oe_base + index * oe_stride);
56  switch (sizeof(K)) {
57  case 4:
58  return *reinterpret_cast<const int32_t*>(&oe_val) ==
59  static_cast<int32_t>(null_val);
60  case 8:
61  return *reinterpret_cast<const int64_t*>(&oe_val) == null_val;
62  default:
63  return false;
64  }
65  }
const int8_t * oe_base
Definition: TopKSort.cu:66
const int64_t null_val
Definition: TopKSort.cu:68
const size_t oe_stride
Definition: TopKSort.cu:67

Member Data Documentation

template<class K , class I = int32_t>
const int64_t is_null_order_entry< K, I >::null_val

Definition at line 68 of file TopKSort.cu.

Referenced by is_null_order_entry< K, I >::operator()().

template<class K , class I = int32_t>
const int8_t* is_null_order_entry< K, I >::oe_base

Definition at line 66 of file TopKSort.cu.

Referenced by is_null_order_entry< K, I >::operator()().

template<class K , class I = int32_t>
const size_t is_null_order_entry< K, I >::oe_stride

Definition at line 67 of file TopKSort.cu.

Referenced by is_null_order_entry< K, I >::operator()().


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