![]() |
Lumiera 0.pre.04
»edit your freedom«
|
Helpers and wrappers so simplify usage of microbenchmark.hpp. More...
Go to the source code of this file.
Helpers and wrappers so simplify usage of microbenchmark.hpp.
Notably the benchmark functions expect the actual »test subject« as a function or lambda with signature size_t(size_t). The argument will be the loop index and the result value will be added into a checksum, which also ensures that the optimiser can not unroll the benchmark loop. However, in practical use this strict requirement for the signature turned out as a nuisance; this header provides some automatic adaption
size_t)void(void) Definition in file microbenchmark-adaptor.hpp.
Namespaces | |
| namespace | lib |
| Implementation namespace for support and library code. | |
| namespace | lib::test |
| Unit tests for the Lumiera support library. | |
| namespace | lib::test::microbenchmark |
Functions | |
| template<typename FUN > | |
| decltype(auto) | adapted4benchmark (FUN &&fun) |
Adapter to expose the signature size_t(size_t) from any suitable source functor or lambda. | |
| struct lib::test::microbenchmark::Adaptor |
Collaboration diagram for Adaptor< SIG, SEL >: