OmniSciDB  04ee39c94c
QueryCompilationDescriptor Class Reference

#include <QueryCompilationDescriptor.h>

+ Collaboration diagram for QueryCompilationDescriptor:

Public Member Functions

 QueryCompilationDescriptor ()
 
std::unique_ptr< QueryMemoryDescriptorcompile (const size_t max_groups_buffer_entry_guess, const int8_t crt_min_byte_width, const bool has_cardinality_estimation, const RelAlgExecutionUnit &ra_exe_unit, const std::vector< InputTableInfo > &table_infos, const ColumnFetcher &column_fetcher, const CompilationOptions &co, const ExecutionOptions &eo, RenderInfo *render_info, Executor *executor)
 
auto getCompilationResult () const
 
std::string getIR () const
 
ExecutorDeviceType getDeviceType () const
 
bool hoistLiterals () const
 
int8_t getMinByteWidth () const
 

Private Attributes

Executor::CompilationResult compilation_result_
 
ExecutorDeviceType compilation_device_type_
 
bool hoist_literals_
 
int8_t actual_min_byte_width_
 

Detailed Description

Definition at line 29 of file QueryCompilationDescriptor.h.

Constructor & Destructor Documentation

◆ QueryCompilationDescriptor()

QueryCompilationDescriptor::QueryCompilationDescriptor ( )
inline

Definition at line 31 of file QueryCompilationDescriptor.h.

References compile().

+ Here is the call graph for this function:

Member Function Documentation

◆ compile()

std::unique_ptr< QueryMemoryDescriptor > QueryCompilationDescriptor::compile ( const size_t  max_groups_buffer_entry_guess,
const int8_t  crt_min_byte_width,
const bool  has_cardinality_estimation,
const RelAlgExecutionUnit ra_exe_unit,
const std::vector< InputTableInfo > &  table_infos,
const ColumnFetcher column_fetcher,
const CompilationOptions co,
const ExecutionOptions eo,
RenderInfo render_info,
Executor executor 
)

Definition at line 19 of file QueryCompilationDescriptor.cpp.

References actual_min_byte_width_, CHECK, ColumnFetcher::columnarized_table_cache_, compilation_device_type_, compilation_result_, CompilationOptions::device_type_, CompilationOptions::hoist_literals_, hoist_literals_, RenderInfo::isPotentialInSituRender(), and MAX_BYTE_WIDTH_SUPPORTED.

Referenced by QueryCompilationDescriptor().

29  {
32  CHECK(executor);
33  std::unique_ptr<QueryMemoryDescriptor> query_mem_desc;
34  const auto cat = executor->getCatalog();
35  try {
36  std::tie(compilation_result_, query_mem_desc) = executor->compileWorkUnit(
37  table_infos,
38  ra_exe_unit,
39  co,
40  eo,
41  cat->getDataMgr().getCudaMgr(),
42  render_info && render_info->isPotentialInSituRender() ? false : true,
43  executor->row_set_mem_owner_,
44  max_groups_buffer_entry_guess,
45  crt_min_byte_width,
46  has_cardinality_estimation,
47  column_fetcher.columnarized_table_cache_,
48  render_info);
49  } catch (const CompilationRetryNoLazyFetch&) {
50  if (executor->cgen_state_->module_) {
51  delete executor->cgen_state_->module_;
52  }
53  std::tie(compilation_result_, query_mem_desc) =
54  executor->compileWorkUnit(table_infos,
55  ra_exe_unit,
56  co,
57  eo,
58  cat->getDataMgr().getCudaMgr(),
59  false,
60  executor->row_set_mem_owner_,
61  max_groups_buffer_entry_guess,
62  crt_min_byte_width,
63  has_cardinality_estimation,
64  column_fetcher.columnarized_table_cache_,
65  render_info);
66  }
68  std::max(query_mem_desc->updateActualMinByteWidth(MAX_BYTE_WIDTH_SUPPORTED),
69  crt_min_byte_width);
70  return query_mem_desc;
71 }
ColumnCacheMap columnarized_table_cache_
Definition: ColumnFetcher.h:79
Executor::CompilationResult compilation_result_
bool isPotentialInSituRender() const
Definition: RenderInfo.cpp:55
ExecutorDeviceType device_type_
#define CHECK(condition)
Definition: Logger.h:187
constexpr int8_t MAX_BYTE_WIDTH_SUPPORTED
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCompilationResult()

auto QueryCompilationDescriptor::getCompilationResult ( ) const
inline

Definition at line 48 of file QueryCompilationDescriptor.h.

References compilation_result_.

Referenced by Executor::ExecutionDispatch::runImpl().

48 { return compilation_result_; }
Executor::CompilationResult compilation_result_
+ Here is the caller graph for this function:

◆ getDeviceType()

ExecutorDeviceType QueryCompilationDescriptor::getDeviceType ( ) const
inline

Definition at line 65 of file QueryCompilationDescriptor.h.

References compilation_device_type_.

Referenced by Executor::dispatchFragments().

65 { return compilation_device_type_; }
+ Here is the caller graph for this function:

◆ getIR()

std::string QueryCompilationDescriptor::getIR ( ) const
inline

Definition at line 50 of file QueryCompilationDescriptor.h.

References compilation_device_type_, compilation_result_, CPU, GPU, Executor::CompilationResult::llvm_ir, and UNREACHABLE.

Referenced by Executor::executeExplain().

50  {
51  switch (compilation_device_type_) {
53  return std::string{"IR for the CPU:\n===============\n" +
55  }
57  return std::string{"IR for the GPU:\n===============\n" +
59  }
60  }
61  UNREACHABLE();
62  return "";
63  }
#define UNREACHABLE()
Definition: Logger.h:231
Executor::CompilationResult compilation_result_
+ Here is the caller graph for this function:

◆ getMinByteWidth()

int8_t QueryCompilationDescriptor::getMinByteWidth ( ) const
inline

◆ hoistLiterals()

bool QueryCompilationDescriptor::hoistLiterals ( ) const
inline

Definition at line 66 of file QueryCompilationDescriptor.h.

References hoist_literals_.

Referenced by Executor::ExecutionDispatch::runImpl().

+ Here is the caller graph for this function:

Member Data Documentation

◆ actual_min_byte_width_

int8_t QueryCompilationDescriptor::actual_min_byte_width_
private

Definition at line 73 of file QueryCompilationDescriptor.h.

Referenced by compile(), and getMinByteWidth().

◆ compilation_device_type_

ExecutorDeviceType QueryCompilationDescriptor::compilation_device_type_
private

Definition at line 71 of file QueryCompilationDescriptor.h.

Referenced by compile(), getDeviceType(), and getIR().

◆ compilation_result_

Executor::CompilationResult QueryCompilationDescriptor::compilation_result_
private

Definition at line 70 of file QueryCompilationDescriptor.h.

Referenced by compile(), getCompilationResult(), and getIR().

◆ hoist_literals_

bool QueryCompilationDescriptor::hoist_literals_
private

Definition at line 72 of file QueryCompilationDescriptor.h.

Referenced by compile(), and hoistLiterals().


The documentation for this class was generated from the following files: