OmniSciDB  0fdbebe030
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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.

Author
Minggang Yu miyu@.nosp@m.mapd.nosp@m..com Copyright (c) 2017 MapD Technologies, Inc. All rights reserved.

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 46 of file StreamingTopN.cpp.

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

Referenced by GroupByAndAggregate::codegenOutputSlot().

47  {
48  size_t slot_idx = 0;
49  for (size_t i = 0; i < target_idx; ++i) {
50  auto agg_info = get_target_info(target_exprs[i], g_bigint_count);
51  slot_idx = advance_slot(slot_idx, agg_info, false);
52  }
53  return slot_idx;
54 }
TargetInfo get_target_info(const PointerType target_expr, const bool bigint_count)
Definition: TargetInfo.h:66
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: