...

Text file src/github.com/google/flatbuffers/benchmarks/cpp/bench.h

Documentation: github.com/google/flatbuffers/benchmarks/cpp

     1#ifndef BENCHMARKS_CPP_BENCH_H_
     2#define BENCHMARKS_CPP_BENCH_H_
     3
     4#include <cstdint>
     5
     6struct Bench {
     7  virtual ~Bench() {}
     8
     9  inline void Add(int64_t value) { sum += value; }
    10
    11  virtual uint8_t *Encode(void *buf, int64_t &len) = 0;
    12  virtual void *Decode(void *buf, int64_t len) = 0;
    13  virtual int64_t Use(void *decoded) = 0;
    14  virtual void Dealloc(void *decoded) = 0;
    15
    16  int64_t sum = 0;
    17};
    18
    19#endif // BENCHMARKS_CPP_BENCH_H_

View as plain text