OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ResultSetReductionInterpreterStubs.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 
17 #pragma once
18 
19 #include "NvidiaKernel.h"
21 #include "ResultSetReductionJIT.h"
22 
23 // Generates wrappers of runtime functions with fixed signature which can be used from the
24 // interpreter.
26  public:
27  // output_handle is ReductionInterpreter::EvalValue*, inputs_handle is a
28  // std::vector<ReductionInterpreter::EvalValue>*.
29  using Stub = ReductionInterpreter::EvalValue (*)(void* output_handle,
30  const void* inputs_handle);
31  using InputsType = std::vector<ReductionInterpreter::EvalValue>;
32 
33  static Stub generateStub(const size_t executor_id,
34  const std::string& name,
35  const std::vector<Type>& arg_types,
36  const Type ret_type,
37  const bool is_external);
38 };
39 
40 bool is_integer_type(const Type type);
41 bool is_pointer_type(const Type type);
std::vector< ReductionInterpreter::EvalValue > InputsType
static Stub generateStub(const size_t executor_id, const std::string &name, const std::vector< Type > &arg_types, const Type ret_type, const bool is_external)
ReductionInterpreter::EvalValue(*)(void *output_handle, const void *inputs_handle) Stub
bool is_pointer_type(const Type type)
string name
Definition: setup.in.py:72
bool is_integer_type(const Type type)