OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 30 of file TopKRuntime.cpp.

Constructor & Destructor Documentation

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 31 of file TopKRuntime.cpp.

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

Member Function Documentation

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 35 of file TopKRuntime.cpp.

References KeyAccessor< KeyT, IndexT >::buffer, KeyAccessor< KeyT, IndexT >::index, and KeyAccessor< KeyT, IndexT >::stride.

Referenced by sift_down(), and sift_up().

35  {
36  auto keys_ptr = reinterpret_cast<const KeyT*>(buffer + stride * rowid);
37  return keys_ptr[index];
38  }
const size_t index
Definition: TopKRuntime.cpp:42
const size_t stride
Definition: TopKRuntime.cpp:41
const int8_t * buffer
Definition: TopKRuntime.cpp:40

+ Here is the caller graph for this function:

Member Data Documentation

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

Definition at line 40 of file TopKRuntime.cpp.

Referenced by KeyAccessor< KeyT, IndexT >::get().

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

Definition at line 42 of file TopKRuntime.cpp.

Referenced by KeyAccessor< KeyT, IndexT >::get().

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

Definition at line 41 of file TopKRuntime.cpp.

Referenced by KeyAccessor< KeyT, IndexT >::get().


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