OmniSciDB
cde582ebc3
|
#include <StringDictionaryTranslationMgr.h>
Public Member Functions | |
StringDictionaryTranslationMgr (const int32_t source_string_dict_id, const int32_t dest_string_dict_id, const bool translate_intersection_only, 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 int32_t * | data () const |
int32_t | minSourceStringId () const |
Private Attributes | |
const int32_t | source_string_dict_id_ |
const int32_t | dest_string_dict_id_ |
const bool | translate_intersection_only_ |
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 StringDictionaryProxy::IdMap *host_translation_map_ | nullptr |
std::vector< const int32_t * > | kernel_translation_maps_ |
std::vector < Data_Namespace::AbstractBuffer * > | device_buffers_ |
Definition at line 47 of file StringDictionaryTranslationMgr.h.
StringDictionaryTranslationMgr::StringDictionaryTranslationMgr | ( | const int32_t | source_string_dict_id, |
const int32_t | dest_string_dict_id, | ||
const bool | translate_intersection_only, | ||
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 50 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 | ( | ) |
Definition at line 81 of file StringDictionaryTranslationMgr.cpp.
References CHECK, data_mgr_, device_buffers_, and Data_Namespace::DataMgr::free().
void StringDictionaryTranslationMgr::buildTranslationMap | ( | ) |
Definition at line 88 of file StringDictionaryTranslationMgr.cpp.
References dest_string_dict_id_, executor_, RowSetMemoryOwner::SOURCE_INTERSECTION, source_string_dict_id_, 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 126 of file StringDictionaryTranslationMgr.cpp.
References Parser::IntLiteral::analyzeValue(), AUTOMATIC_IR_METADATA, CHECK, CHECK_EQ, CHECK_GE, device_count_, CompilationOptions::device_type, executor_, SQLTypeInfo::get_notnull(), GPU, Data_Namespace::GPU_LEVEL, has_null_string_op_, CompilationOptions::hoist_literals, kENCODING_DICT, kENCODING_NONE, kernel_translation_maps_, kTEXT, memory_level_, and minSourceStringId().
Referenced by CodeGenerator::codegen(), CodeGenerator::codegenCastFromString(), and CodeGenerator::codegenPseudoStringOper().
void StringDictionaryTranslationMgr::createKernelBuffers | ( | ) |
Definition at line 100 of file StringDictionaryTranslationMgr.cpp.
References CudaAllocator::allocGpuAbstractBuffer(), CHECK_EQ, copy_to_nvidia_gpu(), Data_Namespace::CPU_LEVEL, data_mgr_, device_buffers_, device_count_, Data_Namespace::GPU_LEVEL, kernel_translation_maps_, and memory_level_.
Referenced by StringDictionaryTranslationMgr().
const int32_t * StringDictionaryTranslationMgr::data | ( | ) | const |
Definition at line 231 of file StringDictionaryTranslationMgr.cpp.
References isMapValid().
bool StringDictionaryTranslationMgr::isMapValid | ( | ) | const |
Definition at line 227 of file StringDictionaryTranslationMgr.cpp.
Referenced by data(), and minSourceStringId().
int32_t StringDictionaryTranslationMgr::minSourceStringId | ( | ) | const |
Definition at line 235 of file StringDictionaryTranslationMgr.cpp.
References isMapValid().
Referenced by codegen().
|
private |
Definition at line 81 of file StringDictionaryTranslationMgr.h.
Referenced by createKernelBuffers(), and ~StringDictionaryTranslationMgr().
|
private |
Definition at line 74 of file StringDictionaryTranslationMgr.h.
Referenced by buildTranslationMap().
|
private |
Definition at line 84 of file StringDictionaryTranslationMgr.h.
Referenced by createKernelBuffers(), and ~StringDictionaryTranslationMgr().
|
private |
Definition at line 79 of file StringDictionaryTranslationMgr.h.
Referenced by codegen(), and createKernelBuffers().
|
private |
Definition at line 80 of file StringDictionaryTranslationMgr.h.
Referenced by buildTranslationMap(), and codegen().
|
private |
Definition at line 77 of file StringDictionaryTranslationMgr.h.
Referenced by codegen(), and StringDictionaryTranslationMgr().
|
private |
Definition at line 83 of file StringDictionaryTranslationMgr.h.
Referenced by codegen(), and createKernelBuffers().
|
private |
Definition at line 78 of file StringDictionaryTranslationMgr.h.
Referenced by codegen(), createKernelBuffers(), and StringDictionaryTranslationMgr().
|
private |
Definition at line 82 of file StringDictionaryTranslationMgr.h.
|
private |
Definition at line 73 of file StringDictionaryTranslationMgr.h.
Referenced by buildTranslationMap().
|
private |
Definition at line 76 of file StringDictionaryTranslationMgr.h.
Referenced by buildTranslationMap().
|
private |
Definition at line 75 of file StringDictionaryTranslationMgr.h.
Referenced by buildTranslationMap().