BitMagic-C++
Data Structures | Typedefs | Functions | Variables
xsample01.cpp File Reference

Example: Example: memory consumption techniques. More...

#include <iostream>
#include <memory>
#include <map>
#include <vector>
#include <chrono>
#include <algorithm>
#include <stdexcept>
#include "bm.h"
#include "bmalgo.h"
#include "bmtimer.h"
#include "bmserial.h"
#include "bmsparsevec.h"
#include "bmsparsevec_algo.h"
#include "bmsparsevec_serial.h"
#include "bmalgo_similarity.h"
#include "bmdbg.h"
#include "bmundef.h"
Include dependency graph for xsample01.cpp:

Go to the source code of this file.

Data Structures

struct  gap_len_table_sparse< T >
 
struct  bv_index
 
struct  bvs_index
 
struct  vect_index
 
struct  sparse_vect_index
 
struct  sparse_vect_index::vect_addr
 

Typedefs

typedef bm::bvector TBVector
 

Functions

static TBVectorconstruct_bvector ()
  More...
 
template<typename TM >
void destroy_map (TM &id_map)
  More...
 
static void generate_random_vector (TBVector *bv)
  More...
 
static void generate_bv_index (bv_index &bvi)
  More...
 
static size_t calc_memory_footprint (const bv_index &bvi)
  More...
 
static size_t convert_bv2bvs (const bv_index &bvi, bvs_index &bvs)
  More...
 
static size_t convert_bv2vect (const bv_index &bvi, vect_index &vidx)
  More...
 
static void bv2delta (const TBVector &bv, std::vector< unsigned > &vect)
  More...
 
static size_t convert_bv2sv (const bv_index &bvi, sparse_vect_index &sv_idx)
  More...
 
static void speed_test_bv_index (const bv_index &bvi)
  More...
 
static void speed_test_bvs_index (const bvs_index &bvs)
  More...
 
static void speed_test_vect_index (const vect_index &vecti)
  More...
 
static void speed_test_sv_index (const sparse_vect_index &svi)
  More...
 
int main (void)
  More...
 

Variables

const unsigned index_size = 1000000
  More...
 
const unsigned max_size = 2000000
  More...
 
const unsigned bits_per_vect = 5
  More...
 
const unsigned benchmark_ops = 1000
  More...
 
const unsigned sample_cnt = 250
  More...
 
const unsigned result_set_cnt = 200
  More...
 
bm::chrono_taker ::duration_map_type timing_map
  More...
 

Detailed Description

Example: Example: memory consumption techniques.

Definition in file xsample01.cpp.