mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Public Types | Static Public Member Functions | Private Types | Static Private Member Functions
m::wasm::Aggregation Struct Reference

#include <WasmOperator.hpp>

Inheritance diagram for m::wasm::Aggregation:
[legend]
Collaboration diagram for m::wasm::Aggregation:
[legend]

Public Types

using pattern = Pattern
 

Static Public Member Functions

static void execute (const Match< Aggregation > &M, setup_t setup, pipeline_t pipeline, teardown_t teardown)
 
static double cost (const Match< Aggregation > &)
 
static ConditionSet pre_condition (std::size_t child_idx, const std::tuple< const AggregationOperator * > &partial_inner_nodes)
 
static ConditionSet post_condition (const Match< Aggregation > &M)
 
static void execute (const Match< Actual > &M, setup_t setup, pipeline_t pipeline, teardown_t teardown)
 Executes this physical operator given the match M and three callbacks: Setup for some initializations, Pipeline for the actual computation, and Teardown for post-processing.
 
static double cost (const Match< Actual > &M)
 Returns the cost of this physical operator given the match M.
 
static ConditionSet pre_condition (std::size_t, const get_nodes_t< Pattern > &)
 Overwrite this to implement custom pre-conditions.
 
static ConditionSet post_condition (const Match< Actual > &)
 Overwrite this to implement a custom post-condition.
 
static ConditionSet adapt_post_condition (const Match< Actual > &, const ConditionSet &post_cond_child)
 Overwrite this to implement custom adaptation of a single post-condition.
 
static ConditionSet adapt_post_conditions (const Match< Actual > &, std::vector< std::reference_wrapper< const ConditionSet > > &&)
 Overwrite this to implement custom adaptation of multiple post-conditions.
 
static std::unique_ptr< Match< Actual > > instantiate (get_nodes_t< Pattern > inner_nodes, const std::vector< It > &children)
 Instantiates this physical operator given the matched logical operators inner_nodes in pre-order and the children entries children by returning a corresponding match.
 

Private Types

template<bool IsGlobal, typename T >
using var_t_ = std::conditional_t< IsGlobal, Global< T >, Var< T > >
 
template<bool IsGlobal, std::size_t L>
using agg_t_ = std::variant< var_t_< IsGlobal, I64< L > >, std::pair< var_t_< IsGlobal, I8< L > >, var_t_< IsGlobal, Bool< L > > >, std::pair< var_t_< IsGlobal, I16< L > >, var_t_< IsGlobal, Bool< L > > >, std::pair< var_t_< IsGlobal, I32< L > >, var_t_< IsGlobal, Bool< L > > >, std::pair< var_t_< IsGlobal, I64< L > >, var_t_< IsGlobal, Bool< L > > >, std::pair< var_t_< IsGlobal, Float< L > >, var_t_< IsGlobal, Bool< L > > >, std::pair< var_t_< IsGlobal, Double< L > >, var_t_< IsGlobal, Bool< L > > > >
 

Static Private Member Functions

static ConditionSet pre_condition_ (std::size_t child_idx, const get_nodes_t< Pattern > &partial_inner_nodes)
 Returns the pre-condition for the child_idx-th child (indexed from left to right starting with 0) of the pattern (note that children are logical operators which either match to a Wildcard in the pattern or to a child of a non-wildcard operator in the pattern, i.e.
 
static ConditionSet post_condition_ (const Match< Actual > &M)
 Returns the post-condition of this physical operator given the match M.
 
static ConditionSet adapt_post_condition_ (const Match< Actual > &M, const ConditionSet &post_cond_child)
 Returns the adapted post-condition of this physical operator given the match M and the former post-condition of its only child.
 
static ConditionSet adapt_post_conditions_ (const Match< Actual > &M, std::vector< std::reference_wrapper< const ConditionSet > > &&post_cond_children)
 Returns the adapted post-condition of this physical operator given the match M and the former post-conditions of its children.
 

Detailed Description

Definition at line 478 of file WasmOperator.hpp.

Member Typedef Documentation

◆ agg_t_

template<bool IsGlobal, std::size_t L>
using m::wasm::Aggregation::agg_t_ = std::variant< var_t_<IsGlobal, I64<L> >, std::pair<var_t_<IsGlobal, I8<L> >, var_t_<IsGlobal, Bool<L> >>, std::pair<var_t_<IsGlobal, I16<L> >, var_t_<IsGlobal, Bool<L> >>, std::pair<var_t_<IsGlobal, I32<L> >, var_t_<IsGlobal, Bool<L> >>, std::pair<var_t_<IsGlobal, I64<L> >, var_t_<IsGlobal, Bool<L> >>, std::pair<var_t_<IsGlobal, Float<L> >, var_t_<IsGlobal, Bool<L> >>, std::pair<var_t_<IsGlobal, Double<L> >, var_t_<IsGlobal, Bool<L> >> >
private

Definition at line 484 of file WasmOperator.hpp.

◆ pattern

using m::PhysicalOperator::pattern = Pattern
inherited

Definition at line 414 of file PhysicalOptimizer.hpp.

◆ var_t_

template<bool IsGlobal, typename T >
using m::wasm::Aggregation::var_t_ = std::conditional_t<IsGlobal, Global<T>, Var<T> >
private

Definition at line 482 of file WasmOperator.hpp.

Member Function Documentation

◆ adapt_post_condition()

static ConditionSet m::PhysicalOperator::adapt_post_condition ( const Match< Actual > &  ,
const ConditionSet post_cond_child 
)
inlinestaticinherited

Overwrite this to implement custom adaptation of a single post-condition.

Definition at line 461 of file PhysicalOptimizer.hpp.

◆ adapt_post_condition_()

static ConditionSet m::PhysicalOperator::adapt_post_condition_ ( const Match< Actual > &  M,
const ConditionSet post_cond_child 
)
inlinestaticprivateinherited

Returns the adapted post-condition of this physical operator given the match M and the former post-condition of its only child.

Definition at line 448 of file PhysicalOptimizer.hpp.

◆ adapt_post_conditions()

static ConditionSet m::PhysicalOperator::adapt_post_conditions ( const Match< Actual > &  ,
std::vector< std::reference_wrapper< const ConditionSet > > &&   
)
inlinestaticinherited

Overwrite this to implement custom adaptation of multiple post-conditions.

Definition at line 465 of file PhysicalOptimizer.hpp.

◆ adapt_post_conditions_()

static ConditionSet m::PhysicalOperator::adapt_post_conditions_ ( const Match< Actual > &  M,
std::vector< std::reference_wrapper< const ConditionSet > > &&  post_cond_children 
)
inlinestaticprivateinherited

Returns the adapted post-condition of this physical operator given the match M and the former post-conditions of its children.

Definition at line 454 of file PhysicalOptimizer.hpp.

◆ cost() [1/2]

static double m::PhysicalOperator::cost ( const Match< Actual > &  M)
inlinestaticinherited

Returns the cost of this physical operator given the match M.

Definition at line 423 of file PhysicalOptimizer.hpp.

◆ cost() [2/2]

static double m::wasm::Aggregation::cost ( const Match< Aggregation > &  )
inlinestatic

Definition at line 496 of file WasmOperator.hpp.

◆ execute() [1/2]

static void m::PhysicalOperator::execute ( const Match< Actual > &  M,
setup_t  setup,
pipeline_t  pipeline,
teardown_t  teardown 
)
inlinestaticinherited

Executes this physical operator given the match M and three callbacks: Setup for some initializations, Pipeline for the actual computation, and Teardown for post-processing.

Definition at line 418 of file PhysicalOptimizer.hpp.

◆ execute() [2/2]

void Aggregation::execute ( const Match< Aggregation > &  M,
setup_t  setup,
pipeline_t  pipeline,
teardown_t  teardown 
)
static

< stores result tuple

‍code to construct aggregates from SIMD vectors; must be emitted after the child pipeline is executed

< to insist that setup, pipeline, and teardown callbacks use the same value

< local values of the computed aggregates

< global value backups of the computed aggregates

< flag to indicate whether aggregate function is MIN

< flag to indicate whether aggregate function is MIN

< flag to indicate whether aggregate function is MIN

Definition at line 3738 of file WasmOperator.cpp.

References m::wasm::Environment::add(), m::wasm::and, m::wasm::can_be_null(), compute_aggregate_info(), m::wasm::discard(), m::wasm::CodeGenContext::env(), m::wasm::Environment::extract_predicate(), FUNCTION, m::wasm::CodeGenContext::Get(), m::wasm::Environment::get(), IF, m::wasm::is_null(), m::wasm::L, M_insist, M_insist_no_ternary_logic, M_notnull, M_unreachable, m::setup_t::Make_Without_Parent(), m::teardown_t::Make_Without_Parent(), m::wasm::max(), m::wasm::min(), m::wasm::n, m::wasm::num_simd_lanes, m::wasm::CodeGenContext::num_simd_lanes(), m::wasm::res, m::wasm::CodeGenContext::scoped_environment(), m::wasm::Select(), m::wasm::CodeGenContext::set_num_simd_lanes(), m::T(), m::wasm::CodeGenContext::update_num_simd_lanes_preferred(), m::wasm::value, and m::visit().

Referenced by m::Match< wasm::Aggregation >::execute().

◆ instantiate()

static std::unique_ptr< Match< Actual > > m::PhysicalOperator::instantiate ( get_nodes_t< Pattern >  inner_nodes,
const std::vector< It > &  children 
)
inlinestaticinherited

Instantiates this physical operator given the matched logical operators inner_nodes in pre-order and the children entries children by returning a corresponding match.

Definition at line 476 of file PhysicalOptimizer.hpp.

◆ post_condition() [1/2]

static ConditionSet m::PhysicalOperator::post_condition ( const Match< Actual > &  )
inlinestaticinherited

Overwrite this to implement a custom post-condition.

Definition at line 443 of file PhysicalOptimizer.hpp.

◆ post_condition() [2/2]

ConditionSet Aggregation::post_condition ( const Match< Aggregation > &  M)
static

◆ post_condition_()

static ConditionSet m::PhysicalOperator::post_condition_ ( const Match< Actual > &  M)
inlinestaticprivateinherited

Returns the post-condition of this physical operator given the match M.

Definition at line 440 of file PhysicalOptimizer.hpp.

◆ pre_condition() [1/2]

ConditionSet Aggregation::pre_condition ( std::size_t  child_idx,
const std::tuple< const AggregationOperator * > &  partial_inner_nodes 
)
static

Definition at line 3710 of file WasmOperator.cpp.

References M_insist.

◆ pre_condition() [2/2]

static ConditionSet m::PhysicalOperator::pre_condition ( std::size_t  ,
const get_nodes_t< Pattern > &   
)
inlinestaticinherited

Overwrite this to implement custom pre-conditions.

Definition at line 436 of file PhysicalOptimizer.hpp.

◆ pre_condition_()

static ConditionSet m::PhysicalOperator::pre_condition_ ( std::size_t  child_idx,
const get_nodes_t< Pattern > &  partial_inner_nodes 
)
inlinestaticprivateinherited

Returns the pre-condition for the child_idx-th child (indexed from left to right starting with 0) of the pattern (note that children are logical operators which either match to a Wildcard in the pattern or to a child of a non-wildcard operator in the pattern, i.e.

there may be more children than leaves in the pattern) given the (potentially partially) matched logical operators partial_inner_nodes in pre-order (note that the operators not yet matched are nullptr).

Definition at line 431 of file PhysicalOptimizer.hpp.


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