#include <iostream>
#include <random>
#include <memory>
static
{
{
for (j = 0; j < 65535*8; i += 10, j++)
{
}
if (i > vector_max)
break;
for (j = 0; j < 65535; i += 120, j++)
{
unsigned len = rand() % 64;
i += len;
if (i > vector_max)
break;
}
}
std::cout <<
"Bit-vector statistics: GAP (compressed blocks)=" << st.
gap_blocks <<
", BIT (uncompressed blocks)=" << st.
bit_blocks << std::endl << std::endl;
}
static
{
{
m+=cnt*cnt;
}
return m;
}
static
{
{
for (unsigned i = 0; i < benchmark_count / 2; ++i)
{
}
}
std::cout << "Count test finished." << cnt << "\r";
}
static
{
{
{
if (from > to)
swap(from, to);
}
}
std::cout << "Count range test finished." << cnt << "\r";
}
static
{
{
cnt = 0;
{
if (from > to)
swap(from, to);
}
}
std::cout << "Count range with blocks test finished." << cnt << "\r";
}
static
{
{
{
}
}
std::cout << "Count to with blocks test finished." << cnt << "\r";
}
static
{
{
{
if (from > to)
swap(from, to);
cnt += cnt_r;
}
}
std::cout << "Count range via count_to test finished." << cnt << "\r";
}
static
{
{
{
if (from > to)
swap(from, to);
mask_bv.set_range(from, to, true);
mask_bv.clear(true);
}
}
std::cout << "count AND finished." << cnt << "\r";
}
static
{
{
for (unsigned i = 0; i < benchmark_count/20; ++i)
{
{
if (*en > to)
break;
}
}
}
std::cout << "counted_enumerator finished." << cnt << "\r";
}
{
try
{
std::cout << s << "\r";
std::cout << " "
<< std::endl;
}
catch(std::exception& ex)
{
std::cerr << ex.what() << std::endl;
return 1;
}
return 0;
}