OmniSciDB
0264ff685a
|
#include <cassert>
#include <cstdint>
#include <ctime>
#include <limits>
#include <type_traits>
Go to the source code of this file.
Macros | |
#define | EMPTY_KEY_64 std::numeric_limits<int64_t>::max() |
#define | EMPTY_KEY_32 std::numeric_limits<int32_t>::max() |
#define | EMPTY_KEY_16 std::numeric_limits<int16_t>::max() |
#define | EMPTY_KEY_8 std::numeric_limits<int8_t>::max() |
Enumerations | |
enum | RuntimeInterruptFlags { INT_CHECK = 0, INT_ABORT = -1, INT_RESET = -2 } |
Functions | |
int64_t | agg_sum (int64_t *agg, const int64_t val) |
void | agg_max (int64_t *agg, const int64_t val) |
void | agg_min (int64_t *agg, const int64_t val) |
void | agg_sum_double (int64_t *agg, const double val) |
void | agg_max_double (int64_t *agg, const double val) |
void | agg_min_double (int64_t *agg, const double val) |
int32_t | agg_sum_int32_skip_val (int32_t *agg, const int32_t val, const int32_t skip_val) |
int64_t | agg_sum_skip_val (int64_t *agg, const int64_t val, const int64_t skip_val) |
void | agg_max_skip_val (int64_t *agg, const int64_t val, const int64_t skip_val) |
void | agg_min_skip_val (int64_t *agg, const int64_t val, const int64_t skip_val) |
void | agg_sum_float_skip_val (int32_t *agg, const float val, const float skip_val) |
void | agg_sum_double_skip_val (int64_t *agg, const double val, const double skip_val) |
void | agg_max_double_skip_val (int64_t *agg, const double val, const double skip_val) |
void | agg_min_double_skip_val (int64_t *agg, const double val, const double skip_val) |
int32_t | agg_sum_int32 (int32_t *agg, const int32_t val) |
void | agg_max_int32 (int32_t *agg, const int32_t val) |
void | agg_max_int16 (int16_t *agg, const int16_t val) |
void | agg_max_int8 (int8_t *agg, const int8_t val) |
void | agg_min_int32 (int32_t *agg, const int32_t val) |
void | agg_min_int16 (int16_t *agg, const int16_t val) |
void | agg_min_int8 (int8_t *agg, const int8_t val) |
void | agg_sum_float (int32_t *agg, const float val) |
void | agg_max_float (int32_t *agg, const float val) |
void | agg_min_float (int32_t *agg, const float val) |
void | agg_max_int32_skip_val (int32_t *agg, const int32_t val, const int32_t skip_val) |
void | agg_max_int16_skip_val (int16_t *agg, const int16_t val, const int16_t skip_val) |
void | agg_max_int8_skip_val (int8_t *agg, const int8_t val, const int8_t skip_val) |
void | agg_min_int32_skip_val (int32_t *agg, const int32_t val, const int32_t skip_val) |
void | agg_min_int16_skip_val (int16_t *agg, const int16_t val, const int16_t skip_val) |
void | agg_min_int8_skip_val (int8_t *agg, const int8_t val, const int8_t skip_val) |
void | agg_max_float_skip_val (int32_t *agg, const float val, const float skip_val) |
void | agg_min_float_skip_val (int32_t *agg, const float val, const float skip_val) |
void | agg_count_distinct_bitmap (int64_t *agg, const int64_t val, const int64_t min_val) |
uint32_t | key_hash (const int64_t *key, const uint32_t key_qw_count, const uint32_t key_byte_width) |
int64_t * | get_group_value (int64_t *groups_buffer, const uint32_t groups_buffer_entry_count, const int64_t *key, const uint32_t key_count, const uint32_t key_width, const uint32_t row_size_quad) |
bool | check_interrupt () |
bool | check_interrupt_init (unsigned command) |
int64_t * | get_group_value_with_watchdog (int64_t *groups_buffer, const uint32_t groups_buffer_entry_count, const int64_t *key, const uint32_t key_count, const uint32_t key_width, const uint32_t row_size_quad) |
int64_t * | get_group_value_columnar (int64_t *groups_buffer, const uint32_t groups_buffer_entry_count, const int64_t *key, const uint32_t key_qw_count) |
int64_t * | get_group_value_columnar_with_watchdog (int64_t *groups_buffer, const uint32_t groups_buffer_entry_count, const int64_t *key, const uint32_t key_qw_count) |
int64_t * | get_group_value_fast (int64_t *groups_buffer, const int64_t key, const int64_t min_key, const int64_t bucket, const uint32_t row_size_quad) |
int64_t * | get_group_value_fast_with_original_key (int64_t *groups_buffer, const int64_t key, const int64_t orig_key, const int64_t min_key, const int64_t bucket, const uint32_t row_size_quad) |
uint32_t | get_columnar_group_bin_offset (int64_t *key_base_ptr, const int64_t key, const int64_t min_key, const int64_t bucket) |
int64_t * | get_matching_group_value_perfect_hash (int64_t *groups_buffer, const uint32_t h, const int64_t *key, const uint32_t key_qw_count, const uint32_t row_size_quad) |
int64_t * | get_matching_group_value_perfect_hash_keyless (int64_t *groups_buffer, const uint32_t hashed_index, const uint32_t row_size_quad) |
int32_t * | get_bucketized_hash_slot (int32_t *buff, const int64_t key, const int64_t min_key, const int64_t bucket_normalization=1) |
int32_t * | get_hash_slot (int32_t *buff, const int64_t key, const int64_t min_key) |
int32_t * | get_hash_slot_sharded (int32_t *buff, const int64_t key, const int64_t min_key, const uint32_t entry_count_per_shard, const uint32_t num_shards, const uint32_t device_count) |
int32_t * | get_bucketized_hash_slot_sharded (int32_t *buff, const int64_t key, const int64_t min_key, const uint32_t entry_count_per_shard, const uint32_t num_shards, const uint32_t device_count, const int64_t bucket_normalization) |
int32_t * | get_hash_slot_sharded_opt (int32_t *buff, const int64_t key, const int64_t min_key, const uint32_t entry_count_per_shard, const uint32_t shard, const uint32_t num_shards, const uint32_t device_count) |
int32_t * | get_bucketized_hash_slot_sharded_opt (int32_t *buff, const int64_t key, const int64_t min_key, const uint32_t entry_count_per_shard, const uint32_t shard, const uint32_t num_shards, const uint32_t device_count, const int64_t bucket_normalization) |
void | linear_probabilistic_count (uint8_t *bitmap, const uint32_t bitmap_bytes, const uint8_t *key_bytes, const uint32_t key_len) |
int64_t | fixed_width_int_decode_noinline (const int8_t *byte_stream, const int32_t byte_width, const int64_t pos) |
int64_t | fixed_width_unsigned_decode_noinline (const int8_t *byte_stream, const int32_t byte_width, const int64_t pos) |
float | fixed_width_float_decode_noinline (const int8_t *byte_stream, const int64_t pos) |
double | fixed_width_double_decode_noinline (const int8_t *byte_stream, const int64_t pos) |
int64_t | fixed_width_small_date_decode_noinline (const int8_t *byte_stream, const int32_t byte_width, const int32_t null_val, const int64_t ret_null_val, const int64_t pos) |
int8_t * | extract_str_ptr_noinline (const uint64_t str_and_len) |
int32_t | extract_str_len_noinline (const uint64_t str_and_len) |
template<typename T = int64_t> | |
T | get_empty_key () |
template<> | |
int32_t | get_empty_key () |
#define EMPTY_KEY_16 std::numeric_limits<int16_t>::max() |
Definition at line 116 of file RuntimeFunctions.h.
#define EMPTY_KEY_32 std::numeric_limits<int32_t>::max() |
Definition at line 115 of file RuntimeFunctions.h.
Referenced by get_empty_key().
#define EMPTY_KEY_64 std::numeric_limits<int64_t>::max() |
Definition at line 114 of file RuntimeFunctions.h.
Referenced by get_empty_key().
#define EMPTY_KEY_8 std::numeric_limits<int8_t>::max() |
Definition at line 117 of file RuntimeFunctions.h.
Enumerator | |
---|---|
INT_CHECK | |
INT_ABORT | |
INT_RESET |
Definition at line 130 of file RuntimeFunctions.h.
void agg_count_distinct_bitmap | ( | int64_t * | agg, |
const int64_t | val, | ||
const int64_t | min_val | ||
) |
Definition at line 302 of file RuntimeFunctions.cpp.
Referenced by agg_count_distinct_bitmap_skip_val(), WindowFunctionContext::fillPartitionEnd(), WindowFunctionContext::fillPartitionStart(), anonymous_namespace{WindowContext.cpp}::index_to_partition_end(), and InValuesBitmap::InValuesBitmap().
void agg_max | ( | int64_t * | agg, |
const int64_t | val | ||
) |
Definition at line 384 of file RuntimeFunctions.cpp.
Referenced by agg_count_int32_skip_val().
void agg_max_double | ( | int64_t * | agg, |
const double | val | ||
) |
Definition at line 608 of file RuntimeFunctions.cpp.
void agg_max_double_skip_val | ( | int64_t * | agg, |
const double | val, | ||
const double | skip_val | ||
) |
void agg_max_float | ( | int32_t * | agg, |
const float | val | ||
) |
Definition at line 649 of file RuntimeFunctions.cpp.
void agg_max_float_skip_val | ( | int32_t * | agg, |
const float | val, | ||
const float | skip_val | ||
) |
void agg_max_int16 | ( | int16_t * | agg, |
const int16_t | val | ||
) |
void agg_max_int16_skip_val | ( | int16_t * | agg, |
const int16_t | val, | ||
const int16_t | skip_val | ||
) |
void agg_max_int32 | ( | int32_t * | agg, |
const int32_t | val | ||
) |
void agg_max_int32_skip_val | ( | int32_t * | agg, |
const int32_t | val, | ||
const int32_t | skip_val | ||
) |
void agg_max_int8 | ( | int8_t * | agg, |
const int8_t | val | ||
) |
void agg_max_int8_skip_val | ( | int8_t * | agg, |
const int8_t | val, | ||
const int8_t | skip_val | ||
) |
void agg_max_skip_val | ( | int64_t * | agg, |
const int64_t | val, | ||
const int64_t | skip_val | ||
) |
void agg_min | ( | int64_t * | agg, |
const int64_t | val | ||
) |
Definition at line 388 of file RuntimeFunctions.cpp.
Referenced by agg_count_int32_skip_val().
void agg_min_double | ( | int64_t * | agg, |
const double | val | ||
) |
Definition at line 613 of file RuntimeFunctions.cpp.
void agg_min_double_skip_val | ( | int64_t * | agg, |
const double | val, | ||
const double | skip_val | ||
) |
void agg_min_float | ( | int32_t * | agg, |
const float | val | ||
) |
Definition at line 654 of file RuntimeFunctions.cpp.
void agg_min_float_skip_val | ( | int32_t * | agg, |
const float | val, | ||
const float | skip_val | ||
) |
void agg_min_int16 | ( | int16_t * | agg, |
const int16_t | val | ||
) |
void agg_min_int16_skip_val | ( | int16_t * | agg, |
const int16_t | val, | ||
const int16_t | skip_val | ||
) |
void agg_min_int32 | ( | int32_t * | agg, |
const int32_t | val | ||
) |
void agg_min_int32_skip_val | ( | int32_t * | agg, |
const int32_t | val, | ||
const int32_t | skip_val | ||
) |
void agg_min_int8 | ( | int8_t * | agg, |
const int8_t | val | ||
) |
void agg_min_int8_skip_val | ( | int8_t * | agg, |
const int8_t | val, | ||
const int8_t | skip_val | ||
) |
void agg_min_skip_val | ( | int64_t * | agg, |
const int64_t | val, | ||
const int64_t | skip_val | ||
) |
int64_t agg_sum | ( | int64_t * | agg, |
const int64_t | val | ||
) |
Definition at line 378 of file RuntimeFunctions.cpp.
Referenced by agg_sum_skip_val().
void agg_sum_double | ( | int64_t * | agg, |
const double | val | ||
) |
Definition at line 603 of file RuntimeFunctions.cpp.
void agg_sum_double_skip_val | ( | int64_t * | agg, |
const double | val, | ||
const double | skip_val | ||
) |
void agg_sum_float | ( | int32_t * | agg, |
const float | val | ||
) |
Definition at line 644 of file RuntimeFunctions.cpp.
void agg_sum_float_skip_val | ( | int32_t * | agg, |
const float | val, | ||
const float | skip_val | ||
) |
int32_t agg_sum_int32 | ( | int32_t * | agg, |
const int32_t | val | ||
) |
Definition at line 436 of file RuntimeFunctions.cpp.
Referenced by agg_sum_int32_skip_val().
int32_t agg_sum_int32_skip_val | ( | int32_t * | agg, |
const int32_t | val, | ||
const int32_t | skip_val | ||
) |
Definition at line 521 of file RuntimeFunctions.cpp.
References agg_sum_int32().
int64_t agg_sum_skip_val | ( | int64_t * | agg, |
const int64_t | val, | ||
const int64_t | skip_val | ||
) |
Definition at line 507 of file RuntimeFunctions.cpp.
References agg_sum().
Referenced by Executor::reduceResults().
bool check_interrupt | ( | ) |
Definition at line 1411 of file RuntimeFunctions.cpp.
References check_interrupt_init(), and INT_CHECK.
bool check_interrupt_init | ( | unsigned | command | ) |
Definition at line 1418 of file RuntimeFunctions.cpp.
References INT_ABORT, INT_CHECK, and INT_RESET.
Referenced by check_interrupt(), Executor::interrupt(), and Executor::resetInterrupt().
int32_t extract_str_len_noinline | ( | const uint64_t | str_and_len | ) |
Definition at line 1233 of file RuntimeFunctions.cpp.
References extract_str_len().
Referenced by string_compress().
int8_t* extract_str_ptr_noinline | ( | const uint64_t | str_and_len | ) |
Definition at line 1229 of file RuntimeFunctions.cpp.
References extract_str_ptr().
Referenced by string_compress().
double fixed_width_double_decode_noinline | ( | const int8_t * | byte_stream, |
const int64_t | pos | ||
) |
Definition at line 126 of file DecodersImpl.h.
References ALWAYS_INLINE, DEVICE, fixed_width_double_decode(), and SUFFIX.
Referenced by compute_bucket_sizes_impl(), JoinColumnIterator::getElementSwitch(), result_set::lazy_decode(), and OverlapsKeyHandler::operator()().
float fixed_width_float_decode_noinline | ( | const int8_t * | byte_stream, |
const int64_t | pos | ||
) |
Definition at line 113 of file DecodersImpl.h.
References ALWAYS_INLINE, DEVICE, fixed_width_float_decode(), and SUFFIX.
Referenced by result_set::lazy_decode().
int64_t fixed_width_int_decode_noinline | ( | const int8_t * | byte_stream, |
const int32_t | byte_width, | ||
const int64_t | pos | ||
) |
Definition at line 83 of file DecodersImpl.h.
References DEVICE, fixed_width_int_decode(), NEVER_INLINE, and SUFFIX.
Referenced by JoinColumnIterator::getElementSwitch(), and result_set::lazy_decode().
int64_t fixed_width_small_date_decode_noinline | ( | const int8_t * | byte_stream, |
const int32_t | byte_width, | ||
const int32_t | null_val, | ||
const int64_t | ret_null_val, | ||
const int64_t | pos | ||
) |
Definition at line 141 of file DecodersImpl.h.
References fixed_width_small_date_decode(), and SUFFIX.
Referenced by JoinColumnIterator::getElementSwitch(), and result_set::lazy_decode().
int64_t fixed_width_unsigned_decode_noinline | ( | const int8_t * | byte_stream, |
const int32_t | byte_width, | ||
const int64_t | pos | ||
) |
Definition at line 90 of file DecodersImpl.h.
References ALWAYS_INLINE, DEVICE, fixed_width_unsigned_decode(), and SUFFIX.
Referenced by JoinColumnIterator::getElementSwitch(), and result_set::lazy_decode().
int32_t* get_bucketized_hash_slot | ( | int32_t * | buff, |
const int64_t | key, | ||
const int64_t | min_key, | ||
const int64_t | bucket_normalization = 1 |
||
) |
Definition at line 31 of file JoinHashImpl.h.
Referenced by bucketized_hash_join_idx(), count_matches_bucketized(), fill_hash_join_buff_bucketized(), and fill_row_ids_bucketized().
int32_t* get_bucketized_hash_slot_sharded | ( | int32_t * | buff, |
const int64_t | key, | ||
const int64_t | min_key, | ||
const uint32_t | entry_count_per_shard, | ||
const uint32_t | num_shards, | ||
const uint32_t | device_count, | ||
const int64_t | bucket_normalization | ||
) |
Definition at line 45 of file JoinHashImpl.h.
References SHARD_FOR_KEY.
Referenced by fill_row_ids_sharded_bucketized().
int32_t* get_bucketized_hash_slot_sharded_opt | ( | int32_t * | buff, |
const int64_t | key, | ||
const int64_t | min_key, | ||
const uint32_t | entry_count_per_shard, | ||
const uint32_t | shard, | ||
const uint32_t | num_shards, | ||
const uint32_t | device_count, | ||
const int64_t | bucket_normalization | ||
) |
Definition at line 74 of file JoinHashImpl.h.
Referenced by fill_hash_join_buff_sharded_bucketized().
uint32_t get_columnar_group_bin_offset | ( | int64_t * | key_base_ptr, |
const int64_t | key, | ||
const int64_t | min_key, | ||
const int64_t | bucket | ||
) |
|
inline |
|
inline |
int64_t* get_group_value | ( | int64_t * | groups_buffer, |
const uint32_t | groups_buffer_entry_count, | ||
const int64_t * | key, | ||
const uint32_t | key_count, | ||
const uint32_t | key_width, | ||
const uint32_t | row_size_quad | ||
) |
Definition at line 26 of file GroupByRuntime.cpp.
References DEVICE, dynamic_watchdog(), get_matching_group_value(), key_hash(), and NEVER_INLINE.
Referenced by ResultSetStorage::moveOneEntryToBuffer().
int64_t* get_group_value_columnar | ( | int64_t * | groups_buffer, |
const uint32_t | groups_buffer_entry_count, | ||
const int64_t * | key, | ||
const uint32_t | key_qw_count | ||
) |
Definition at line 140 of file GroupByRuntime.cpp.
References get_matching_group_value_columnar(), and key_hash().
Referenced by ResultSetStorage::moveOneEntryToBuffer().
int64_t* get_group_value_columnar_with_watchdog | ( | int64_t * | groups_buffer, |
const uint32_t | groups_buffer_entry_count, | ||
const int64_t * | key, | ||
const uint32_t | key_qw_count | ||
) |
Definition at line 163 of file GroupByRuntime.cpp.
References dynamic_watchdog(), get_matching_group_value_columnar(), and key_hash().
int64_t* get_group_value_fast | ( | int64_t * | groups_buffer, |
const int64_t | key, | ||
const int64_t | min_key, | ||
const int64_t | bucket, | ||
const uint32_t | row_size_quad | ||
) |
int64_t* get_group_value_fast_with_original_key | ( | int64_t * | groups_buffer, |
const int64_t | key, | ||
const int64_t | orig_key, | ||
const int64_t | min_key, | ||
const int64_t | bucket, | ||
const uint32_t | row_size_quad | ||
) |
Definition at line 210 of file GroupByRuntime.cpp.
References ALWAYS_INLINE, DEVICE, and EMPTY_KEY_64.
int64_t* get_group_value_with_watchdog | ( | int64_t * | groups_buffer, |
const uint32_t | groups_buffer_entry_count, | ||
const int64_t * | key, | ||
const uint32_t | key_count, | ||
const uint32_t | key_width, | ||
const uint32_t | row_size_quad | ||
) |
Definition at line 53 of file GroupByRuntime.cpp.
References DEVICE, dynamic_watchdog(), get_matching_group_value(), key_hash(), and NEVER_INLINE.
int32_t* get_hash_slot | ( | int32_t * | buff, |
const int64_t | key, | ||
const int64_t | min_key | ||
) |
Definition at line 39 of file JoinHashImpl.h.
Referenced by count_matches(), fill_hash_join_buff(), fill_row_ids(), and hash_join_idx().
int32_t* get_hash_slot_sharded | ( | int32_t * | buff, |
const int64_t | key, | ||
const int64_t | min_key, | ||
const uint32_t | entry_count_per_shard, | ||
const uint32_t | num_shards, | ||
const uint32_t | device_count | ||
) |
Definition at line 60 of file JoinHashImpl.h.
References SHARD_FOR_KEY.
Referenced by count_matches_sharded(), fill_row_ids_sharded(), and hash_join_idx_sharded().
int32_t* get_hash_slot_sharded_opt | ( | int32_t * | buff, |
const int64_t | key, | ||
const int64_t | min_key, | ||
const uint32_t | entry_count_per_shard, | ||
const uint32_t | shard, | ||
const uint32_t | num_shards, | ||
const uint32_t | device_count | ||
) |
Definition at line 89 of file JoinHashImpl.h.
Referenced by fill_hash_join_buff_sharded().
int64_t* get_matching_group_value_perfect_hash | ( | int64_t * | groups_buffer, |
const uint32_t | h, | ||
const int64_t * | key, | ||
const uint32_t | key_qw_count, | ||
const uint32_t | row_size_quad | ||
) |
int64_t* get_matching_group_value_perfect_hash_keyless | ( | int64_t * | groups_buffer, |
const uint32_t | hashed_index, | ||
const uint32_t | row_size_quad | ||
) |
For a particular hashed index (only used with multi-column perfect hash group by) it returns the row-wise offset of the group in the output buffer. Since it is intended for keyless hash use, it assumes there is no group columns prepending the output buffer.
Definition at line 1174 of file RuntimeFunctions.cpp.
uint32_t key_hash | ( | const int64_t * | key, |
const uint32_t | key_qw_count, | ||
const uint32_t | key_byte_width | ||
) |
Definition at line 20 of file GroupByRuntime.cpp.
References MurmurHash1().
Referenced by get_group_value(), get_group_value_columnar(), anonymous_namespace{ResultSetReduction.cpp}::get_group_value_columnar_reduction(), get_group_value_columnar_slot(), get_group_value_columnar_slot_with_watchdog(), get_group_value_columnar_with_watchdog(), result_set::get_group_value_reduction(), and get_group_value_with_watchdog().
void linear_probabilistic_count | ( | uint8_t * | bitmap, |
const uint32_t | bitmap_bytes, | ||
const uint8_t * | key_bytes, | ||
const uint32_t | key_len | ||
) |
Definition at line 1319 of file RuntimeFunctions.cpp.
References MurmurHash1().