#ifndef hVYFXl0fhRtHkuIHnrxmZOhDCeI #define hVYFXl0fhRtHkuIHnrxmZOhDCeI #include #include #include "time.hpp" #include "checkpoint.hpp" #include "simlimits.hpp" #include "template_helpers.hpp" #include "vector.hpp" // TODO: update r/w-barriers in vector using std::string; template struct Index; template struct CommonIndex { CommonIndex() = delete; CommonIndex(const string name, Ptr max); // type and const defs typedef Ptr ptr_t; static constexpr ptr_t nil() { BOOST_STATIC_ASSERT(( (ptr_t) -1 > 0 )); return -1; } // read operations // HINT: time refers to creation time, not delievery time; the // later is handled by Filter<> inline ptr_t last(); // returns the latest known event ptr_t last(Time t); // ... before (or at) time t inline ptr_t first(); // ... after (or at) ... ptr_t first(Time t); ptr_t binarySearch(Time t); virtual void sync() { time.barrierRead() = time.barrierWrite(); time.sync(); } // vector storing timing Vector