BitMagic-C++
Macros | Typedefs | Functions | Variables
sample12.cpp File Reference

Example: bvector<> analysis of bit setting methods. More...

#include <iostream>
#include <vector>
#include "bm.h"
#include "bmalgo.h"
#include "bmtimer.h"
Include dependency graph for sample12.cpp:

Go to the source code of this file.

Macros

#define BM64ADDR
 

Typedefs

typedef bm::bvector ::size_type bm_size_type
 

Functions

template<class T >
void PrintContainer (T first, T last)
 
static void generate_test_vectors (std::vector< bm_size_type > &v1, std::vector< bm_size_type > &v2, std::vector< bm_size_type > &v3)
 
static void bv_set_bit_test ()
 
static void bv_set_bit_no_check_test ()
 
static void combine_or_test (std::vector< bm_size_type > &v1, std::vector< bm_size_type > &v2, std::vector< bm_size_type > &v3)
 
static void bvector_bulk_set_test (std::vector< bm_size_type > &v1, std::vector< bm_size_type > &v2, std::vector< bm_size_type > &v3)
 
int main (void)
 

Variables

bm::chrono_taker::duration_map_type timing_map
 
const unsigned benchmark_count = 1000
 
bm_size_type vector_max = 4000000
 

Detailed Description

Example: bvector<> analysis of bit setting methods.

Definition in file sample12.cpp.

Macro Definition Documentation

◆ BM64ADDR

#define BM64ADDR

Definition at line 42 of file sample12.cpp.

Typedef Documentation

◆ bm_size_type

typedef bm::bvector ::size_type bm_size_type
Examples
sample12.cpp, and sample8.cpp.

Definition at line 53 of file sample12.cpp.

Function Documentation

◆ bv_set_bit_no_check_test()

static void bv_set_bit_no_check_test ( )
static

◆ bv_set_bit_test()

static void bv_set_bit_test ( )
static

◆ bvector_bulk_set_test()

static void bvector_bulk_set_test ( std::vector< bm_size_type > &  v1,
std::vector< bm_size_type > &  v2,
std::vector< bm_size_type > &  v3 
)
static
Examples
sample12.cpp.

Definition at line 169 of file sample12.cpp.

References benchmark_count, bm::bvector< Alloc >::set(), and timing_map.

Referenced by main().

◆ combine_or_test()

static void combine_or_test ( std::vector< bm_size_type > &  v1,
std::vector< bm_size_type > &  v2,
std::vector< bm_size_type > &  v3 
)
static
Examples
sample12.cpp.

Definition at line 153 of file sample12.cpp.

References benchmark_count, bm::combine_or(), bm::bvector< Alloc >::end(), and timing_map.

Referenced by main().

◆ generate_test_vectors()

static void generate_test_vectors ( std::vector< bm_size_type > &  v1,
std::vector< bm_size_type > &  v2,
std::vector< bm_size_type > &  v3 
)
static
Examples
sample12.cpp.

Definition at line 72 of file sample12.cpp.

References vector_max.

Referenced by main().

◆ main()

int main ( void  )

◆ PrintContainer()

template<class T >
void PrintContainer ( first,
last 
)
Examples
sample12.cpp.

Definition at line 60 of file sample12.cpp.

Referenced by main().

Variable Documentation

◆ benchmark_count

const unsigned benchmark_count = 1000

◆ timing_map

◆ vector_max

bm_size_type vector_max = 4000000
Examples
sample12.cpp.

Definition at line 56 of file sample12.cpp.

Referenced by bv_set_bit_no_check_test(), bv_set_bit_test(), and generate_test_vectors().