OmniSciDB  06b3bd477c
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
QueryCompilationDescriptor.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019 OmniSci, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
24 #pragma once
25 
26 #include "QueryEngine/CgenState.h"
30 
32  std::shared_ptr<CompilationContext> generated_code;
33  std::unordered_map<int, CgenState::LiteralValues> literal_values;
35  std::string llvm_ir;
37 };
38 
40  public:
45 
46  std::unique_ptr<QueryMemoryDescriptor> compile(
47  const size_t max_groups_buffer_entry_guess,
48  const int8_t crt_min_byte_width,
49  const bool has_cardinality_estimation,
50  const RelAlgExecutionUnit& ra_exe_unit,
51  const std::vector<InputTableInfo>& table_infos,
52  const ColumnFetcher& column_fetcher,
53  const CompilationOptions& co,
54  const ExecutionOptions& eo,
55  RenderInfo* render_info,
56  Executor* executor);
57 
58  auto getCompilationResult() const { return compilation_result_; }
59 
60  std::string getIR() const {
61  switch (compilation_device_type_) {
63  return std::string{"IR for the CPU:\n===============\n" +
65  }
67  return std::string{"IR for the GPU:\n===============\n" +
69  }
70  }
71  UNREACHABLE();
72  return "";
73  }
74 
76  bool hoistLiterals() const { return hoist_literals_; }
77  int8_t getMinByteWidth() const { return actual_min_byte_width_; }
78 
79  private:
84 };
ExecutorDeviceType getDeviceType() const
ExecutorDeviceType
GpuSharedMemoryContext gpu_smem_context
#define UNREACHABLE()
Definition: Logger.h:241
std::shared_ptr< CompilationContext > generated_code
std::unique_ptr< QueryMemoryDescriptor > 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)
std::unordered_map< int, CgenState::LiteralValues > literal_values
bool g_enable_watchdog false
Definition: Execute.cpp:74
constexpr int8_t MAX_BYTE_WIDTH_SUPPORTED