OmniSciDB
a5dc49c757
|
Structures and runtime functions of streaming top-k heap. More...
#include "../Shared/funcannotations.h"
Go to the source code of this file.
Classes | |
struct | KeyAccessor< KeyT, IndexT > |
struct | KeyComparator< KeyT > |
Macros | |
#define | DEF_GET_BIN_FROM_K_HEAP(key_type) |
Enumerations | |
enum | HeapOrdering { HeapOrdering::MIN, HeapOrdering::MAX } |
enum | NullsOrdering { NullsOrdering::FIRST, NullsOrdering::LAST } |
Functions | |
template<typename KeyT = int64_t, typename NodeT = int64_t> | |
ALWAYS_INLINE DEVICE void | sift_down (NodeT *heap, const size_t heap_size, const NodeT curr_idx, const KeyComparator< KeyT > &compare, const KeyAccessor< KeyT, NodeT > &accessor) |
template<typename KeyT = int64_t, typename NodeT = int64_t> | |
ALWAYS_INLINE DEVICE void | sift_up (NodeT *heap, const NodeT curr_idx, const KeyComparator< KeyT > &compare, const KeyAccessor< KeyT, NodeT > &accessor) |
template<typename KeyT = int64_t, typename NodeT = int64_t> | |
ALWAYS_INLINE DEVICE void | push_heap (int64_t *heap_ptr, int64_t *rows_ptr, NodeT &node_count, const uint32_t row_size_quad, const uint32_t key_offset, const KeyComparator< KeyT > &comparator, const KeyAccessor< KeyT, NodeT > &accessor, const KeyT curr_key) |
template<typename KeyT = int64_t, typename NodeT = int64_t> | |
ALWAYS_INLINE DEVICE bool | pop_and_push_heap (int64_t *heap_ptr, int64_t *rows_ptr, const NodeT node_count, const uint32_t row_size_quad, const uint32_t key_offset, const KeyComparator< KeyT > &compare, const KeyAccessor< KeyT, NodeT > &accessor, const KeyT curr_key) |
template<typename KeyT = int64_t> | |
ALWAYS_INLINE DEVICE int64_t * | get_bin_from_k_heap_impl (int64_t *heaps, const uint32_t k, const uint32_t row_size_quad, const uint32_t key_offset, const bool min_heap, const bool has_null, const bool nulls_first, const KeyT null_key, const KeyT curr_key) |
Structures and runtime functions of streaming top-k heap.
Definition in file TopKRuntime.cpp.
#define DEF_GET_BIN_FROM_K_HEAP | ( | key_type | ) |
Definition at line 237 of file TopKRuntime.cpp.
|
strong |
Enumerator | |
---|---|
MIN | |
MAX |
Definition at line 25 of file TopKRuntime.cpp.
|
strong |
Enumerator | |
---|---|
FIRST | |
LAST |
Definition at line 27 of file TopKRuntime.cpp.
ALWAYS_INLINE DEVICE int64_t* get_bin_from_k_heap_impl | ( | int64_t * | heaps, |
const uint32_t | k, | ||
const uint32_t | row_size_quad, | ||
const uint32_t | key_offset, | ||
const bool | min_heap, | ||
const bool | has_null, | ||
const bool | nulls_first, | ||
const KeyT | null_key, | ||
const KeyT | curr_key | ||
) |
Definition at line 183 of file TopKRuntime.cpp.
References FIRST, LAST, MAX, MIN, pop_and_push_heap(), pos_start_impl(), pos_step_impl(), and push_heap().
ALWAYS_INLINE DEVICE bool pop_and_push_heap | ( | int64_t * | heap_ptr, |
int64_t * | rows_ptr, | ||
const NodeT | node_count, | ||
const uint32_t | row_size_quad, | ||
const uint32_t | key_offset, | ||
const KeyComparator< KeyT > & | compare, | ||
const KeyAccessor< KeyT, NodeT > & | accessor, | ||
const KeyT | curr_key | ||
) |
Definition at line 160 of file TopKRuntime.cpp.
Referenced by get_bin_from_k_heap_impl().
ALWAYS_INLINE DEVICE void push_heap | ( | int64_t * | heap_ptr, |
int64_t * | rows_ptr, | ||
NodeT & | node_count, | ||
const uint32_t | row_size_quad, | ||
const uint32_t | key_offset, | ||
const KeyComparator< KeyT > & | comparator, | ||
const KeyAccessor< KeyT, NodeT > & | accessor, | ||
const KeyT | curr_key | ||
) |
Definition at line 142 of file TopKRuntime.cpp.
Referenced by get_bin_from_k_heap_impl().
ALWAYS_INLINE DEVICE void sift_down | ( | NodeT * | heap, |
const size_t | heap_size, | ||
const NodeT | curr_idx, | ||
const KeyComparator< KeyT > & | compare, | ||
const KeyAccessor< KeyT, NodeT > & | accessor | ||
) |
Definition at line 82 of file TopKRuntime.cpp.
References KeyAccessor< KeyT, IndexT >::get().
ALWAYS_INLINE DEVICE void sift_up | ( | NodeT * | heap, |
const NodeT | curr_idx, | ||
const KeyComparator< KeyT > & | compare, | ||
const KeyAccessor< KeyT, NodeT > & | accessor | ||
) |
Definition at line 123 of file TopKRuntime.cpp.
References KeyAccessor< KeyT, IndexT >::get().