88 #include "../submodules/CoreLibrary/CoreLibrary/base.h"
89 #include "../submodules/CoreLibrary/CoreLibrary/utils.h"
90 #include "../r_code/object.h"
91 #include "mem_output.h"
93 #include "reduction_job.h"
106 volatile uint32 invalidated_;
107 volatile uint32 activated_;
109 std::chrono::microseconds time_scope_;
116 template<
class C>
void __take_input(
r_exec::View* input) {
119 #ifdef WITH_DETAIL_OID
120 OUTPUT_LINE((TraceLevel)0,
" make ReductionJob " << j->get_job_id() <<
121 "(" << j->get_detail_oid() <<
"): controller(" << get_detail_oid() <<
")->reduce(View(fact_" <<
122 input->object_->get_oid() <<
")) for " << get_core_object()->get_oid());
124 push_reduction_job(j);
133 std::chrono::microseconds get_tsc() {
return time_scope_; }
135 virtual void invalidate() { invalidated_ = 1; }
136 bool is_invalidated() {
return invalidated_ == 1; };
137 void activate(
bool a) { activated_ = (a ? 1 : 0); }
138 bool is_activated()
const {
return activated_ == 1; }
139 bool is_alive()
const {
return invalidated_ == 0 && activated_ == 1; }
143 r_code::Code* get_object()
const {
return view_->object_; }
148 virtual void gain_activation() { activate(
true); }
149 virtual void lose_activation() { activate(
false); }
151 void set_view(
View* view);
153 void debug(
View* ) {}