OmniSciDB  a5dc49c757
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
CpuCompilationContext Class Reference

#include <CompilationContext.h>

+ Inheritance diagram for CpuCompilationContext:
+ Collaboration diagram for CpuCompilationContext:

Public Types

using TableFunctionEntryPointPtr = int32_t(*)(const int8_t *mgr_ptr, const int8_t **input_cols, const int64_t *input_row_count, const int8_t **input_str_dict_proxy_ptrs, int64_t **out, int8_t **output_str_dict_proxy_ptrs, int64_t *output_row_count)
 

Public Member Functions

 CpuCompilationContext (ExecutionEngineWrapper &&execution_engine)
 
template<typename... Ts>
void call (Ts...args) const
 
const std::string & name () const
 
void setFunctionPointer (llvm::Function *function)
 
void * func () const
 
TableFunctionEntryPointPtr table_function_entry_point () const
 
size_t getMemSize () const
 
- Public Member Functions inherited from CompilationContext
virtual ~CompilationContext ()
 
size_t size () const
 

Private Attributes

void * func_ {nullptr}
 
std::string name_
 
ExecutionEngineWrapper execution_engine_
 

Detailed Description

Definition at line 63 of file CompilationContext.h.

Member Typedef Documentation

using CpuCompilationContext::TableFunctionEntryPointPtr = int32_t (*)(const int8_t* mgr_ptr, const int8_t** input_cols, const int64_t* input_row_count, const int8_t** input_str_dict_proxy_ptrs, int64_t** out, int8_t** output_str_dict_proxy_ptrs, int64_t* output_row_count)

Definition at line 90 of file CompilationContext.h.

Constructor & Destructor Documentation

CpuCompilationContext::CpuCompilationContext ( ExecutionEngineWrapper &&  execution_engine)
inline

Definition at line 65 of file CompilationContext.h.

66  : execution_engine_(std::move(execution_engine)) {}
ExecutionEngineWrapper execution_engine_

Member Function Documentation

template<typename... Ts>
void CpuCompilationContext::call ( Ts...  args) const
inline

Definition at line 69 of file CompilationContext.h.

References run_benchmark_import::args, and func_.

Referenced by QueryExecutionContext::launchCpuCode().

69  {
70  reinterpret_cast<void (*)(Ts...)>(func_)(args...);
71  }

+ Here is the caller graph for this function:

void* CpuCompilationContext::func ( ) const
inline

Definition at line 82 of file CompilationContext.h.

References func_.

82 { return func_; }
size_t CpuCompilationContext::getMemSize ( ) const
inlinevirtual

Implements CompilationContext.

Definition at line 95 of file CompilationContext.h.

95 { return 0; }
const std::string& CpuCompilationContext::name ( ) const
inline

Definition at line 73 of file CompilationContext.h.

References name_.

Referenced by QueryExecutionContext::launchCpuCode().

73 { return name_; }

+ Here is the caller graph for this function:

void CpuCompilationContext::setFunctionPointer ( llvm::Function *  function)
inline

Definition at line 75 of file CompilationContext.h.

References CHECK, execution_engine_, func_, and name_.

75  {
76  func_ = execution_engine_->getPointerToFunction(function);
77  CHECK(func_);
78  name_ = function->getName().str();
79  execution_engine_->removeModule(function->getParent());
80  }
ExecutionEngineWrapper execution_engine_
#define CHECK(condition)
Definition: Logger.h:291
TableFunctionEntryPointPtr CpuCompilationContext::table_function_entry_point ( ) const
inline

Definition at line 91 of file CompilationContext.h.

References func_.

91  {
93  }
int32_t(*)(const int8_t *mgr_ptr, const int8_t **input_cols, const int64_t *input_row_count, const int8_t **input_str_dict_proxy_ptrs, int64_t **out, int8_t **output_str_dict_proxy_ptrs, int64_t *output_row_count) TableFunctionEntryPointPtr

Member Data Documentation

ExecutionEngineWrapper CpuCompilationContext::execution_engine_
private

Definition at line 100 of file CompilationContext.h.

Referenced by setFunctionPointer().

void* CpuCompilationContext::func_ {nullptr}
private

Definition at line 98 of file CompilationContext.h.

Referenced by call(), func(), setFunctionPointer(), and table_function_entry_point().

std::string CpuCompilationContext::name_
private

Definition at line 99 of file CompilationContext.h.

Referenced by name(), and setFunctionPointer().


The documentation for this class was generated from the following file: