OmniSciDB  c07336695a
ReductionCode Struct Reference

#include <ResultSetReductionJIT.h>

+ Collaboration diagram for ReductionCode:

Public Types

using FuncPtr = int32_t(*)(int8_t *this_buff, const int8_t *that_buff, const int32_t start_entry_index, const int32_t end_entry_index, const int32_t that_entry_count, const void *this_qmd, const void *that_qmd, const void *serialized_varlen_buffer)
 

Public Member Functions

 ReductionCode (ReductionCode &&)=default
 
 ~ReductionCode ()
 

Public Attributes

std::unique_ptr< CgenStatecgen_state
 
llvm::ExecutionEngine * execution_engine
 
ExecutionEngineWrapper own_execution_engine
 
std::unique_ptr< llvm::Module > module
 
llvm::Function * ir_is_empty
 
llvm::Function * ir_reduce_one_entry
 
llvm::Function * ir_reduce_one_entry_idx
 
llvm::Function * ir_reduce_loop
 
FuncPtr func_ptr
 

Static Public Attributes

static std::mutex s_reduction_mutex
 

Detailed Description

Definition at line 29 of file ResultSetReductionJIT.h.

Member Typedef Documentation

◆ FuncPtr

using ReductionCode::FuncPtr = int32_t (*)(int8_t* this_buff, const int8_t* that_buff, const int32_t start_entry_index, const int32_t end_entry_index, const int32_t that_entry_count, const void* this_qmd, const void* that_qmd, const void* serialized_varlen_buffer)

Definition at line 52 of file ResultSetReductionJIT.h.

Constructor & Destructor Documentation

◆ ReductionCode()

ReductionCode::ReductionCode ( ReductionCode &&  )
default

◆ ~ReductionCode()

ReductionCode::~ReductionCode ( )
inline

Definition at line 32 of file ResultSetReductionJIT.h.

References cgen_state, func_ptr, ExecutionEngineWrapper::get(), module, own_execution_engine, and s_reduction_mutex.

32  {
33  // We only need to worry about races for the interpreter, which owns the execution
34  // engine and has a null native function pointer.
35  if (own_execution_engine.get() && !func_ptr) {
36  std::lock_guard<std::mutex> reduction_guard(ReductionCode::s_reduction_mutex);
37  cgen_state = nullptr;
38  module = nullptr;
40  }
41  }
std::unique_ptr< CgenState > cgen_state
llvm::ExecutionEngine * get()
Definition: CodeCache.h:45
static std::mutex s_reduction_mutex
ExecutionEngineWrapper own_execution_engine
std::unique_ptr< llvm::Module > module
+ Here is the call graph for this function:

Member Data Documentation

◆ cgen_state

◆ execution_engine

llvm::ExecutionEngine* ReductionCode::execution_engine

◆ func_ptr

◆ ir_is_empty

◆ ir_reduce_loop

◆ ir_reduce_one_entry

◆ ir_reduce_one_entry_idx

◆ module

std::unique_ptr<llvm::Module> ReductionCode::module

◆ own_execution_engine

ExecutionEngineWrapper ReductionCode::own_execution_engine

◆ s_reduction_mutex

std::mutex ReductionCode::s_reduction_mutex
static

The documentation for this struct was generated from the following files: