BitMagic-C++
sample4.cpp File Reference

Example: bvector<> serialization/deserialization. More...

#include <stdlib.h>
#include <iostream>
#include "bm.h"
#include "bmserial.h"
Include dependency graph for sample4.cpp:

Go to the source code of this file.

Functions

static void fill_bvector (bm::bvector<> *bv)
 
static void print_statistics (const bm::bvector<> &bv)
 
static unsigned char * serialize_bvector (bm::serializer< bm::bvector<> > &bvs, bm::bvector<> &bv)
 
int main (void)
 

Variables

const unsigned MAX_VALUE = 1000000
 

Detailed Description

Example: bvector<> serialization/deserialization.

Definition in file sample4.cpp.

Function Documentation

◆ fill_bvector()

static void fill_bvector ( bm::bvector<> * bv)
static

Definition at line 49 of file sample4.cpp.

References MAX_VALUE, and bm::bvector< Alloc >::set_bit().

Referenced by main().

◆ main()

◆ print_statistics()

static void print_statistics ( const bm::bvector<> & bv)
static

Definition at line 61 of file sample4.cpp.

References bm::bvector< Alloc >::calc_stat(), and bm::bvector< Alloc >::count().

Referenced by main().

◆ serialize_bvector()

static unsigned char * serialize_bvector ( bm::serializer< bm::bvector<> > & bvs,
bm::bvector<> & bv )
static
Examples
sample4.cpp.

Definition at line 76 of file sample4.cpp.

References BM_DECLARE_TEMP_BLOCK, bm::bvector< Alloc >::count(), and bm::bvector< Alloc >::optimize().

Referenced by main().

Variable Documentation

◆ MAX_VALUE

const unsigned MAX_VALUE = 1000000

Definition at line 42 of file sample4.cpp.

Referenced by fill_bvector().