OmniSciDB
a5dc49c757
|
#include <StringDictionaryTranslationMgr.h>
Public Member Functions | |
StringDictionaryTranslationMgr (const shared::StringDictKey &source_string_dict_key, const shared::StringDictKey &dest_string_dict_key, const bool translate_intersection_only, const SQLTypeInfo &output_ti, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos, const Data_Namespace::MemoryLevel memory_level, const int device_count, Executor *executor, Data_Namespace::DataMgr *data_mgr, const bool delay_translation) | |
StringDictionaryTranslationMgr (const shared::StringDictKey &source_string_dict_key, const SQLTypeInfo &output_ti, const std::vector< StringOps_Namespace::StringOpInfo > &string_op_infos, const Data_Namespace::MemoryLevel memory_level, const int device_count, Executor *executor, Data_Namespace::DataMgr *data_mgr, const bool delay_translation) | |
~StringDictionaryTranslationMgr () | |
void | buildTranslationMap () |
void | createKernelBuffers () |
llvm::Value * | codegen (llvm::Value *str_id_input, const SQLTypeInfo &input_ti, const bool add_nullcheck, const CompilationOptions &co) const |
bool | isMapValid () const |
const int8_t * | data () const |
int32_t | minSourceStringId () const |
size_t | mapSize () const |
Private Attributes | |
const shared::StringDictKey | source_string_dict_key_ |
const shared::StringDictKey | dest_string_dict_key_ |
const bool | translate_intersection_only_ |
const SQLTypeInfo | output_ti_ |
const std::vector < StringOps_Namespace::StringOpInfo > | string_op_infos_ |
const bool | has_null_string_op_ |
const Data_Namespace::MemoryLevel | memory_level_ |
const int | device_count_ |
Executor * | executor_ |
Data_Namespace::DataMgr * | data_mgr_ |
const bool | dest_type_is_string_ |
const StringDictionaryProxy::IdMap *host_translation_map_ | nullptr |
const StringDictionaryProxy::TranslationMap < Datum > * | host_numeric_translation_map_ |
std::vector< const int8_t * > | kernel_translation_maps_ |
std::vector < Data_Namespace::AbstractBuffer * > | device_buffers_ |
Definition at line 48 of file StringDictionaryTranslationMgr.h.
StringDictionaryTranslationMgr::StringDictionaryTranslationMgr | ( | const shared::StringDictKey & | source_string_dict_key, |
const shared::StringDictKey & | dest_string_dict_key, | ||
const bool | translate_intersection_only, | ||
const SQLTypeInfo & | output_ti, | ||
const std::vector< StringOps_Namespace::StringOpInfo > & | string_op_infos, | ||
const Data_Namespace::MemoryLevel | memory_level, | ||
const int | device_count, | ||
Executor * | executor, | ||
Data_Namespace::DataMgr * | data_mgr, | ||
const bool | delay_translation | ||
) |
Definition at line 51 of file StringDictionaryTranslationMgr.cpp.
References buildTranslationMap(), CHECK, CHECK_EQ, Data_Namespace::CPU_LEVEL, createKernelBuffers(), Data_Namespace::GPU_LEVEL, has_null_string_op_, and memory_level_.
StringDictionaryTranslationMgr::StringDictionaryTranslationMgr | ( | const shared::StringDictKey & | source_string_dict_key, |
const SQLTypeInfo & | output_ti, | ||
const std::vector< StringOps_Namespace::StringOpInfo > & | string_op_infos, | ||
const Data_Namespace::MemoryLevel | memory_level, | ||
const int | device_count, | ||
Executor * | executor, | ||
Data_Namespace::DataMgr * | data_mgr, | ||
const bool | delay_translation | ||
) |
Definition at line 85 of file StringDictionaryTranslationMgr.cpp.
StringDictionaryTranslationMgr::~StringDictionaryTranslationMgr | ( | ) |
Definition at line 119 of file StringDictionaryTranslationMgr.cpp.
References CHECK, data_mgr_, device_buffers_, and Data_Namespace::DataMgr::free().
void StringDictionaryTranslationMgr::buildTranslationMap | ( | ) |
Definition at line 126 of file StringDictionaryTranslationMgr.cpp.
References dest_string_dict_key_, dest_type_is_string_, executor_, host_numeric_translation_map_, RowSetMemoryOwner::SOURCE_INTERSECTION, source_string_dict_key_, RowSetMemoryOwner::SOURCE_UNION, string_op_infos_, and translate_intersection_only_.
Referenced by StringDictionaryTranslationMgr().
llvm::Value * StringDictionaryTranslationMgr::codegen | ( | llvm::Value * | str_id_input, |
const SQLTypeInfo & | input_ti, | ||
const bool | add_nullcheck, | ||
const CompilationOptions & | co | ||
) | const |
Definition at line 171 of file StringDictionaryTranslationMgr.cpp.
References Parser::IntLiteral::analyzeValue(), AUTOMATIC_IR_METADATA, CHECK, CHECK_EQ, CHECK_GE, dest_type_is_string_, device_count_, CompilationOptions::device_type, executor_, SQLTypeInfo::get_notnull(), SQLTypeInfo::get_type(), GPU, Data_Namespace::GPU_LEVEL, has_null_string_op_, CompilationOptions::hoist_literals, kBIGINT, kBOOLEAN, kDATE, kDECIMAL, kDOUBLE, kENCODING_DICT, kENCODING_NONE, kernel_translation_maps_, kFLOAT, kINT, kNUMERIC, kSMALLINT, kTEXT, kTIME, kTIMESTAMP, kTINYINT, memory_level_, minSourceStringId(), output_ti_, to_lower(), and toString().
Referenced by CodeGenerator::codegen(), CodeGenerator::codegenCastFromString(), and CodeGenerator::codegenPseudoStringOper().
void StringDictionaryTranslationMgr::createKernelBuffers | ( | ) |
Definition at line 146 of file StringDictionaryTranslationMgr.cpp.
References CudaAllocator::allocGpuAbstractBuffer(), CHECK_EQ, copy_to_nvidia_gpu(), Data_Namespace::CPU_LEVEL, data(), data_mgr_, device_buffers_, device_count_, Data_Namespace::GPU_LEVEL, kernel_translation_maps_, mapSize(), and memory_level_.
Referenced by StringDictionaryTranslationMgr().
const int8_t * StringDictionaryTranslationMgr::data | ( | ) | const |
Definition at line 316 of file StringDictionaryTranslationMgr.cpp.
References StringDictionaryProxy::TranslationMap< T >::data(), dest_type_is_string_, host_numeric_translation_map_, and isMapValid().
Referenced by createKernelBuffers().
bool StringDictionaryTranslationMgr::isMapValid | ( | ) | const |
Definition at line 308 of file StringDictionaryTranslationMgr.cpp.
References dest_type_is_string_, StringDictionaryProxy::TranslationMap< T >::empty(), and host_numeric_translation_map_.
Referenced by data(), mapSize(), and minSourceStringId().
size_t StringDictionaryTranslationMgr::mapSize | ( | ) | const |
Definition at line 335 of file StringDictionaryTranslationMgr.cpp.
References dest_type_is_string_, SQLTypeInfo::get_logical_size(), StringDictionaryProxy::TranslationMap< T >::getVectorMap(), host_numeric_translation_map_, isMapValid(), and output_ti_.
Referenced by createKernelBuffers().
int32_t StringDictionaryTranslationMgr::minSourceStringId | ( | ) | const |
Definition at line 327 of file StringDictionaryTranslationMgr.cpp.
References dest_type_is_string_, StringDictionaryProxy::TranslationMap< T >::domainStart(), host_numeric_translation_map_, and isMapValid().
Referenced by codegen().
|
private |
Definition at line 95 of file StringDictionaryTranslationMgr.h.
Referenced by createKernelBuffers(), and ~StringDictionaryTranslationMgr().
|
private |
Definition at line 87 of file StringDictionaryTranslationMgr.h.
Referenced by buildTranslationMap().
|
private |
Definition at line 96 of file StringDictionaryTranslationMgr.h.
Referenced by buildTranslationMap(), codegen(), data(), isMapValid(), mapSize(), and minSourceStringId().
|
private |
Definition at line 101 of file StringDictionaryTranslationMgr.h.
Referenced by createKernelBuffers(), and ~StringDictionaryTranslationMgr().
|
private |
Definition at line 93 of file StringDictionaryTranslationMgr.h.
Referenced by codegen(), and createKernelBuffers().
|
private |
Definition at line 94 of file StringDictionaryTranslationMgr.h.
Referenced by buildTranslationMap(), and codegen().
|
private |
Definition at line 91 of file StringDictionaryTranslationMgr.h.
Referenced by codegen(), and StringDictionaryTranslationMgr().
|
private |
Definition at line 98 of file StringDictionaryTranslationMgr.h.
Referenced by buildTranslationMap(), data(), isMapValid(), mapSize(), and minSourceStringId().
|
private |
Definition at line 100 of file StringDictionaryTranslationMgr.h.
Referenced by codegen(), and createKernelBuffers().
|
private |
Definition at line 92 of file StringDictionaryTranslationMgr.h.
Referenced by codegen(), createKernelBuffers(), and StringDictionaryTranslationMgr().
|
private |
Definition at line 97 of file StringDictionaryTranslationMgr.h.
|
private |
Definition at line 89 of file StringDictionaryTranslationMgr.h.
|
private |
Definition at line 86 of file StringDictionaryTranslationMgr.h.
Referenced by buildTranslationMap().
|
private |
Definition at line 90 of file StringDictionaryTranslationMgr.h.
Referenced by buildTranslationMap().
|
private |
Definition at line 88 of file StringDictionaryTranslationMgr.h.
Referenced by buildTranslationMap().