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

Public Types

using argument_type = I
 

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 49 of file TopKSort.cu.

Member Typedef Documentation

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

Definition at line 50 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 51 of file TopKSort.cu.

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

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 53 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.

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

Member Data Documentation

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

Definition at line 67 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 65 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 66 of file TopKSort.cu.

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


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