OmniSciDB  c07336695a
KeyAccessor< KeyT, IndexT > Struct Template Reference

Public Member Functions

DEVICE KeyAccessor (const int8_t *key_buff, const size_t key_stride, const size_t key_idx)
 
ALWAYS_INLINE DEVICE KeyT get (const IndexT rowid) const
 

Public Attributes

const int8_t * buffer
 
const size_t stride
 
const size_t index
 

Detailed Description

template<typename KeyT = int64_t, typename IndexT = int32_t>
struct KeyAccessor< KeyT, IndexT >

Definition at line 31 of file TopKRuntime.cpp.

Constructor & Destructor Documentation

◆ KeyAccessor()

template<typename KeyT = int64_t, typename IndexT = int32_t>
DEVICE KeyAccessor< KeyT, IndexT >::KeyAccessor ( const int8_t *  key_buff,
const size_t  key_stride,
const size_t  key_idx 
)
inline

Definition at line 32 of file TopKRuntime.cpp.

35  : buffer(key_buff), stride(key_stride), index(key_idx) {}
const size_t index
Definition: TopKRuntime.cpp:43
const size_t stride
Definition: TopKRuntime.cpp:42
const int8_t * buffer
Definition: TopKRuntime.cpp:41

Member Function Documentation

◆ get()

template<typename KeyT = int64_t, typename IndexT = int32_t>
ALWAYS_INLINE DEVICE KeyT KeyAccessor< KeyT, IndexT >::get ( const IndexT  rowid) const
inline

Definition at line 36 of file TopKRuntime.cpp.

Referenced by sift_down(), and sift_up().

36  {
37  auto keys_ptr = reinterpret_cast<const KeyT*>(buffer + stride * rowid);
38  return keys_ptr[index];
39  }
const size_t index
Definition: TopKRuntime.cpp:43
const size_t stride
Definition: TopKRuntime.cpp:42
const int8_t * buffer
Definition: TopKRuntime.cpp:41
+ Here is the caller graph for this function:

Member Data Documentation

◆ buffer

template<typename KeyT = int64_t, typename IndexT = int32_t>
const int8_t* KeyAccessor< KeyT, IndexT >::buffer

Definition at line 41 of file TopKRuntime.cpp.

◆ index

template<typename KeyT = int64_t, typename IndexT = int32_t>
const size_t KeyAccessor< KeyT, IndexT >::index

Definition at line 43 of file TopKRuntime.cpp.

◆ stride

template<typename KeyT = int64_t, typename IndexT = int32_t>
const size_t KeyAccessor< KeyT, IndexT >::stride

Definition at line 42 of file TopKRuntime.cpp.


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