OmniSciDB  085a039ca4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CompilationOptions.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 MapD Technologies, 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 
17 #ifndef QUERYENGINE_COMPILATIONOPTIONS_H
18 #define QUERYENGINE_COMPILATIONOPTIONS_H
19 
20 #include <vector>
21 #ifndef __CUDACC__
22 #include <ostream>
23 #endif
24 
25 enum class ExecutorDeviceType { CPU = 0, GPU };
26 #ifndef __CUDACC__
27 inline std::ostream& operator<<(std::ostream& os, ExecutorDeviceType const dt) {
28  constexpr char const* strings[]{"CPU", "GPU"};
29  return os << strings[static_cast<int>(dt)];
30 }
31 #endif
32 
34 
36 
38 
45  bool filter_on_deleted_column{true}; // if false, ignore the delete column during table
46  // scans. Primarily disabled for delete queries.
49 
52  in.hoist_literals,
53  in.opt_level,
57  in.explain_type,
59  }
60 
64  /*hoist_literals=*/true,
65  /*opt_level=*/ExecutorOptLevel::Default,
66  /*with_dynamic_watchdog=*/false,
67  /*allow_lazy_fetch=*/true,
68  /*filter_on_delted_column=*/true,
69  /*explain_type=*/ExecutorExplainType::Default,
70  /*register_intel_jit_listener=*/false};
71  }
72 };
73 
75 
80  bool just_explain; // return the generated IR for the first step
82  bool with_watchdog; // Per work unit, not global.
83  bool jit_debug;
85  bool with_dynamic_watchdog; // Per work unit, not global.
86  unsigned dynamic_watchdog_time_limit; // Dynamic watchdog time limit, in milliseconds.
89  double gpu_input_mem_limit_percent; // punt to CPU if input memory exceeds this
94  std::vector<size_t> outer_fragment_indices{};
95 
97  return ExecutionOptions{/*output_columnar_hint=*/false,
98  /*keep_result=*/false,
99  /*allow_multifrag=*/true,
100  /*just_explain=*/false,
101  /*allow_loop_joins=*/false,
102  /*with_watchdog=*/true,
103  /*jit_debug=*/false,
104  /*just_validate=*/false,
105  /*with_dynamic_watchdog=*/false,
106  /*dynamic_watchdog_time_limit=*/0,
107  /*find_push_down_candidates=*/false,
108  /*just_calcite_explain=*/false,
109  /*=gpu_input_mem_limit_percent=*/1.0,
110  /*allow_runtime_query_interrupt=*/false,
111  /*running_query_interrupt_freq=*/0.5,
112  /*pending_query_interrupt_freq=*/1000};
113  }
114 };
115 
116 #endif // QUERYENGINE_COMPILATIONOPTIONS_H
ExecutorDeviceType
std::vector< size_t > outer_fragment_indices
std::ostream & operator<<(std::ostream &os, const SessionInfo &session_info)
Definition: SessionInfo.cpp:57
ExecutorOptLevel opt_level
double running_query_interrupt_freq
ExecutorOptLevel
ExecutorDispatchMode
ExecutorType
static CompilationOptions makeCpuOnly(const CompilationOptions &in)
ExecutorType executor_type
ExecutorExplainType explain_type
unsigned pending_query_interrupt_freq
ExecutorDeviceType device_type
static CompilationOptions defaults(const ExecutorDeviceType device_type=ExecutorDeviceType::GPU)
double gpu_input_mem_limit_percent
unsigned dynamic_watchdog_time_limit
static ExecutionOptions defaults()
ExecutorExplainType