sample16.cpp File Reference

Example: how to use bm::aggregator<> for logical operations. More...

`#include <stdlib.h>`
`#include <iostream>`
`#include <vector>`
`#include <memory>`
`#include "bm.h"`
`#include "bmaggregator.h"`
`#include "bmundef.h"`
Include dependency graph for sample16.cpp:

Go to the source code of this file.

## Functions

template<class T>
void | PrintContainer (T first, T last)
int | main (void)

## Variables

const unsigned | max_vectors = 10

## Detailed Description

Example: how to use bm::aggregator<> for logical operations.

bm::aggregator<> uses cache blocking techniques and bandwidth optimizations to do logical operations (OR, AND, AND-SUB) faster, than if we do it by combining bit-vectors one by one, sequentially.

Definition in file sample16.cpp.

## Function Documentation

## main()

int main | ( | void |  | ) |

Definition at line 60 of file sample16.cpp.

References bm::aggregator< BV >::add(), bm::aggregator< BV >::combine_and(), bm::aggregator< BV >::combine_and_sub(), bm::aggregator< BV >::combine_or(), bm::bvector< Alloc >::end(), bm::bvector< Alloc >::first(), max_vectors, PrintContainer(), and bm::aggregator< BV >::reset().

## PrintContainer()

template<class T>

void PrintContainer | ( | T | first,
|  | T | last )

Definition at line 47 of file sample16.cpp.

## Variable Documentation

## max_vectors

const unsigned max_vectors = 10

Examples
  sample16.cpp.

Definition at line 58 of file sample16.cpp.

Referenced by main().