OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
TableFunctionExecutionContext.h
Go to the documentation of this file.
1 /*
2  * Copyright 2022 HEAVY.AI, 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 #pragma once
17 
21 
22 struct InputTableInfo;
24 class ColumnFetcher;
25 class Executor;
26 
28  public:
29  TableFunctionExecutionContext(std::shared_ptr<RowSetMemoryOwner> row_set_mem_owner)
30  : row_set_mem_owner_(row_set_mem_owner) {}
31 
32  // non-copyable
35 
37  const std::vector<InputTableInfo>& table_infos,
38  const std::shared_ptr<CompilationContext>& compilation_context,
39  const ColumnFetcher& column_fetcher,
40  const ExecutorDeviceType device_type,
41  Executor* executor,
42  bool is_pre_launch_udtf);
43 
44  private:
45  void launchPreCodeOnCpu(
46  const TableFunctionExecutionUnit& exe_unit,
47  const std::shared_ptr<CpuCompilationContext>& compilation_context,
48  std::vector<const int8_t*>& col_buf_ptrs,
49  std::vector<int64_t>& col_sizes,
50  std::vector<const int8_t*>& input_str_dict_proxy_ptrs,
51  const size_t elem_count,
52  Executor* executor);
53 
55  const TableFunctionExecutionUnit& exe_unit,
56  const std::shared_ptr<CpuCompilationContext>& compilation_context,
57  std::vector<const int8_t*>& col_buf_ptrs,
58  std::vector<int64_t>& col_sizes,
59  std::vector<const int8_t*>& input_str_dict_proxy_ptrs,
60  const size_t elem_count,
61  std::vector<int8_t*>& output_str_dict_proxy_ptrs,
62  Executor* executor);
63 
65  const TableFunctionExecutionUnit& exe_unit,
66  const std::shared_ptr<GpuCompilationContext>& compilation_context,
67  std::vector<const int8_t*>& col_buf_ptrs,
68  std::vector<int64_t>& col_sizes,
69  std::vector<const int8_t*>& input_str_dict_proxy_ptrs,
70  const size_t elem_count,
71  std::vector<int8_t*>& output_str_dict_proxy_ptrs,
72  const int device_id,
73  Executor* executor);
74 
75  std::shared_ptr<RowSetMemoryOwner> row_set_mem_owner_;
76 };
std::shared_ptr< ResultSet > ResultSetPtr
ExecutorDeviceType
std::shared_ptr< RowSetMemoryOwner > row_set_mem_owner_
TableFunctionExecutionContext & operator=(const TableFunctionExecutionContext &)=delete
Executor(const ExecutorId id, Data_Namespace::DataMgr *data_mgr, const size_t block_size_x, const size_t grid_size_x, const size_t max_gpu_slab_size, const std::string &debug_dir, const std::string &debug_file)
Definition: Execute.cpp:272
ResultSetPtr launchCpuCode(const TableFunctionExecutionUnit &exe_unit, const std::shared_ptr< CpuCompilationContext > &compilation_context, std::vector< const int8_t * > &col_buf_ptrs, std::vector< int64_t > &col_sizes, std::vector< const int8_t * > &input_str_dict_proxy_ptrs, const size_t elem_count, std::vector< int8_t * > &output_str_dict_proxy_ptrs, Executor *executor)
ResultSetPtr execute(const TableFunctionExecutionUnit &exe_unit, const std::vector< InputTableInfo > &table_infos, const std::shared_ptr< CompilationContext > &compilation_context, const ColumnFetcher &column_fetcher, const ExecutorDeviceType device_type, Executor *executor, bool is_pre_launch_udtf)
void launchPreCodeOnCpu(const TableFunctionExecutionUnit &exe_unit, const std::shared_ptr< CpuCompilationContext > &compilation_context, std::vector< const int8_t * > &col_buf_ptrs, std::vector< int64_t > &col_sizes, std::vector< const int8_t * > &input_str_dict_proxy_ptrs, const size_t elem_count, Executor *executor)
Execution unit for relational algebra. It&#39;s a low-level description of any relational algebra operati...
TableFunctionExecutionContext(std::shared_ptr< RowSetMemoryOwner > row_set_mem_owner)
ResultSetPtr launchGpuCode(const TableFunctionExecutionUnit &exe_unit, const std::shared_ptr< GpuCompilationContext > &compilation_context, std::vector< const int8_t * > &col_buf_ptrs, std::vector< int64_t > &col_sizes, std::vector< const int8_t * > &input_str_dict_proxy_ptrs, const size_t elem_count, std::vector< int8_t * > &output_str_dict_proxy_ptrs, const int device_id, Executor *executor)