13 #include <boost/thread/thread.hpp> 44 void swap(PrevectorJob& x){p.
swap(x.p);};
47 boost::thread_group tg;
51 tg.create_thread([&]{queue.Thread();});
56 std::vector<std::vector<PrevectorJob>> vBatches(
BATCHES);
57 for (
auto& vChecks : vBatches) {
60 vChecks.emplace_back(insecure_rand);
66 for (
auto vChecks : vBatches) {
static const int PREVECTOR_SIZE
void ECC_Start()
Initialize the elliptic curve support.
void resize(size_type new_size)
void Add(std::vector< T > &vChecks)
int GetNumCores()
Return the number of cores available on the current system.
static const size_t BATCHES
RAII-style controller object for a CCheckQueue that guarantees the passed queue is finished before co...
ANKERL_NANOBENCH(NODISCARD) std Bench & minEpochIterations(uint64_t numIters) noexcept
Sets the minimum number of iterations each epoch should take.
static const unsigned int QUEUE_BATCH_SIZE
Users of this module must hold an ECCVerifyHandle.
Bench & run(char const *benchmarkName, Op &&op)
Repeatedly calls op() based on the configuration, and performs measurements.
void swap(prevector< N, T, Size, Diff > &other)
void ECC_Stop()
Deinitialize the elliptic curve support.
Queue for verifications that have to be performed.
Implements a drop-in replacement for std::vector<T> which stores up to N elements directly (without h...
Bench & unit(char const *unit)
Sets the operation unit.
static const size_t BATCH_SIZE
static void CCheckQueueSpeedPrevectorJob(benchmark::Bench &bench)
Main entry point to nanobench's benchmarking facility.
uint64_t randrange(uint64_t range) noexcept
Generate a random integer in the range [0..range).
ANKERL_NANOBENCH(NODISCARD) std Bench & batch(T b) noexcept
Sets the batch size.
BENCHMARK(CCheckQueueSpeedPrevectorJob)