OmniSciDB  c1a53651b2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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 55 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 56 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 57 of file TopKSort.cu.

58  : oe_base(base), oe_stride(stride), null_val(nul) {}
const int8_t * oe_base
Definition: TopKSort.cu:71
const int64_t null_val
Definition: TopKSort.cu:73
const size_t oe_stride
Definition: TopKSort.cu:72

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

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

Member Data Documentation

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

Definition at line 73 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 71 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 72 of file TopKSort.cu.

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


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