mutable
A Database System for Research and Fast Prototyping
Loading...
Searching...
No Matches
Data Structures | Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
WasmOperator.hpp File Reference
#include "backend/WasmUtil.hpp"
#include <mutable/IR/PhysicalOptimizer.hpp>
#include <mutable/storage/DataLayoutFactory.hpp>
#include <mutable/util/enum_ops.hpp>
Include dependency graph for WasmOperator.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  m::wasm::NoOp
 
struct  m::wasm::Callback< SIMDfied >
 
struct  m::wasm::Print< SIMDfied >
 
struct  m::wasm::Scan< SIMDfied >
 
struct  m::wasm::IndexScan< IndexMethod >
 
struct  m::wasm::Filter< Predicated >
 
struct  m::wasm::LazyDisjunctiveFilter
 
struct  m::wasm::Projection
 
struct  m::wasm::HashBasedGrouping
 
struct  m::wasm::OrderedGrouping
 
struct  m::wasm::Aggregation
 
struct  m::wasm::Quicksort< CmpPredicated >
 
struct  m::wasm::NoOpSorting
 
struct  m::wasm::NestedLoopsJoin< Predicated >
 
struct  m::wasm::SimpleHashJoin< UniqueBuild, Predicated >
 
struct  m::wasm::SortMergeJoin< SortLeft, SortRight, Predicated, CmpPredicated >
 
struct  m::wasm::Limit
 
struct  m::wasm::HashBasedGroupJoin
 
struct  m::wasm::MatchBase
 An abstract MatchBase for the WasmV8 backend. More...
 
struct  m::wasm::MatchLeaf
 Intermediate match type for leaves, i.e. More...
 
struct  m::wasm::MatchSingleChild
 Intermediate match type for physical operator matches with a single child. More...
 
struct  m::wasm::MatchMultipleChildren
 Intermediate match type for physical operator matches with multiple children. More...
 
struct  m::Match< wasm::NoOp >
 
struct  m::Match< wasm::Callback< SIMDfied > >
 
struct  m::Match< wasm::Print< SIMDfied > >
 
struct  m::Match< wasm::Scan< SIMDfied > >
 
struct  m::Match< wasm::IndexScan< IndexMethod > >
 
struct  m::Match< wasm::Filter< Predicated > >
 
struct  m::Match< wasm::LazyDisjunctiveFilter >
 
struct  m::Match< wasm::Projection >
 
struct  m::Match< wasm::HashBasedGrouping >
 
struct  m::Match< wasm::OrderedGrouping >
 
struct  m::Match< wasm::Aggregation >
 
struct  m::Match< wasm::Quicksort< CmpPredicated > >
 
struct  m::Match< wasm::NoOpSorting >
 
struct  m::Match< wasm::NestedLoopsJoin< Predicated > >
 
struct  m::Match< wasm::SimpleHashJoin< UniqueBuild, Predicated > >
 
struct  m::Match< wasm::SortMergeJoin< SortLeft, SortRight, Predicated, CmpPredicated > >
 
struct  m::Match< wasm::Limit >
 
struct  m::Match< wasm::HashBasedGroupJoin >
 
struct  m::wasm::TheRecursiveMatchBaseVisitorBase< C >
 A generic base class for implementing recursive wasm::MatchBase visitors. More...
 
struct  m::wasm::ThePreOrderMatchBaseVisitor< C >
 
struct  m::wasm::ThePostOrderMatchBaseVisitor< C >
 

Namespaces

namespace  m
 

‍mutable namespace


 
namespace  m::wasm
 
namespace  m::option_configs
 
namespace  m::options
 

Macros

#define M_WASM_OPERATOR_LIST_NON_TEMPLATED(X)
 
#define M_WASM_OPERATOR_LIST_TEMPLATED(X)
 
#define M_WASM_OPERATOR_LIST(X)
 
#define MAKE_WASM_MATCH_(OP)   m::Match<m::wasm::OP>
 
#define M_WASM_MATCH_LIST_NON_TEMPLATED(X)   M_TRANSFORM_X_MACRO(X, M_WASM_OPERATOR_LIST_NON_TEMPLATED, MAKE_WASM_MATCH_)
 
#define M_WASM_MATCH_LIST_TEMPLATED(X)
 
#define M_WASM_MATCH_LIST(X)
 
#define DECLARE(OP)
 
#define M_WASM_VISITABLE_MATCH_LIST(X)
 
#define ACCEPT(CLASS)
 
#define ACCEPT(CLASS)
 
#define DECLARE(CLASS)
 

Typedefs

using m::wasm::RecursiveConstMatchBaseVisitorBase = TheRecursiveMatchBaseVisitorBase< true >
 
using m::wasm::ConstPreOrderMatchBaseVisitor = ThePreOrderMatchBaseVisitor< true >
 
using m::wasm::ConstPostOrderMatchBaseVisitor = ThePostOrderMatchBaseVisitor< true >
 

Enumerations

enum class  m::option_configs::ScanImplementation : uint64_t { m::option_configs::ALL = 0b11 , m::option_configs::SCAN = 0b01 , m::option_configs::INDEX_SCAN = 0b10 }
 
enum class  m::option_configs::GroupingImplementation : uint64_t { m::option_configs::ALL = 0b11 , m::option_configs::HASH_BASED = 0b01 , m::option_configs::ORDERED = 0b10 }
 
enum class  m::option_configs::SortingImplementation : uint64_t { m::option_configs::ALL = 0b11 , m::option_configs::QUICKSORT = 0b01 , m::option_configs::NOOP = 0b10 }
 
enum class  m::option_configs::JoinImplementation : uint64_t { m::option_configs::ALL = 0b111 , m::option_configs::NESTED_LOOPS = 0b001 , m::option_configs::SIMPLE_HASH = 0b010 , m::option_configs::SORT_MERGE = 0b100 }
 
enum class  m::option_configs::IndexImplementation : uint64_t { m::option_configs::ALL = 0b11 , m::option_configs::ARRAY = 0b01 , m::option_configs::RMI = 0b10 }
 
enum class  m::option_configs::SoftPipelineBreakerStrategy : uint64_t {
  m::option_configs::AFTER_ALL = 0b1111111 , m::option_configs::AFTER_SCAN = 0b0000001 , m::option_configs::AFTER_FILTER = 0b0000010 , m::option_configs::AFTER_INDEX_SCAN = 0b0000100 ,
  m::option_configs::AFTER_PROJECTION = 0b0001000 , m::option_configs::AFTER_NESTED_LOOPS_JOIN = 0b0010000 , m::option_configs::AFTER_SIMPLE_HASH_JOIN = 0b0100000 , m::option_configs::AFTER_HASH_BASED_GROUP_JOIN = 0b1000000 ,
  m::option_configs::NONE = 0b0000000
}
 
enum class  m::option_configs::IndexScanStrategy : uint64_t { m::option_configs::COMPILATION = 0b001 , m::option_configs::INTERPRETATION = 0b010 , m::option_configs::HYBRID = 0b100 }
 
enum class  m::option_configs::IndexScanCompilationStrategy : uint64_t { m::option_configs::CALLBACK = 0b01 , m::option_configs::EXPOSED_MEMORY = 0b10 }
 
enum class  m::option_configs::IndexScanMaterializationStrategy : uint64_t { m::option_configs::INLINE = 0b01 , m::option_configs::MEMORY = 0b10 }
 
enum class  m::option_configs::SelectionStrategy : uint64_t { m::option_configs::AUTO = 0b11 , m::option_configs::BRANCHING = 0b01 , m::option_configs::PREDICATED = 0b10 }
 
enum class  m::option_configs::HashTableImplementation : uint64_t { m::option_configs::ALL = 0b11 , m::option_configs::OPEN_ADDRESSING = 0b01 , m::option_configs::CHAINED = 0b10 }
 
enum class  m::option_configs::ProbingStrategy : uint64_t { m::option_configs::AUTO = 0b11 , m::option_configs::LINEAR = 0b01 , m::option_configs::QUADRATIC = 0b10 }
 
enum class  m::option_configs::StoringStrategy : uint64_t { m::option_configs::AUTO = 0b11 , m::option_configs::IN_PLACE = 0b01 , m::option_configs::OUT_OF_PLACE = 0b10 }
 
enum class  m::option_configs::OrderingStrategy : uint64_t { m::option_configs::AUTO = 0b11 , m::option_configs::BUILD_ON_LEFT = 0b01 , m::option_configs::BUILD_ON_RIGHT = 0b10 }
 

Functions

 m::M_WASM_OPERATOR_LIST_NON_TEMPLATED (DECLARE) namespace wasm
 
void m::register_wasm_operators (PhysicalOptimizer &phys_opt)
 Registers physical Wasm operators in phys_opt depending on the set CLI options.
 
template<typename T >
void m::execute_buffered (const Match< T > &M, const Schema &schema, const std::unique_ptr< const storage::DataLayoutFactory > &buffer_factory, std::size_t buffer_num_tuples, setup_t setup, pipeline_t pipeline, teardown_t teardown)
 
 m::wasm::M_DECLARE_VISITOR (MatchBaseVisitor, wasm::MatchBase, M_WASM_VISITABLE_MATCH_LIST) M_DECLARE_VISITOR(ConstMatchBaseVisitor
 
 m::wasm::M_MAKE_STL_VISITABLE (ConstPreOrderMatchBaseVisitor, const wasm::MatchBase, M_WASM_VISITABLE_MATCH_LIST) M_MAKE_STL_VISITABLE(ConstPostOrderMatchBaseVisitor
 

Variables

option_configs::ScanImplementation m::options::scan_implementations = option_configs::ScanImplementation::ALL
 Which implementations should be considered for a ScanOperator.
 
option_configs::GroupingImplementation m::options::grouping_implementations = option_configs::GroupingImplementation::ALL
 Which implementations should be considered for a GroupingOperator.
 
option_configs::SortingImplementation m::options::sorting_implementations = option_configs::SortingImplementation::ALL
 Which implementations should be considered for a SortingOperator.
 
option_configs::JoinImplementation m::options::join_implementations = option_configs::JoinImplementation::ALL
 Which implementations should be considered for a JoinOperator.
 
option_configs::IndexImplementation m::options::index_implementations = option_configs::IndexImplementation::ALL
 Which index implementations should be considered for an IndexScan.
 
option_configs::IndexScanStrategy m::options::index_scan_strategy = option_configs::IndexScanStrategy::INTERPRETATION
 Which index scan strategy should be used for wasm::IndexScan.
 
option_configs::IndexScanCompilationStrategy m::options::index_scan_compilation_strategy
 Which compilation strategy should be used for wasm::IndexScan.
 
option_configs::IndexScanMaterializationStrategy m::options::index_scan_materialization_strategy
 Which materialization strategy should be used for wasm::IndexScan.
 
option_configs::SelectionStrategy m::options::filter_selection_strategy = option_configs::SelectionStrategy::AUTO
 Which selection strategy should be used for wasm::Filter.
 
option_configs::SelectionStrategy m::options::quicksort_cmp_selection_strategy = option_configs::SelectionStrategy::AUTO
 Which selection strategy should be used for comparisons in wasm::Quicksort.
 
option_configs::SelectionStrategy m::options::nested_loops_join_selection_strategy = option_configs::SelectionStrategy::AUTO
 Which selection strategy should be used for wasm::NestedLoopsJoin.
 
option_configs::SelectionStrategy m::options::simple_hash_join_selection_strategy = option_configs::SelectionStrategy::AUTO
 Which selection strategy should be used for wasm::SimpleHashJoin.
 
option_configs::OrderingStrategy m::options::simple_hash_join_ordering_strategy = option_configs::OrderingStrategy::AUTO
 Which ordering strategy should be used for wasm::SimpleHashJoin.
 
option_configs::SelectionStrategy m::options::sort_merge_join_selection_strategy = option_configs::SelectionStrategy::AUTO
 Which selection strategy should be used for wasm::SortMergeJoin.
 
option_configs::SelectionStrategy m::options::sort_merge_join_cmp_selection_strategy
 Which selection strategy should be used for comparisons while sorting in wasm::SortMergeJoin.
 
option_configs::HashTableImplementation m::options::hash_table_implementation = option_configs::HashTableImplementation::ALL
 Which implementation should be used for wasm::HashTables.
 
option_configs::ProbingStrategy m::options::hash_table_probing_strategy = option_configs::ProbingStrategy::AUTO
 Which probing strategy should be used for wasm::OpenAddressingHashTables.
 
option_configs::StoringStrategy m::options::hash_table_storing_strategy = option_configs::StoringStrategy::AUTO
 Which storing strategy should be used for wasm::OpenAddressingHashTables.
 
double m::options::load_factor_open_addressing = 0.8
 Which maximal load factor should be used for wasm::OpenAddressingHashTables.
 
double m::options::load_factor_chained = 1.5
 Which maximal load factor should be used for wasm::ChainedHashTables.
 
std::optional< uint32_t > m::options::hash_table_initial_capacity
 Which initial capacity should be used for wasm::HashTables.
 
bool m::options::hash_based_group_join = true
 Whether to use wasm::HashBasedGroupJoin if possible.
 
std::unique_ptr< const m::storage::DataLayoutFactorym::options::hard_pipeline_breaker_layout
 Which layout factory should be used for hard pipeline breakers.
 
option_configs::SoftPipelineBreakerStrategy m::options::soft_pipeline_breaker
 Where soft pipeline breakers should be added.
 
std::unique_ptr< const m::storage::DataLayoutFactorym::options::soft_pipeline_breaker_layout
 Which layout factory should be used for soft pipeline breakers.
 
std::size_t m::options::soft_pipeline_breaker_num_tuples = 0
 Which size in tuples should be used for soft pipeline breakers.
 
std::size_t m::options::index_sequential_scan_batch_size = 1
 The number of results from index sequential scan to be communicated between host and v8 per batch.
 
std::size_t m::options::result_set_window_size = 0
 Which window size should be used for the result set.
 
bool m::options::exploit_unique_build = true
 Whether to exploit uniqueness of build key in hash joins.
 
bool m::options::simd = true
 Whether to use SIMDfication.
 
bool m::options::double_pumping = true
 Whether to use double pumping if SIMDfication is enabled.
 
std::size_t m::options::simd_lanes = 1
 Which number of SIMD lanes to prefer.
 
std::vector< std::pair< m::Schema::Identifier, bool > > m::options::sorted_attributes
 Which attributes are assumed to be sorted.
 

Macro Definition Documentation

◆ ACCEPT [1/2]

#define ACCEPT (   CLASS)
Value:
inline void CLASS::accept(wasm::MatchBaseVisitor &v) { v(*this); } \
inline void CLASS::accept(wasm::ConstMatchBaseVisitor &v) const { v(*this); }

Definition at line 1282 of file WasmOperator.hpp.

◆ ACCEPT [2/2]

#define ACCEPT (   CLASS)
Value:
template<> inline void CLASS::accept(wasm::MatchBaseVisitor &v) { v(*this); } \
template<> inline void CLASS::accept(wasm::ConstMatchBaseVisitor &v) const { v(*this); }

Definition at line 1282 of file WasmOperator.hpp.

◆ DECLARE [1/2]

#define DECLARE (   CLASS)
Value:
extern template struct m::wasm::CLASS; \
extern template struct m::Match<m::wasm::CLASS>;

Definition at line 1298 of file WasmOperator.hpp.

◆ DECLARE [2/2]

#define DECLARE (   OP)
Value:
namespace wasm { struct OP; } \
template<> struct Match<wasm::OP>;

Definition at line 1298 of file WasmOperator.hpp.

◆ M_WASM_MATCH_LIST

#define M_WASM_MATCH_LIST (   X)
Value:
M_WASM_MATCH_LIST_TEMPLATED(X)
#define X(Kind)
Definition: Operator.hpp:621
#define M_WASM_MATCH_LIST_NON_TEMPLATED(X)

Definition at line 321 of file WasmOperator.hpp.

◆ M_WASM_MATCH_LIST_NON_TEMPLATED

#define M_WASM_MATCH_LIST_NON_TEMPLATED (   X)    M_TRANSFORM_X_MACRO(X, M_WASM_OPERATOR_LIST_NON_TEMPLATED, MAKE_WASM_MATCH_)

Definition at line 285 of file WasmOperator.hpp.

◆ M_WASM_MATCH_LIST_TEMPLATED

#define M_WASM_MATCH_LIST_TEMPLATED (   X)

Definition at line 286 of file WasmOperator.hpp.

◆ M_WASM_OPERATOR_LIST

#define M_WASM_OPERATOR_LIST (   X)
Value:
M_WASM_OPERATOR_LIST_TEMPLATED(X)
#define M_WASM_OPERATOR_LIST_NON_TEMPLATED(X)

Definition at line 279 of file WasmOperator.hpp.

◆ M_WASM_OPERATOR_LIST_NON_TEMPLATED

#define M_WASM_OPERATOR_LIST_NON_TEMPLATED (   X)
Value:
X(NoOp) \
X(LazyDisjunctiveFilter) \
X(Projection) \
X(HashBasedGrouping) \
X(OrderedGrouping) \
X(Aggregation) \
X(NoOpSorting) \
X(Limit) \
X(HashBasedGroupJoin)

Definition at line 234 of file WasmOperator.hpp.

◆ M_WASM_OPERATOR_LIST_TEMPLATED

#define M_WASM_OPERATOR_LIST_TEMPLATED (   X)

Definition at line 244 of file WasmOperator.hpp.

◆ M_WASM_VISITABLE_MATCH_LIST

#define M_WASM_VISITABLE_MATCH_LIST (   X)
Value:
X(MatchLeaf) \
X(MatchSingleChild) \
X(MatchMultipleChildren)
#define M_WASM_MATCH_LIST(X)

Definition at line 1221 of file WasmOperator.hpp.

◆ MAKE_WASM_MATCH_

#define MAKE_WASM_MATCH_ (   OP)    m::Match<m::wasm::OP>

Definition at line 284 of file WasmOperator.hpp.