14 #if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 5 15 #define IS_TRIVIALLY_CONSTRUCTIBLE std::has_trivial_default_constructor 17 #define IS_TRIVIALLY_CONSTRUCTIBLE std::is_trivially_default_constructible 25 static_assert(!IS_TRIVIALLY_CONSTRUCTIBLE<nontrivial_t>::value,
26 "expected nontrivial_t to not be trivially constructible");
29 static_assert(IS_TRIVIALLY_CONSTRUCTIBLE<trivial_t>::value,
30 "expected trivial_t to be trivially constructible");
75 for (
auto x = 0;
x < 900; ++
x) {
79 for (
auto x = 0;
x < 101; ++
x) {
84 for (
auto x = 0;
x < 1000; ++
x) {
91 #define PREVECTOR_TEST(name) \ 92 static void Prevector##name##Nontrivial(benchmark::Bench& bench) \ 94 Prevector##name<nontrivial_t>(bench); \ 96 BENCHMARK(Prevector##name##Nontrivial); \ 97 static void Prevector##name##Trivial(benchmark::Bench& bench) \ 99 Prevector##name<trivial_t>(bench); \ 101 BENCHMARK(Prevector##name##Trivial);
void Init(int nTypeIn, int nVersionIn)
void resize(size_type new_size)
Double ended buffer combining vector and stream-like interfaces.
static void PrevectorResize(benchmark::Bench &bench)
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
static void PrevectorClear(benchmark::Bench &bench)
SERIALIZE_METHODS(nontrivial_t, obj)
Implements a drop-in replacement for std::vector<T> which stores up to N elements directly (without h...
static void PrevectorDeserialize(benchmark::Bench &bench)
Main entry point to nanobench's benchmarking facility.
#define PREVECTOR_TEST(name)
static void PrevectorDestructor(benchmark::Bench &bench)
ANKERL_NANOBENCH(NODISCARD) std Bench & batch(T b) noexcept
Sets the batch size.