OmniSciDB  c0231cc57d
 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  const size_t elem_count,
51  Executor* executor);
52 
54  const TableFunctionExecutionUnit& exe_unit,
55  const std::shared_ptr<CpuCompilationContext>& compilation_context,
56  std::vector<const int8_t*>& col_buf_ptrs,
57  std::vector<int64_t>& col_sizes,
58  std::vector<const int8_t*>& input_str_dict_proxy_ptrs,
59  const size_t elem_count,
60  std::vector<int8_t*>& output_str_dict_proxy_ptrs,
61  Executor* executor);
62 
64  const TableFunctionExecutionUnit& exe_unit,
65  const std::shared_ptr<GpuCompilationContext>& compilation_context,
66  std::vector<const int8_t*>& col_buf_ptrs,
67  std::vector<int64_t>& col_sizes,
68  std::vector<const int8_t*>& input_str_dict_proxy_ptrs,
69  const size_t elem_count,
70  std::vector<int8_t*>& output_str_dict_proxy_ptrs,
71  const int device_id,
72  Executor* executor);
73 
74  std::shared_ptr<RowSetMemoryOwner> row_set_mem_owner_;
75 };
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, const size_t elem_count, Executor *executor)
ExecutorDeviceType
std::shared_ptr< ResultSet > ResultSetPtr
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:244
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)
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)