Project
Loading...
Searching...
No Matches
bench_ransPack.cxx File Reference

benchmarks packing algorithms and compares it to memcpy More...

#include "rANS/internal/common/defines.h"
#include <vector>
#include <cstring>
#include <random>
#include <algorithm>
#include <iterator>
#include <benchmark/benchmark.h>
#include "rANS/internal/pack/pack.h"
#include "helpers.h"

Go to the source code of this file.

Typedefs

using source_type = uint32_t
 

Functions

template<typename source_T >
std::vector< source_TmakeRandomUniformVector (size_t nelems, source_T min=std::numeric_limits< source_T >::max(), source_T max=std::numeric_limits< source_T >::max())
 
 BENCHMARK (copyBenchmark)
 
 BENCHMARK (packingBenchmark) -> DenseRange(1, 32, 1)
 
 BENCHMARK (fastPackBenchmark) -> DenseRange(1, 32, 1)
 
 BENCHMARK_MAIN ()
 

Variables

constexpr size_t MessageSize = 1ull << 22
 

Detailed Description

benchmarks packing algorithms and compares it to memcpy

Author
Michael Lettrich

Definition in file bench_ransPack.cxx.

Typedef Documentation

◆ source_type

using source_type = uint32_t

Definition at line 41 of file bench_ransPack.cxx.

Function Documentation

◆ BENCHMARK() [1/3]

BENCHMARK ( copyBenchmark  )

◆ BENCHMARK() [2/3]

BENCHMARK ( fastPackBenchmark  ) -> DenseRange(1, 32, 1)

◆ BENCHMARK() [3/3]

BENCHMARK ( packingBenchmark  ) -> DenseRange(1, 32, 1)

◆ BENCHMARK_MAIN()

BENCHMARK_MAIN ( )

◆ makeRandomUniformVector()

template<typename source_T >
std::vector< source_T > makeRandomUniformVector ( size_t  nelems,
source_T  min = std::numeric_limits<source_T>::max(),
source_T  max = std::numeric_limits<source_T>::max() 
)

Definition at line 44 of file bench_ransPack.cxx.

Variable Documentation

◆ MessageSize

constexpr size_t MessageSize = 1ull << 22
inlineconstexpr

Definition at line 39 of file bench_ransPack.cxx.