bvsample01_64.cpp File Reference

Example: how to use 64-bit mode. More...

`#include <iostream>`
`#include <assert.h>`
`#include "bm64.h"`
`#include "bmundef.h"`
Include dependency graph for bvsample01_64.cpp:

Go to the source code of this file.

## Functions

int | main (void)

## Detailed Description

Example: how to use 64-bit mode.

By default BitMagic uses 32-bit address mode even when if it is compiled for 64-bit version. This way it supports 2^32-1 address space.

There are two ways to run BitMagic in 64-bit address mode:

1. define BM64ADDR in your project Or
2. include "bm64.h"

Limitations:

- you CANNOT use 32-bit and 64-bit in the same compilation unit.
- Current implementation internally is 48-bit (which is a lot), so your range will be [0..2^48-1]
- 32-bit vectors can be serialized and read as 64-bit, but not vice versa.

Definition in file bvsample01_64.cpp.

## Function Documentation

## main()

int main | ( | void |  | ) |

Definition at line 51 of file bvsample01_64.cpp.

References bm::bvector< Alloc >::count(), bm::bvector< Alloc >::find_range(), bm::bvector< Alloc >::first(), bm::id_max, bm::bvector< Alloc >::set(), and bm::bvector< Alloc >::iterator_base::valid().