|
21 | 21 | #include "bench_vector_common.hpp" |
22 | 22 |
|
23 | 23 | template<class IntType, class Operation> |
24 | | -void run_containers(unsigned numit, unsigned numele, bool bp) |
| 24 | +void run_containers(runner<IntType, Operation>& r) |
25 | 25 | { |
26 | | - vector_test_template< bc::deque<IntType, std::allocator<IntType> >, Operation >(numit, numele, "deque ", bp); |
27 | | - vector_test_template< bc::deque<IntType, std::allocator<IntType>, |
28 | | - typename bc::deque_options<bc::reservable<true> >::type >, Operation >(numit, numele, "deque(reserv) ", bp); |
29 | | - vector_test_template< bc::segtor<IntType, std::allocator<IntType> >, Operation >(numit, numele, "segtor ", bp); |
30 | | - vector_test_template< bc::segtor<IntType, std::allocator<IntType>, |
31 | | - typename bc::segtor_options<bc::reservable<true> >::type >, Operation >(numit, numele, "segtor(reserv) ", bp); |
| 26 | + //First registered container is the baseline (denominator). |
| 27 | + r.template add< bc::deque<IntType, std::allocator<IntType> > >("deque"); |
| 28 | + r.template add< bc::deque<IntType, std::allocator<IntType>, |
| 29 | + typename bc::deque_options<bc::reservable<true> >::type> >("deque(resv)"); |
| 30 | + r.template add< bc::segtor<IntType, std::allocator<IntType> > >("segtor"); |
| 31 | + r.template add< bc::segtor<IntType, std::allocator<IntType>, |
| 32 | + typename bc::segtor_options<bc::reservable<true> >::type> >("segtor(resv)"); |
32 | 33 | } |
33 | 34 |
|
34 | 35 | int main() |
|
0 commit comments