diff --git a/include/queryosity/column_equation.h b/include/queryosity/column_equation.h index 46a085e..e9a9090 100644 --- a/include/queryosity/column_equation.h +++ b/include/queryosity/column_equation.h @@ -21,7 +21,12 @@ class equation : public definition { virtual ~equation() = default; public: - virtual Out evaluate(observable... args) const override; + virtual Out evaluate(observable... args) const final override; + + virtual void initialize(unsigned int slot, unsigned long long begin, + unsigned long long end) final override; + virtual void execute(unsigned int slot, unsigned long long entry) final override; + virtual void finalize(unsigned int slot) final override; protected: function_type m_evaluate; @@ -39,4 +44,20 @@ template Out queryosity::column::equation::evaluate( observable... args) const { return this->m_evaluate(args.value()...); +} + +template +void queryosity::column::equation::initialize(unsigned int slot, unsigned long long begin, + unsigned long long end) { + calculation::initialize(slot, begin, end); + } + +template +void queryosity::column::equation::execute(unsigned int slot, unsigned long long entry) { + calculation::execute(slot, entry); +} + +template +void queryosity::column::equation::finalize(unsigned int slot) { + calculation::finalize(slot); } \ No newline at end of file diff --git a/include/queryosity/column_fixed.h b/include/queryosity/column_fixed.h index 8eb9889..61164b4 100644 --- a/include/queryosity/column_fixed.h +++ b/include/queryosity/column_fixed.h @@ -14,7 +14,12 @@ template class column::fixed : public valued { template fixed(Args &&...args); virtual ~fixed() = default; - const Val &value() const override; + const Val &value() const final override; + + virtual void initialize(unsigned int slot, unsigned long long begin, + unsigned long long end) final override; + virtual void execute(unsigned int slot, unsigned long long entry) final override; + virtual void finalize(unsigned int slot) final override; protected: Val m_value; @@ -33,4 +38,20 @@ queryosity::column::fixed::fixed(Args &&...args) template const Val &queryosity::column::fixed::value() const { return m_value; +} + +template +void queryosity::column::fixed::initialize(unsigned int slot, unsigned long long begin, + unsigned long long end) { + valued::initialize(slot, begin, end); + } + +template +void queryosity::column::fixed::execute(unsigned int slot, unsigned long long entry) { + valued::execute(slot, entry); +} + +template +void queryosity::column::fixed::finalize(unsigned int slot) { + valued::finalize(slot); } \ No newline at end of file diff --git a/include/queryosity/query_series.h b/include/queryosity/query_series.h index f375f1b..569f320 100644 --- a/include/queryosity/query_series.h +++ b/include/queryosity/query_series.h @@ -17,11 +17,11 @@ template class series : public queryosity::query::definition, double) override; - virtual void finalize(unsigned int) override; - virtual std::vector result() const override; - virtual std::vector merge(std::vector> const &results) const override; + virtual void initialize(unsigned int, unsigned long long, unsigned long long) final override; + virtual void fill(column::observable, double) final override; + virtual void finalize(unsigned int) final override; + virtual std::vector result() const final override; + virtual std::vector merge(std::vector> const &results) const final override; protected: std::vector m_result; diff --git a/include/queryosity/selection.h b/include/queryosity/selection.h index 16dcf9e..a7a89a6 100644 --- a/include/queryosity/selection.h +++ b/include/queryosity/selection.h @@ -41,6 +41,11 @@ class node : public column::calculation { virtual bool passed_cut() const = 0; virtual double get_weight() const = 0; + virtual void initialize(unsigned int slot, unsigned long long begin, + unsigned long long end) final override; + virtual void execute(unsigned int slot, unsigned long long entry) final override; + virtual void finalize(unsigned int slot) final override; + protected: const selection::node *const m_preselection; column::variable m_decision; @@ -75,4 +80,17 @@ inline bool queryosity::selection::node::is_initial() const noexcept { inline const queryosity::selection::node * queryosity::selection::node::get_previous() const noexcept { return m_preselection; +} + +inline void queryosity::selection::node::initialize(unsigned int slot, unsigned long long begin, + unsigned long long end) { + column::calculation::initialize(slot, begin, end); + } + +inline void queryosity::selection::node::execute(unsigned int slot, unsigned long long entry) { + column::calculation::execute(slot, entry); +} + +inline void queryosity::selection::node::finalize(unsigned int slot) { + column::calculation::finalize(slot); } \ No newline at end of file diff --git a/include/queryosity/selection_cut.h b/include/queryosity/selection_cut.h index d341691..6b84175 100644 --- a/include/queryosity/selection_cut.h +++ b/include/queryosity/selection_cut.h @@ -11,9 +11,9 @@ class selection::cut : public selection::node { virtual ~cut() = default; public: - virtual double calculate() const override; - virtual bool passed_cut() const override; - virtual double get_weight() const override; + virtual double calculate() const final override; + virtual bool passed_cut() const final override; + virtual double get_weight() const final override; }; } // namespace queryosity diff --git a/include/queryosity/selection_weight.h b/include/queryosity/selection_weight.h index 7aca42a..84c5e79 100644 --- a/include/queryosity/selection_weight.h +++ b/include/queryosity/selection_weight.h @@ -14,9 +14,9 @@ class selection::weight : public selection::node { virtual ~weight() = default; public: - virtual double calculate() const override; - virtual bool passed_cut() const override; - virtual double get_weight() const override; + virtual double calculate() const final override; + virtual bool passed_cut() const final override; + virtual double get_weight() const final override; }; } // namespace queryosity diff --git a/include/queryosity/selection_yield.h b/include/queryosity/selection_yield.h index a89291a..8258d22 100644 --- a/include/queryosity/selection_yield.h +++ b/include/queryosity/selection_yield.h @@ -27,10 +27,10 @@ class counter : public query::aggregation { counter() = default; virtual ~counter() = default; - virtual void count(double w) override; - virtual count_t result() const override; - virtual void finalize(unsigned int) override; - virtual count_t merge(std::vector const &results) const override; + virtual void count(double w) final override; + virtual count_t result() const final override; + virtual void finalize(unsigned int) final override; + virtual count_t merge(std::vector const &results) const final override; protected: count_t m_cnt;