OmniSciDB
a667adc9c8
|
#include "Shared/funcannotations.h"
#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) |
RUNTIME_EXPORT uint32_t | key_hash (const int64_t *key, const uint32_t key_qw_count, const uint32_t key_byte_width) |
RUNTIME_EXPORT 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) |
RUNTIME_EXPORT 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) |
RUNTIME_EXPORT 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) |
RUNTIME_EXPORT 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) |
RUNTIME_EXPORT 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) |
RUNTIME_EXPORT 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) |
RUNTIME_EXPORT 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 118 of file RuntimeFunctions.h.
#define EMPTY_KEY_32 std::numeric_limits<int32_t>::max() |
Definition at line 117 of file RuntimeFunctions.h.
Referenced by get_empty_key().
#define EMPTY_KEY_64 std::numeric_limits<int64_t>::max() |
Definition at line 116 of file RuntimeFunctions.h.
Referenced by get_empty_key().
#define EMPTY_KEY_8 std::numeric_limits<int8_t>::max() |
Definition at line 119 of file RuntimeFunctions.h.
Enumerator | |
---|---|
INT_CHECK | |
INT_ABORT | |
INT_RESET |
Definition at line 133 of file RuntimeFunctions.h.
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 367 of file RuntimeFunctions.cpp.
void agg_max_double | ( | int64_t * | agg, |
const double | val | ||
) |
void agg_max_float | ( | int32_t * | agg, |
const float | val | ||
) |
void agg_max_int16 | ( | int16_t * | agg, |
const int16_t | val | ||
) |
void agg_max_int32 | ( | int32_t * | agg, |
const int32_t | val | ||
) |
void agg_max_int8 | ( | int8_t * | agg, |
const int8_t | val | ||
) |
void agg_min | ( | int64_t * | agg, |
const int64_t | val | ||
) |
Definition at line 371 of file RuntimeFunctions.cpp.
void agg_min_double | ( | int64_t * | agg, |
const double | val | ||
) |
void agg_min_float | ( | int32_t * | agg, |
const float | val | ||
) |
void agg_min_int16 | ( | int16_t * | agg, |
const int16_t | val | ||
) |
void agg_min_int32 | ( | int32_t * | agg, |
const int32_t | val | ||
) |
void agg_min_int8 | ( | int8_t * | agg, |
const int8_t | val | ||
) |
int64_t agg_sum | ( | int64_t * | agg, |
const int64_t | val | ||
) |
Definition at line 361 of file RuntimeFunctions.cpp.
Referenced by agg_sum_skip_val().
void agg_sum_double | ( | int64_t * | agg, |
const double | val | ||
) |
void agg_sum_float | ( | int32_t * | agg, |
const float | val | ||
) |
int32_t agg_sum_int32 | ( | int32_t * | agg, |
const int32_t | val | ||
) |
Definition at line 419 of file RuntimeFunctions.cpp.
Referenced by agg_sum_int32_skip_val().
Definition at line 504 of file RuntimeFunctions.cpp.
References agg_sum_int32().
Definition at line 490 of file RuntimeFunctions.cpp.
References agg_sum().
Referenced by Executor::reduceResults().
bool check_interrupt | ( | ) |
Definition at line 160 of file cuda_mapd_rt.cu.
References check_interrupt_init(), INT_CHECK, and runtime_interrupt_flag.
Referenced by check_interrupt_rt(), ColumnarResults::compactAndCopyEntriesWithoutTargetSkipping(), ColumnarResults::compactAndCopyEntriesWithTargetSkipping(), ColumnFetcher::getAllTableColumnFragments(), QueryExecutionContext::groupBufferToDeinterleavedResults(), ColumnFetcher::linearizeColumnFragments(), ColumnarResults::locateAndCountEntries(), ColumnFetcher::makeJoinColumn(), ColumnarResults::materializeAllColumnsThroughIteration(), ColumnarResults::materializeAllLazyColumns(), and ResultSetStorage::reduceEntriesNoCollisionsColWise().
bool check_interrupt_init | ( | unsigned | command | ) |
Definition at line 1413 of file RuntimeFunctions.cpp.
References INT_ABORT, INT_CHECK, INT_RESET, and runtime_interrupt_flag.
Referenced by check_interrupt(), Executor::interrupt(), and Executor::resetInterrupt().
int32_t extract_str_len_noinline | ( | const uint64_t | str_and_len | ) |
Definition at line 1224 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 1220 of file RuntimeFunctions.cpp.
References extract_str_ptr().
Referenced by string_compress().
Definition at line 134 of file DecodersImpl.h.
References fixed_width_double_decode(), and SUFFIX.
Referenced by compute_bucket_sizes_impl(), JoinColumnIterator::getElementSwitch(), result_set::lazy_decode(), and OverlapsKeyHandler::operator()().
Definition at line 121 of file DecodersImpl.h.
References 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 91 of file DecodersImpl.h.
References fixed_width_int_decode(), 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 149 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 98 of file DecodersImpl.h.
References 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().
RUNTIME_EXPORT 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 |
RUNTIME_EXPORT 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 25 of file GroupByRuntime.cpp.
References get_matching_group_value(), and key_hash().
Referenced by ResultSetStorage::moveOneEntryToBuffer().
RUNTIME_EXPORT 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 139 of file GroupByRuntime.cpp.
References get_matching_group_value_columnar(), and key_hash().
Referenced by ResultSetStorage::moveOneEntryToBuffer().
RUNTIME_EXPORT 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().
RUNTIME_EXPORT 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 | ||
) |
RUNTIME_EXPORT 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 | ||
) |
RUNTIME_EXPORT 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 52 of file GroupByRuntime.cpp.
References dynamic_watchdog(), get_matching_group_value(), and key_hash().
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 1165 of file RuntimeFunctions.cpp.
RUNTIME_EXPORT uint32_t key_hash | ( | const int64_t * | key, |
const uint32_t | key_qw_count, | ||
const uint32_t | key_byte_width | ||
) |
Definition at line 21 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 1204 of file cuda_mapd_rt.cu.
References MurmurHash1().