OmniSciDB  085a039ca4
 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 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 
17 #pragma once
18 
22 
23 struct InputTableInfo;
25 class ColumnFetcher;
26 class Executor;
27 
29  public:
30  TableFunctionExecutionContext(std::shared_ptr<RowSetMemoryOwner> row_set_mem_owner)
31  : row_set_mem_owner_(row_set_mem_owner) {}
32 
33  // non-copyable
36 
38  const std::vector<InputTableInfo>& table_infos,
39  const std::shared_ptr<CompilationContext>& compilation_context,
40  const ColumnFetcher& column_fetcher,
41  const ExecutorDeviceType device_type,
42  Executor* executor,
43  bool is_pre_launch_udtf);
44 
45  private:
46  void launchPreCodeOnCpu(
47  const TableFunctionExecutionUnit& exe_unit,
48  const std::shared_ptr<CpuCompilationContext>& compilation_context,
49  std::vector<const int8_t*>& col_buf_ptrs,
50  std::vector<int64_t>& col_sizes,
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 };
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:260
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)