OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
StreamingTopN.h File Reference

Streaming Top N algorithm. More...

#include <cstddef>
#include <cstdint>
#include <vector>
+ Include dependency graph for StreamingTopN.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 streaming_top_n
 
 Analyzer
 

Functions

size_t streaming_top_n::get_heap_size (const size_t row_size, const size_t n, const size_t thread_count)
 
size_t streaming_top_n::get_rows_offset_of_heaps (const size_t n, const size_t thread_count)
 
std::vector< int8_t > streaming_top_n::get_rows_copy_from_heaps (const int64_t *heaps, const size_t heaps_size, const size_t n, const size_t thread_count)
 
size_t get_heap_key_slot_index (const std::vector< Analyzer::Expr * > &target_exprs, const size_t target_idx)
 

Detailed Description

Streaming Top N algorithm.

Definition in file StreamingTopN.h.

Function Documentation

size_t get_heap_key_slot_index ( const std::vector< Analyzer::Expr * > &  target_exprs,
const size_t  target_idx 
)

Definition at line 47 of file StreamingTopN.cpp.

References advance_slot(), g_bigint_count, and get_target_info().

Referenced by GroupByAndAggregate::codegenOutputSlot().

48  {
49  size_t slot_idx = 0;
50  for (size_t i = 0; i < target_idx; ++i) {
51  auto agg_info = get_target_info(target_exprs[i], g_bigint_count);
52  slot_idx = advance_slot(slot_idx, agg_info, false);
53  }
54  return slot_idx;
55 }
TargetInfo get_target_info(const Analyzer::Expr *target_expr, const bool bigint_count)
Definition: TargetInfo.h:92
size_t advance_slot(const size_t j, const TargetInfo &target_info, const bool separate_varlen_storage)
bool g_bigint_count

+ Here is the call graph for this function:

+ Here is the caller graph for this function: