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

benchmarks different encoding kernels without the need to renorm and stream data More...

#include "rANS/internal/common/defines.h"
#include <vector>
#include <cstring>
#include <random>
#include <algorithm>
#include <iterator>
#include <gsl/span>
#include <benchmark/benchmark.h>
#include "rANS/factory.h"
#include "rANS/histogram.h"
#include "rANS/internal/common/utils.h"
#include "rANS/internal/common/simdtypes.h"
#include "rANS/internal/common/simdops.h"
#include "rANS/internal/encode/simdKernel.h"

Go to the source code of this file.

Classes

class  SymbolTableData< source_T >
 
struct  SimpleFixture< source_T >
 
struct  Fixture< source_T >
 

Typedefs

using count_t = uint32_t
 
using ransState_t = uint64_t
 
using stream_t = uint32_t
 

Functions

template<typename T >
const auto & getData ()
 
ransState_t simpleEncode (ransState_t state, size_t symbolTablePrecision, const Symbol &symbol)
 
 BENCHMARK_REGISTER_F (SimpleFixture, simpleEncode_8)
 
 BENCHMARK_REGISTER_F (SimpleFixture, simpleEncode_16)
 
 BENCHMARK_REGISTER_F (SimpleFixture, simpleEncode_32)
 
 BENCHMARK_MAIN ()
 

Variables

constexpr size_t MessageSize = 1ull << 22
 
constexpr size_t LowerBound = 1ul << 20
 
constexpr size_t StreamBits = toBits<stream_t>()
 
const SymbolTableData< uint8_t > Data8 (MessageSize)
 
const SymbolTableData< uint16_t > Data16 (MessageSize)
 
const SymbolTableData< uint32_t > Data32 (MessageSize)
 
benchmark::State & st
 

Detailed Description

benchmarks different encoding kernels without the need to renorm and stream data

Author
Michael Lettrich

Definition in file bench_ransEncodeImpl.cxx.

Typedef Documentation

◆ count_t

using count_t = uint32_t

Definition at line 42 of file bench_ransEncodeImpl.cxx.

◆ ransState_t

using ransState_t = uint64_t

Definition at line 43 of file bench_ransEncodeImpl.cxx.

◆ stream_t

using stream_t = uint32_t

Definition at line 44 of file bench_ransEncodeImpl.cxx.

Function Documentation

◆ BENCHMARK_MAIN()

BENCHMARK_MAIN ( )

◆ BENCHMARK_REGISTER_F() [1/3]

BENCHMARK_REGISTER_F ( SimpleFixture  ,
simpleEncode_16   
)

◆ BENCHMARK_REGISTER_F() [2/3]

BENCHMARK_REGISTER_F ( SimpleFixture  ,
simpleEncode_32   
)

◆ BENCHMARK_REGISTER_F() [3/3]

BENCHMARK_REGISTER_F ( SimpleFixture  ,
simpleEncode_8   
)

◆ getData()

template<typename T >
const auto & getData ( )

Definition at line 104 of file bench_ransEncodeImpl.cxx.

◆ simpleEncode()

ransState_t simpleEncode ( ransState_t  state,
size_t  symbolTablePrecision,
const Symbol symbol 
)

Definition at line 216 of file bench_ransEncodeImpl.cxx.

Variable Documentation

◆ Data16

const SymbolTableData< uint16_t > Data16(MessageSize) ( MessageSize  )

◆ Data32

const SymbolTableData< uint32_t > Data32(MessageSize) ( MessageSize  )

◆ Data8

const SymbolTableData< uint8_t > Data8(MessageSize) ( MessageSize  )

◆ LowerBound

constexpr size_t LowerBound = 1ul << 20
inlineconstexpr

Definition at line 55 of file bench_ransEncodeImpl.cxx.

◆ MessageSize

constexpr size_t MessageSize = 1ull << 22
inlineconstexpr

Definition at line 54 of file bench_ransEncodeImpl.cxx.

◆ st

benchmark::State & st
Initial value:
{
ransSimpleEncodeBenchmark(st, *this)
benchmark::State & st

Definition at line 287 of file bench_ransEncodeImpl.cxx.

◆ StreamBits

constexpr size_t StreamBits = toBits<stream_t>()
inlineconstexpr

Definition at line 56 of file bench_ransEncodeImpl.cxx.