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 24 template <
typename Stream,
typename Operation>
29 static_assert(!IS_TRIVIALLY_CONSTRUCTIBLE<nontrivial_t>::value,
30 "expected nontrivial_t to not be trivially constructible");
33 static_assert(IS_TRIVIALLY_CONSTRUCTIBLE<trivial_t>::value,
34 "expected trivial_t to be trivially constructible");
38 for (
auto x = 0;
x < 1000; ++
x) {
49 for (
auto x = 0;
x < 1000; ++
x) {
64 for (
auto x = 0;
x < 1000; ++
x) {
78 for (
auto x = 0;
x < 900; ++
x) {
82 for (
auto x = 0;
x < 101; ++
x) {
87 for (
auto x = 0;
x < 1000; ++
x) {
94 #define PREVECTOR_TEST(name, nontrivops, trivops) \ 95 static void Prevector##name##Nontrivial(benchmark::State &state) { \ 96 Prevector##name<nontrivial_t>(state); \ 98 BENCHMARK(Prevector##name##Nontrivial, nontrivops); \ 99 static void Prevector##name##Trivial(benchmark::State &state) { \ 100 Prevector##name<trivial_t>(state); \ 102 BENCHMARK(Prevector##name##Trivial, trivops);
void Init(int nTypeIn, int nVersionIn)
void resize(size_type new_size)
static void PrevectorDestructor(benchmark::State &state)
static void PrevectorResize(benchmark::State &state)
Double ended buffer combining vector and stream-like interfaces.
#define PREVECTOR_TEST(name, nontrivops, trivops)
static void PrevectorClear(benchmark::State &state)
static void PrevectorDeserialize(benchmark::State &state)
Implements a drop-in replacement for std::vector<T> which stores up to N elements directly (without h...
ADD_SERIALIZE_METHODS void SerializationOp(Stream &s, Operation ser_action)