MCPcopy Create free account
hub / github.com/RenderKit/oidn / model

Class model

external/catch.hpp:6706–6723  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6704 };
6705 template <typename Fun>
6706 struct model : public callable {
6707 model(Fun&& fun) : fun(std::move(fun)) {}
6708 model(Fun const& fun) : fun(fun) {}
6709
6710 model<Fun>* clone() const override { return new model<Fun>(*this); }
6711
6712 void call(Chronometer meter) const override {
6713 call(meter, is_callable<Fun(Chronometer)>());
6714 }
6715 void call(Chronometer meter, std::true_type) const {
6716 fun(meter);
6717 }
6718 void call(Chronometer meter, std::false_type) const {
6719 meter.measure(fun);
6720 }
6721
6722 Fun fun;
6723 };
6724
6725 struct do_nothing { void operator()() const {} };
6726

Callers 2

main_workerFunction · 0.85
main_workerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected