int main(int, char**) { // f(); // g(); // h(); concurrent(f, g, h); std::cout << "done" << std::endl; }
void race(Count count, const std::string& name, Handler&& handler, Args&&... args) { const auto call = synchronize(FORWARD_HANDLER(handler), 1, name); for (Count iteration = 0; iteration < count; ++iteration) concurrent(BIND_RACE(args, call)); }
void parallel(const std::vector<Element>& collection, const std::string& name, Handler&& handler, Args&&... args) { const auto call = synchronize(FORWARD_HANDLER(handler), collection.size(), name); for (const auto& element: collection) concurrent(BIND_ELEMENT(args, element, call)); }
int main () { dep (); dep2 (); dep3 (); firstpriv (); antidep (); antidep2 (); antidep3 (); outdep (); concurrent (); concurrent2 (); concurrent3 (); return 0; }
bool conflict(const vclock& o) { return concurrent(o) && !identical(o); }