OmniSciDB
a5dc49c757
|
#include <RowSetMemoryOwner.h>
Classes | |
struct | CountDistinctBitmapBuffer |
Public Types | |
enum | StringTranslationType { StringTranslationType::SOURCE_INTERSECTION, StringTranslationType::SOURCE_UNION } |
Public Member Functions | |
RowSetMemoryOwner (const size_t arena_block_size, const size_t executor_id) | |
void | setKernelMemoryAllocator (const size_t num_kernels) |
int8_t * | allocate (const size_t num_bytes) override |
int8_t * | allocate (const size_t num_bytes, const size_t thread_idx) |
void | initCountDistinctBufferAllocator (size_t buffer_size, size_t thread_idx) |
std::pair< int64_t *, bool > | allocateCachedGroupByBuffer (const size_t num_bytes, const size_t thread_idx) |
int8_t * | allocateCountDistinctBuffer (const size_t num_bytes, const size_t thread_idx=0) |
void | addCountDistinctBuffer (int8_t *count_distinct_buffer, const size_t bytes, const bool physical_buffer) |
void | addCountDistinctSet (CountDistinctSet *count_distinct_set) |
void | clearNonOwnedGroupByBuffers () |
void | addVarlenBuffer (void *varlen_buffer) |
void | addVarlenInputBuffer (Data_Namespace::AbstractBuffer *buffer) |
std::string * | addString (const std::string &str) |
std::vector< int64_t > * | addArray (const std::vector< int64_t > &arr) |
StringDictionaryProxy * | addStringDict (std::shared_ptr< StringDictionary > str_dict, const shared::StringDictKey &dict_key, const int64_t generation) |
std::string | generate_translation_map_key (const shared::StringDictKey &source_proxy_dict_key, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos) |
std::string | generate_translation_map_key (const shared::StringDictKey &source_proxy_dict_key, const shared::StringDictKey &dest_proxy_dict_key, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos) |
const StringDictionaryProxy::IdMap * | addStringProxyIntersectionTranslationMap (const StringDictionaryProxy *source_proxy, const StringDictionaryProxy *dest_proxy, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos) |
const StringDictionaryProxy::TranslationMap < Datum > * | addStringProxyNumericTranslationMap (const StringDictionaryProxy *source_proxy, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos) |
const StringDictionaryProxy::IdMap * | addStringProxyUnionTranslationMap (const StringDictionaryProxy *source_proxy, StringDictionaryProxy *dest_proxy, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos) |
const StringOps_Namespace::StringOps * | getStringOps (const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos) |
StringDictionaryProxy * | getStringDictProxy (const shared::StringDictKey &dict_key) const |
StringDictionaryProxy * | getOrAddStringDictProxy (const shared::StringDictKey &dict_key, const bool with_generation) |
void | addLiteralStringDictProxy (std::shared_ptr< StringDictionaryProxy > lit_str_dict_proxy) |
StringDictionaryProxy * | getLiteralStringDictProxy () const |
const StringDictionaryProxy::IdMap * | getOrAddStringProxyTranslationMap (const shared::StringDictKey &source_dict_id_in, const shared::StringDictKey &dest_dict_id_in, const bool with_generation, const StringTranslationType translation_map_type, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos) |
const StringDictionaryProxy::TranslationMap < Datum > * | getOrAddStringProxyNumericTranslationMap (const shared::StringDictKey &source_dict_id_in, const bool with_generation, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos) |
void | addColBuffer (const void *col_buffer) |
~RowSetMemoryOwner () | |
std::shared_ptr < RowSetMemoryOwner > | cloneStrDictDataOnly () |
void | setDictionaryGenerations (StringDictionaryGenerations generations) |
StringDictionaryGenerations & | getStringDictionaryGenerations () |
quantile::TDigest * | initTDigest (size_t thread_idx, ApproxQuantileDescriptor, double q) |
void | reserveTDigestMemory (size_t thread_idx, size_t capacity) |
void | setTableFunctionMetadata (const char *key, const uint8_t *raw_data, const size_t num_bytes, const TableFunctionMetadataType value_type) |
void | getTableFunctionMetadata (const char *key, const uint8_t *&raw_data, size_t &num_bytes, TableFunctionMetadataType &value_type) const |
AggMode * | allocateMode () |
Public Member Functions inherited from SimpleAllocator | |
virtual | ~SimpleAllocator ()=default |
Private Types | |
using | TDigestAllocator = FastAllocator< int8_t > |
using | CountDistinctBufferAllocator = FastAllocator< int8_t > |
using | MetadataValue = std::pair< std::vector< uint8_t >, TableFunctionMetadataType > |
Private Member Functions | |
int8_t * | allocateUnlocked (const size_t num_bytes, const size_t thread_idx) |
Friends | |
class | ResultSet |
class | QueryExecutionContext |
Handles allocations and outputs for all stages in a query, either explicitly or via a managed allocator object
Definition at line 57 of file RowSetMemoryOwner.h.
|
private |
Definition at line 477 of file RowSetMemoryOwner.h.
|
private |
Definition at line 485 of file RowSetMemoryOwner.h.
|
private |
Definition at line 466 of file RowSetMemoryOwner.h.
|
strong |
Enumerator | |
---|---|
SOURCE_INTERSECTION | |
SOURCE_UNION |
Definition at line 70 of file RowSetMemoryOwner.h.
|
inline |
Definition at line 59 of file RowSetMemoryOwner.h.
References allocators_, arena_block_size_, count_distinct_buffer_allocators_, and g_use_cpu_mem_pool_for_output_buffers.
|
inline |
Definition at line 349 of file RowSetMemoryOwner.h.
References allocators_, CHECK, col_buffers_, count_distinct_sets_, executor_id_, varlen_buffers_, varlen_input_buffers_, and VLOG.
|
inline |
Definition at line 199 of file RowSetMemoryOwner.h.
References arrays_, and state_mutex_.
|
inline |
Definition at line 344 of file RowSetMemoryOwner.h.
References col_buffers_, and state_mutex_.
|
inline |
Definition at line 159 of file RowSetMemoryOwner.h.
References count_distinct_bitmaps_, and state_mutex_.
Referenced by allocateCountDistinctBuffer().
|
inline |
Definition at line 167 of file RowSetMemoryOwner.h.
References count_distinct_sets_, and state_mutex_.
|
inline |
Definition at line 320 of file RowSetMemoryOwner.h.
References lit_str_dict_proxy_, and state_mutex_.
|
inline |
|
inline |
Definition at line 205 of file RowSetMemoryOwner.h.
References CHECK_EQ, state_mutex_, and str_dict_proxy_owned_.
|
inline |
Definition at line 243 of file RowSetMemoryOwner.h.
References StringDictionaryProxy::buildIntersectionTranslationMapToOtherProxy(), generate_translation_map_key(), StringDictionaryProxy::getDictionary(), StringDictionary::getDictKey(), state_mutex_, and str_proxy_intersection_translation_maps_owned_.
|
inline |
Definition at line 263 of file RowSetMemoryOwner.h.
References StringDictionaryProxy::buildNumericTranslationMap(), generate_translation_map_key(), StringDictionaryProxy::getDictionary(), StringDictionary::getDictKey(), and str_proxy_numeric_translation_maps_owned_.
|
inline |
Definition at line 276 of file RowSetMemoryOwner.h.
References StringDictionaryProxy::buildUnionTranslationMapToOtherProxy(), generate_translation_map_key(), StringDictionaryProxy::getDictionary(), StringDictionary::getDictKey(), state_mutex_, and str_proxy_union_translation_maps_owned_.
|
inline |
Definition at line 174 of file RowSetMemoryOwner.h.
References state_mutex_, and varlen_buffers_.
|
inline |
Adds a GPU buffer containing a variable length input column. Variable length inputs on GPU are referenced in output projected targets and should not be freed until the query results have been resolved.
Definition at line 187 of file RowSetMemoryOwner.h.
References CHECK_EQ, Data_Namespace::AbstractBuffer::getType(), Data_Namespace::GPU_LEVEL, state_mutex_, and varlen_input_buffers_.
|
inlineoverridevirtual |
Implements SimpleAllocator.
Definition at line 103 of file RowSetMemoryOwner.h.
Referenced by anonymous_namespace{QueryMemoryInitializer.cpp}::alloc_group_by_buffer().
|
inline |
Definition at line 109 of file RowSetMemoryOwner.h.
References allocateUnlocked(), allocators_, CHECK_LT, and state_mutex_.
|
inline |
Definition at line 128 of file RowSetMemoryOwner.h.
References allocators_, CHECK, CHECK_LT, g_allow_memory_status_log, non_owned_group_by_buffers_, state_mutex_, and VLOG.
Referenced by anonymous_namespace{QueryMemoryInitializer.cpp}::alloc_group_by_buffer().
|
inline |
Definition at line 149 of file RowSetMemoryOwner.h.
References addCountDistinctBuffer(), CHECK, CHECK_LT, and count_distinct_buffer_allocators_.
|
inline |
|
inlineprivate |
Definition at line 432 of file RowSetMemoryOwner.h.
References allocators_, g_allow_memory_status_log, and VLOG.
Referenced by allocate(), and initCountDistinctBufferAllocator().
|
inline |
Definition at line 172 of file RowSetMemoryOwner.h.
References non_owned_group_by_buffers_.
|
inline |
Definition at line 379 of file RowSetMemoryOwner.h.
References arena_block_size_, executor_id_, lit_str_dict_proxy_, and str_dict_proxy_owned_.
|
inline |
Definition at line 223 of file RowSetMemoryOwner.h.
Referenced by addStringProxyIntersectionTranslationMap(), addStringProxyNumericTranslationMap(), addStringProxyUnionTranslationMap(), and getStringOps().
|
inline |
Definition at line 232 of file RowSetMemoryOwner.h.
|
inline |
Definition at line 326 of file RowSetMemoryOwner.h.
References lit_str_dict_proxy_, and state_mutex_.
StringDictionaryProxy * RowSetMemoryOwner::getOrAddStringDictProxy | ( | const shared::StringDictKey & | dict_key, |
const bool | with_generation | ||
) |
Definition at line 576 of file Execute.cpp.
References CHECK, CHECK_EQ, CHECK_LE, shared::StringDictKey::db_id, shared::StringDictKey::dict_id, g_cache_string_hash, Catalog_Namespace::SysCatalog::getCatalog(), Catalog_Namespace::SysCatalog::instance(), dict_ref_t::literalsDictId, and REGULAR_DICT.
const StringDictionaryProxy::TranslationMap< Datum > * RowSetMemoryOwner::getOrAddStringProxyNumericTranslationMap | ( | const shared::StringDictKey & | source_dict_id_in, |
const bool | with_generation, | ||
const std::vector< StringOps_Namespace::StringOpInfo > & | string_op_infos | ||
) |
Definition at line 669 of file Execute.cpp.
const StringDictionaryProxy::IdMap * RowSetMemoryOwner::getOrAddStringProxyTranslationMap | ( | const shared::StringDictKey & | source_dict_id_in, |
const shared::StringDictKey & | dest_dict_id_in, | ||
const bool | with_generation, | ||
const StringTranslationType | translation_map_type, | ||
const std::vector< StringOps_Namespace::StringOpInfo > & | string_op_infos | ||
) |
Definition at line 652 of file Execute.cpp.
References SOURCE_INTERSECTION.
|
inline |
Definition at line 390 of file RowSetMemoryOwner.h.
References string_dictionary_generations_.
|
inline |
Definition at line 310 of file RowSetMemoryOwner.h.
References CHECK, state_mutex_, and str_dict_proxy_owned_.
|
inline |
Definition at line 296 of file RowSetMemoryOwner.h.
References generate_translation_map_key(), state_mutex_, and string_ops_owned_.
|
inline |
Definition at line 411 of file RowSetMemoryOwner.h.
References table_function_metadata_store_, and table_function_metadata_store_mutex_.
|
inline |
Definition at line 115 of file RowSetMemoryOwner.h.
References allocateUnlocked(), CHECK_LT, count_distinct_buffer_allocators_, state_mutex_, and VLOG.
quantile::TDigest * RowSetMemoryOwner::initTDigest | ( | size_t | thread_idx, |
ApproxQuantileDescriptor | desc, | ||
double | q | ||
) |
Definition at line 677 of file Execute.cpp.
References ApproxQuantileDescriptor::buffer_size, and ApproxQuantileDescriptor::centroids_size.
void RowSetMemoryOwner::reserveTDigestMemory | ( | size_t | thread_idx, |
size_t | capacity | ||
) |
Definition at line 687 of file Execute.cpp.
References VLOG.
|
inline |
Definition at line 386 of file RowSetMemoryOwner.h.
References string_dictionary_generations_.
|
inline |
Definition at line 72 of file RowSetMemoryOwner.h.
References allocators_, arena_block_size_, CHECK_EQ, CHECK_GE, CHECK_GT, count_distinct_buffer_allocators_, executor_id_, g_use_cpu_mem_pool_for_output_buffers, non_owned_group_by_buffers_, and VLOG.
|
inline |
Definition at line 401 of file RowSetMemoryOwner.h.
References table_function_metadata_store_, and table_function_metadata_store_mutex_.
|
friend |
Definition at line 490 of file RowSetMemoryOwner.h.
|
friend |
Definition at line 489 of file RowSetMemoryOwner.h.
|
private |
Definition at line 475 of file RowSetMemoryOwner.h.
Referenced by allocate(), allocateCachedGroupByBuffer(), allocateUnlocked(), RowSetMemoryOwner(), setKernelMemoryAllocator(), and ~RowSetMemoryOwner().
|
private |
Definition at line 474 of file RowSetMemoryOwner.h.
Referenced by cloneStrDictDataOnly(), RowSetMemoryOwner(), and setKernelMemoryAllocator().
|
private |
Definition at line 452 of file RowSetMemoryOwner.h.
Referenced by addArray().
|
private |
Definition at line 463 of file RowSetMemoryOwner.h.
Referenced by addColBuffer(), and ~RowSetMemoryOwner().
|
private |
Definition at line 447 of file RowSetMemoryOwner.h.
Referenced by addCountDistinctBuffer().
|
private |
Definition at line 479 of file RowSetMemoryOwner.h.
Referenced by allocateCountDistinctBuffer(), initCountDistinctBufferAllocator(), RowSetMemoryOwner(), and setKernelMemoryAllocator().
|
private |
Definition at line 448 of file RowSetMemoryOwner.h.
Referenced by addCountDistinctSet(), and ~RowSetMemoryOwner().
|
private |
Definition at line 481 of file RowSetMemoryOwner.h.
Referenced by cloneStrDictDataOnly(), setKernelMemoryAllocator(), and ~RowSetMemoryOwner().
|
private |
Definition at line 461 of file RowSetMemoryOwner.h.
Referenced by addLiteralStringDictProxy(), cloneStrDictDataOnly(), and getLiteralStringDictProxy().
|
private |
Definition at line 472 of file RowSetMemoryOwner.h.
Referenced by allocateMode().
|
private |
Definition at line 449 of file RowSetMemoryOwner.h.
Referenced by allocateCachedGroupByBuffer(), clearNonOwnedGroupByBuffers(), and setKernelMemoryAllocator().
|
mutableprivate |
Definition at line 483 of file RowSetMemoryOwner.h.
Referenced by addArray(), addColBuffer(), addCountDistinctBuffer(), addCountDistinctSet(), addLiteralStringDictProxy(), addString(), addStringDict(), addStringProxyIntersectionTranslationMap(), addStringProxyUnionTranslationMap(), addVarlenBuffer(), addVarlenInputBuffer(), allocate(), allocateCachedGroupByBuffer(), allocateMode(), getLiteralStringDictProxy(), getStringDictProxy(), getStringOps(), and initCountDistinctBufferAllocator().
|
private |
Definition at line 454 of file RowSetMemoryOwner.h.
Referenced by addStringDict(), cloneStrDictDataOnly(), and getStringDictProxy().
|
private |
Definition at line 456 of file RowSetMemoryOwner.h.
Referenced by addStringProxyIntersectionTranslationMap().
|
private |
Definition at line 460 of file RowSetMemoryOwner.h.
Referenced by addStringProxyNumericTranslationMap().
|
private |
Definition at line 458 of file RowSetMemoryOwner.h.
Referenced by addStringProxyUnionTranslationMap().
|
private |
Definition at line 462 of file RowSetMemoryOwner.h.
Referenced by getStringDictionaryGenerations(), and setDictionaryGenerations().
|
private |
Definition at line 471 of file RowSetMemoryOwner.h.
Referenced by getStringOps().
|
private |
Definition at line 451 of file RowSetMemoryOwner.h.
Referenced by addString().
|
private |
Definition at line 467 of file RowSetMemoryOwner.h.
|
private |
Definition at line 468 of file RowSetMemoryOwner.h.
|
private |
Definition at line 486 of file RowSetMemoryOwner.h.
Referenced by getTableFunctionMetadata(), and setTableFunctionMetadata().
|
mutableprivate |
Definition at line 487 of file RowSetMemoryOwner.h.
Referenced by getTableFunctionMetadata(), and setTableFunctionMetadata().
|
private |
Definition at line 450 of file RowSetMemoryOwner.h.
Referenced by addVarlenBuffer(), and ~RowSetMemoryOwner().
|
private |
Definition at line 464 of file RowSetMemoryOwner.h.
Referenced by addVarlenInputBuffer(), and ~RowSetMemoryOwner().