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

compares performance of different encoders More...

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

Go to the source code of this file.

Classes

class  SourceMessageProxy< source_T >
 

Functions

template<typename T >
const auto & getMessage ()
 
template<typename source_T , CoderTag coderTag_V>
void ransCompressionBenchmark (benchmark::State &st)
 
template<typename source_T , CoderTag coderTag_V>
void ransLiteralCompressionBenchmark (benchmark::State &st)
 
template<typename source_T , CoderTag coderTag_V>
void ransAdaptiveCompressionBenchmark (benchmark::State &st)
 
template<typename source_T , CoderTag coderTag_V>
void ransAdaptiveLiteralCompressionBenchmark (benchmark::State &st)
 
 BENCHMARK (ransCompressionBenchmark< uint8_t, CoderTag::Compat >)
 
 BENCHMARK (ransCompressionBenchmark< uint16_t, CoderTag::Compat >)
 
 BENCHMARK (ransCompressionBenchmark< uint32_t, CoderTag::Compat >)
 
 BENCHMARK (ransAdaptiveCompressionBenchmark< uint32_t, CoderTag::Compat >)
 
 BENCHMARK (ransLiteralCompressionBenchmark< uint8_t, CoderTag::Compat >)
 
 BENCHMARK (ransLiteralCompressionBenchmark< uint16_t, CoderTag::Compat >)
 
 BENCHMARK (ransLiteralCompressionBenchmark< uint32_t, CoderTag::Compat >)
 
 BENCHMARK (ransAdaptiveLiteralCompressionBenchmark< uint32_t, CoderTag::Compat >)
 
 BENCHMARK_MAIN ()
 

Variables

constexpr size_t MessageSize = 1ull << 22
 
const SourceMessageProxy< uint8_t > sourceMessage8 {MessageSize}
 
const SourceMessageProxy< uint16_t > sourceMessage16 {MessageSize}
 
const SourceMessageProxy< uint32_t > sourceMessage32 {MessageSize}
 

Detailed Description

compares performance of different encoders

Author
Michael Lettrich

Definition in file bench_ransEncode.cxx.

Function Documentation

◆ BENCHMARK() [1/8]

BENCHMARK ( ransAdaptiveCompressionBenchmark< uint32_t, CoderTag::Compat >  )

◆ BENCHMARK() [2/8]

BENCHMARK ( ransAdaptiveLiteralCompressionBenchmark< uint32_t, CoderTag::Compat >  )

◆ BENCHMARK() [3/8]

BENCHMARK ( ransCompressionBenchmark< uint16_t, CoderTag::Compat >  )

◆ BENCHMARK() [4/8]

BENCHMARK ( ransCompressionBenchmark< uint32_t, CoderTag::Compat >  )

◆ BENCHMARK() [5/8]

BENCHMARK ( ransCompressionBenchmark< uint8_t, CoderTag::Compat >  )

◆ BENCHMARK() [6/8]

BENCHMARK ( ransLiteralCompressionBenchmark< uint16_t, CoderTag::Compat >  )

◆ BENCHMARK() [7/8]

BENCHMARK ( ransLiteralCompressionBenchmark< uint32_t, CoderTag::Compat >  )

◆ BENCHMARK() [8/8]

BENCHMARK ( ransLiteralCompressionBenchmark< uint8_t, CoderTag::Compat >  )

◆ BENCHMARK_MAIN()

BENCHMARK_MAIN ( )

◆ getMessage()

template<typename T >
const auto & getMessage ( )

Definition at line 74 of file bench_ransEncode.cxx.

◆ ransAdaptiveCompressionBenchmark()

template<typename source_T , CoderTag coderTag_V>
void ransAdaptiveCompressionBenchmark ( benchmark::State &  st)

Definition at line 179 of file bench_ransEncode.cxx.

◆ ransAdaptiveLiteralCompressionBenchmark()

template<typename source_T , CoderTag coderTag_V>
void ransAdaptiveLiteralCompressionBenchmark ( benchmark::State &  st)

Definition at line 228 of file bench_ransEncode.cxx.

◆ ransCompressionBenchmark()

template<typename source_T , CoderTag coderTag_V>
void ransCompressionBenchmark ( benchmark::State &  st)

Definition at line 86 of file bench_ransEncode.cxx.

◆ ransLiteralCompressionBenchmark()

template<typename source_T , CoderTag coderTag_V>
void ransLiteralCompressionBenchmark ( benchmark::State &  st)

Definition at line 131 of file bench_ransEncode.cxx.

Variable Documentation

◆ MessageSize

constexpr size_t MessageSize = 1ull << 22
inlineconstexpr

Definition at line 40 of file bench_ransEncode.cxx.

◆ sourceMessage16

const SourceMessageProxy<uint16_t> sourceMessage16 {MessageSize}
inline

Definition at line 70 of file bench_ransEncode.cxx.

◆ sourceMessage32

const SourceMessageProxy<uint32_t> sourceMessage32 {MessageSize}
inline

Definition at line 71 of file bench_ransEncode.cxx.

◆ sourceMessage8

const SourceMessageProxy<uint8_t> sourceMessage8 {MessageSize}
inline

Definition at line 69 of file bench_ransEncode.cxx.