NCBI C++ ToolKit
Classes | Macros | Typedefs | Functions | Variables
stress64.cpp File Reference
#include <ncbi_pch.hpp>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <math.h>
#include <string.h>
#include <iostream>
#include <iomanip>
#include <utility>
#include <memory>
#include <random>
#include <algorithm>
#include <iterator>
#include <stdarg.h>
#include <vector>
#include <chrono>
#include <functional>
#include <util/bitset/ncbi_bitset.hpp>
#include <util/bitset/bmrandom.h>
#include <util/bitset/bmaggregator.h>
#include <util/bitset/bmvmin.h>
#include <util/bitset/bmdbg.h>
#include <util/bitset/bmalgo.h>
#include <util/bitset/bmintervals.h>
#include <util/bitset/bmbvimport.h>
#include <util/bitset/bmsparsevec_util.h>
#include <util/bitset/bmtimer.h>
#include <util/bitset/bmsparsevec.h>
#include <util/bitset/bmsparsevec_algo.h>
#include <util/bitset/bmsparsevec_serial.h>
#include <util/bitset/bmsparsevec_compr.h>
#include <util/bitset/bmstrsparsevec.h>
#include <common/test_assert.h>
#include "gena.h"
#include "test_util.h"
+ Include dependency graph for stress64.cpp:

Go to the source code of this file.

Go to the SVN repository for this file.

Classes

class  pool_block_allocator
 
class  pool_ptr_allocator
 
class  dbg_block_allocator
 
class  dbg_ptr_allocator
 

Macros

#define BMXORCOMP
 
#define POOL_SIZE   5000
 
#define MEM_DEBUG
 
#define BM_EXPAND(x)   x ## 1
 
#define EXPAND(x)   BM_EXPAND(x)
 

Typedefs

typedef mem_alloc< dbg_block_allocator, dbg_ptr_allocator, alloc_pool< dbg_block_allocator, dbg_ptr_allocator > > dbg_alloc
 
typedef bm::bvector< dbg_allocbvect64
 
typedef bm::bvector< dbg_allocbvect
 
typedef bm::bvector_mini< dbg_block_allocatorbvect_mini
 
typedef bm::rs_index< dbg_allocrs_ind
 
typedef std::vector< bm::id64_tref_vect
 
typedef bm::sparse_vector< unsigned, bvectsparse_vector_u32
 
typedef bm::sparse_vector< int, bvectsparse_vector_i32
 
typedef bm::sparse_vector< unsigned long long, bvectsparse_vector_u64
 
typedef bm::sparse_vector< signed long long, bvectsparse_vector_i64
 
typedef bm::rsc_sparse_vector< unsigned, sparse_vector_u32rsc_sparse_vector_u32
 
typedef bm::rsc_sparse_vector< int, sparse_vector_i32rsc_sparse_vector_i32
 
typedef bm::rsc_sparse_vector< unsigned, sparse_vector_u64rsc_sparse_vector_u64
 
typedef str_sparse_vector< char, bvect, 32 > str_svect_type
 

Functions

template<class T >
Tpool_allocate (T **pool, int &i, size_t n)
 
void * pool_allocate2 (void **pool, int &i, size_t n)
 
template<class T >
void pool_free (T **pool, int &i, T *p)
 
static void SyntaxTest ()
 
static void GenericBVectorTest ()
 
static void ArenaTest ()
 
static void FreezeTest ()
 
static void SetTest ()
 
static void BVImportTest ()
 
static void ExportTest ()
 
static void ResizeTest ()
 
static void CompareEnumerators (const bvect::enumerator &en1, const bvect::enumerator &en2)
 
static void EmptyBVTest ()
 
static void EnumeratorTest ()
 
static void IntervalEnumeratorTest ()
 
static void VerifyCountRange (const bvect &bv, const bvect::rs_index_type &bc_arr, bvect::size_type from, bvect::size_type to)
 
static void RSIndexTest ()
 
static void CountRangeTest ()
 
static void verify_all_one_ranges (const bvect &bv, bool all_one)
 
static void IsAllOneRangeTest ()
 
static void optimize_fill (bvect &bv, bvect::size_type base, unsigned inc, bvect::size_type max_bits=bm::gap_max_bits, bool value=true)
 
static void OptimizeTest ()
 
static void RankFindTest ()
 
static int bit_decode_func (void *handle_ptr, bm::id64_t bit_idx)
 
static int bit_decode_func2 (void *, bm::id64_t bit_idx)
 
template<class BV >
void VisitorAllRangeTest (const BV &bv, typename BV::size_type step)
 
static void RangeForEachTest (bvect::size_type from, bvect::size_type to)
 
static void BvectorBitForEachTest ()
 
static void GetNextTest ()
 
static void BvectorIncTest ()
 
template<class BV >
void DetailedCompareBVectors (const BV &bv1, const BV &bv2)
 
static void BvectorBulkSetTest ()
 
static void GAPTestStress ()
 
static void TestRandomSubset (const bvect &bv, bm::random_subset< bvect > &rsub, bvect::size_type limit=0)
 
static bool FindLastBit (const bvect &bv, bvect::size_type &last_pos)
 
void CheckVectors (bvect_mini &bvect_min, bvect &bvect_full, bvect::size_type size, bool)
 
static void SimpleRandomFillTest ()
 
static void RangeRandomFillTest ()
 
void CheckRangeCopy (const bvect &bv, bvect::size_type from, bvect::size_type to)
 
static void RangeCopyTest ()
 
static void ComparisonTest ()
 
static void SerializationTest ()
 
static void DesrializationTest2 ()
 
static void generate_sparse_bv (bvect &bv, bvect::size_type from, bvect::size_type to, bvect::size_type step=65536/10)
 
static void SparseSerializationTest ()
 
static void CheckRangeDeserial (const bvect &bv, bvect::size_type from, bvect::size_type to)
 
static void RangeDeserializationTest ()
 
static void print_bv (const bvect &bv)
 
static void ShiftRight (bvect *bv, bvect::size_type shift)
 
static void BvectorShiftTest ()
 
static void BVectorInsert (bvect *bv, bvect::size_type pos, bool value)
 
static void BvectorInsertTest ()
 
static void BVectorErase (bvect *bv, bvect::size_type pos)
 
static void BvectorEraseTest ()
 
static void AddressResolverTest ()
 
static void TestRankCompress ()
 
static bvect::size_type SerializationOperation (bvect *bv_target, bvect &bv1, bvect &bv2, set_operation op, bool check_reverse=false)
 
static void SerializationOperation2Test (bvect *bv_target, bvect &bv1, bvect &bv2, bvect::size_type predicted_count, set_operation op_count, set_operation op_combine)
 
static void AndOperationsTest ()
 
static void OrOperationsTest ()
 
static void XorOperationsTest ()
 
static void SubOperationsTest ()
 
template<typename BV >
void CheckBV_AND_OR (BV &bv_target, const BV &bv1, const BV &bv2)
 
static void AndOrOperationsTest (bool detailed)
 
static void TestAND_OR (bm::random_subset< bvect > &rsub, bvect::size_type count, const bvect &bvect_full1, const bvect &bvect_full2)
 
static void StressTest (unsigned repetitions, int set_operation=-1)
 
static bool agg_shift_right_and (bm::aggregator< bvect > &agg, bvect &bv_target, const bvect *bv,...)
 
static void AggregatorTest ()
 
static void StressTestAggregatorOR (unsigned repetitions)
 
static void StressTestAggregatorAND (unsigned repetitions)
 
static void GenerateTestCollection (std::vector< bvect > *target, unsigned count, bvect::size_type vector_max)
 
static void StressTestAggregatorShiftAND (unsigned repeats)
 
static void TestSparseVector ()
 
static void TestSparseVectorAlgo ()
 
static void TestSignedSparseVector ()
 
static void TestSparseVectorSerial ()
 
static void TestSignedSparseVectorSerial ()
 
static void TestSparseVectorInserter ()
 
static void TestCompressSparseVectorSerial ()
 
static void TestSparseVectorSerialization2 ()
 
static void CheckSparseVectorGather (const sparse_vector_u32 &sv, sparse_vector_u32::size_type from, sparse_vector_u32::size_type to, unsigned control_value=0)
 
static void CheckSparseVectorGatherRandom (const sparse_vector_u32 &sv, sparse_vector_u32::size_type gather_size)
 
static void TestSparseVectorGatherDecode ()
 
template<class SV >
void bvector_transform_11 (typename SV::bvector_type &bvect_in, const SV &sv_brel, typename SV::bvector_type &bvect_out)
 
static void TestSparseVectorTransform ()
 
template<typename SV >
void CheckSparseVectorRange (const SV &sv, typename SV::size_type left, typename SV::size_type right)
 
static void TestSparseVectorRange ()
 
template<typename SV >
void CheckSparseVectorFilter (const SV &sv, typename SV::size_type factor)
 
static void TestSparseVectorFilter ()
 
static void TestSparseVectorScan ()
 
static void TestSignedSparseVectorScan ()
 
static void TestCompressSparseVector ()
 
static void TestCompressedSparseVectorScan ()
 
static void TestCompressSparseSignedVector ()
 
static void TestSparseVector_Stress (unsigned count)
 
template<class STR_SV >
void CheckStrSVCompare (const STR_SV &str_sv, typename STR_SV::size_type limit=0)
 
static void TestStrSparseVector ()
 
static void KeepRangeTest ()
 
static void EraseStrCollection (str_svect_type &str_sv)
 
static void TestStrSparseSort ()
 
template<typename SV >
void EraseSVCollection (SV &sv)
 
static void TestSparseSort ()
 
static void TestSignedSparseSort ()
 
static void StressTestStrSparseVector ()
 
void GeneratePipelineTestData (std::vector< string > &str_coll, str_svect_type &str_sv, unsigned max_coll=8000000, unsigned repeat_factor=10)
 
static void TestSparseFindEqStrPipeline ()
 
static void TestCompressSparseGather ()
 
static void TestCompressedSparseVectorAlgo ()
 
template<class SV >
void CheckGTSearch (const SV &sv, typename SV::value_type v, bm::sparse_vector_scanner< SV > &scanner)
 
static void TestCompressedSparseVectorScanGT ()
 
static void TestCompressedCollection ()
 
static void BvectorFindFirstDiffTest ()
 
static void BvectorFindReverseTest ()
 
void PrintStacks (unsigned max_cnt=10)
 
static bool CheckAllocLeaks (bool details=false, bool abort=true)
 
static void show_help ()
 
static int parse_args (int argc, char *argv[])
 
void test_kmers ()
 
int main (int argc, char *argv[])
 

Variables

bool is_silent = false
 
bvect::size_type from_arr [] = { 0, 0, 0, 0, 7, 1, 0, 65535, 65535, 0, 0, bm::id_max/2-2001, bm::id_max-2000}
 
bvect::size_type to_arr [] = { 0, 1, 16, 32, 31, 255, 65535, 65536, 65536*2, 65537, bm::id_max/2-2000, bm::id_max/2+2000, bm::id_max-1}
 
const unsigned ITERATIONS = 180000
 
bool is_all = true
 
bool is_low_level = false
 
bool is_support = false
 
bool is_bvbasic = false
 
bool is_bvser = false
 
bool is_bvops = false
 
bool is_bvshift = false
 
bool is_rankc = false
 
bool is_agg = false
 
bool is_sv = false
 
bool is_csv = false
 
bool is_str_sv = false
 
bool is_c_coll = false
 
bool is_only_stress = false
 
bool is_nostress = false
 

Macro Definition Documentation

◆ BM_EXPAND

#define BM_EXPAND (   x)    x ## 1

Definition at line 19733 of file stress64.cpp.

◆ BMXORCOMP

#define BMXORCOMP

Definition at line 25 of file stress64.cpp.

◆ EXPAND

#define EXPAND (   x)    BM_EXPAND(x)

Definition at line 19734 of file stress64.cpp.

◆ MEM_DEBUG

#define MEM_DEBUG

Definition at line 239 of file stress64.cpp.

◆ POOL_SIZE

#define POOL_SIZE   5000

Definition at line 74 of file stress64.cpp.

Typedef Documentation

◆ bvect

Definition at line 339 of file stress64.cpp.

◆ bvect64

Definition at line 338 of file stress64.cpp.

◆ bvect_mini

Definition at line 340 of file stress64.cpp.

◆ dbg_alloc

Definition at line 336 of file stress64.cpp.

◆ ref_vect

typedef std::vector<bm::id64_t> ref_vect

Definition at line 365 of file stress64.cpp.

◆ rs_ind

Definition at line 341 of file stress64.cpp.

◆ rsc_sparse_vector_i32

Definition at line 372 of file stress64.cpp.

◆ rsc_sparse_vector_u32

Definition at line 371 of file stress64.cpp.

◆ rsc_sparse_vector_u64

Definition at line 13433 of file stress64.cpp.

◆ sparse_vector_i32

Definition at line 368 of file stress64.cpp.

◆ sparse_vector_i64

typedef bm::sparse_vector<signed long long, bvect > sparse_vector_i64

Definition at line 370 of file stress64.cpp.

◆ sparse_vector_u32

Definition at line 367 of file stress64.cpp.

◆ sparse_vector_u64

typedef bm::sparse_vector<unsigned long long, bvect > sparse_vector_u64

Definition at line 369 of file stress64.cpp.

◆ str_svect_type

Definition at line 17407 of file stress64.cpp.

Function Documentation

◆ AddressResolverTest()

static void AddressResolverTest ( )
static

◆ agg_shift_right_and()

static bool agg_shift_right_and ( bm::aggregator< bvect > &  agg,
bvect bv_target,
const bvect bv,
  ... 
)
static

◆ AggregatorTest()

static void AggregatorTest ( )
static

◆ AndOperationsTest()

static void AndOperationsTest ( )
static

◆ AndOrOperationsTest()

static void AndOrOperationsTest ( bool  detailed)
static

◆ ArenaTest()

static void ArenaTest ( )
static

◆ bit_decode_func()

static int bit_decode_func ( void *  handle_ptr,
bm::id64_t  bit_idx 
)
static

Definition at line 3108 of file stress64.cpp.

Referenced by BvectorBitForEachTest(), and RangeForEachTest().

◆ bit_decode_func2()

static int bit_decode_func2 ( void *  ,
bm::id64_t  bit_idx 
)
static

Definition at line 3116 of file stress64.cpp.

References assert, exit(), and prev().

Referenced by BvectorBitForEachTest().

◆ bvector_transform_11()

template<class SV >
void bvector_transform_11 ( typename SV::bvector_type &  bvect_in,
const SV &  sv_brel,
typename SV::bvector_type &  bvect_out 
)

Definition at line 14171 of file stress64.cpp.

References bm::set2set_11_transform< SV >::run().

Referenced by TestSparseVectorTransform().

◆ BvectorBitForEachTest()

static void BvectorBitForEachTest ( )
static

◆ BvectorBulkSetTest()

static void BvectorBulkSetTest ( )
static

◆ BVectorErase()

static void BVectorErase ( bvect bv,
bvect::size_type  pos 
)
static

◆ BvectorEraseTest()

static void BvectorEraseTest ( )
static

◆ BvectorFindFirstDiffTest()

static void BvectorFindFirstDiffTest ( )
static

◆ BvectorFindReverseTest()

static void BvectorFindReverseTest ( )
static

◆ BvectorIncTest()

static void BvectorIncTest ( )
static

◆ BVectorInsert()

static void BVectorInsert ( bvect bv,
bvect::size_type  pos,
bool  value 
)
static

◆ BvectorInsertTest()

static void BvectorInsertTest ( )
static

◆ BvectorShiftTest()

static void BvectorShiftTest ( )
static

◆ BVImportTest()

static void BVImportTest ( )
static

◆ CheckAllocLeaks()

static bool CheckAllocLeaks ( bool  details = false,
bool  abort = true 
)
static

◆ CheckBV_AND_OR()

template<typename BV >
void CheckBV_AND_OR ( BV &  bv_target,
const BV &  bv1,
const BV &  bv2 
)

◆ CheckGTSearch()

template<class SV >
void CheckGTSearch ( const SV &  sv,
typename SV::value_type  v,
bm::sparse_vector_scanner< SV > &  scanner 
)

◆ CheckRangeCopy()

void CheckRangeCopy ( const bvect bv,
bvect::size_type  from,
bvect::size_type  to 
)
inline

◆ CheckRangeDeserial()

static void CheckRangeDeserial ( const bvect bv,
bvect::size_type  from,
bvect::size_type  to 
)
static

◆ CheckSparseVectorFilter()

template<typename SV >
void CheckSparseVectorFilter ( const SV &  sv,
typename SV::size_type  factor 
)

Definition at line 14618 of file stress64.cpp.

References exit(), and i.

Referenced by TestSparseVectorFilter().

◆ CheckSparseVectorGather()

static void CheckSparseVectorGather ( const sparse_vector_u32 sv,
sparse_vector_u32::size_type  from,
sparse_vector_u32::size_type  to,
unsigned  control_value = 0 
)
static

◆ CheckSparseVectorGatherRandom()

static void CheckSparseVectorGatherRandom ( const sparse_vector_u32 sv,
sparse_vector_u32::size_type  gather_size 
)
static

◆ CheckSparseVectorRange()

template<typename SV >
void CheckSparseVectorRange ( const SV &  sv,
typename SV::size_type  left,
typename SV::size_type  right 
)

Definition at line 14461 of file stress64.cpp.

References assert, exit(), i, bm::use_null, and v2.

Referenced by TestSparseVectorRange().

◆ CheckStrSVCompare()

template<class STR_SV >
void CheckStrSVCompare ( const STR_SV &  str_sv,
typename STR_SV::size_type  limit = 0 
)

Definition at line 16664 of file stress64.cpp.

References assert, i, is_silent, and util::strcmp().

Referenced by StressTestStrSparseVector().

◆ CheckVectors()

void CheckVectors ( bvect_mini bvect_min,
bvect bvect_full,
bvect::size_type  size,
bool   
)
inline

◆ CompareEnumerators()

static void CompareEnumerators ( const bvect::enumerator en1,
const bvect::enumerator en2 
)
static

◆ ComparisonTest()

static void ComparisonTest ( )
static

◆ CountRangeTest()

static void CountRangeTest ( )
static

◆ DesrializationTest2()

static void DesrializationTest2 ( )
static

◆ DetailedCompareBVectors()

template<class BV >
void DetailedCompareBVectors ( const BV &  bv1,
const BV &  bv2 
)

◆ EmptyBVTest()

static void EmptyBVTest ( )
static

◆ EnumeratorTest()

static void EnumeratorTest ( )
static

◆ EraseStrCollection()

static void EraseStrCollection ( str_svect_type str_sv)
static

◆ EraseSVCollection()

template<typename SV >
void EraseSVCollection ( SV &  sv)

Definition at line 17640 of file stress64.cpp.

References assert.

Referenced by TestSignedSparseSort(), and TestSparseSort().

◆ ExportTest()

static void ExportTest ( )
static

Definition at line 1184 of file stress64.cpp.

References assert, buf, cnt, bm::bvector< Alloc >::count(), bm::export_array(), and bm::bvector< Alloc >::test().

Referenced by main().

◆ FindLastBit()

static bool FindLastBit ( const bvect bv,
bvect::size_type last_pos 
)
static

◆ FreezeTest()

static void FreezeTest ( )
static

◆ GAPTestStress()

static void GAPTestStress ( )
static

◆ generate_sparse_bv()

static void generate_sparse_bv ( bvect bv,
bvect::size_type  from,
bvect::size_type  to,
bvect::size_type  step = 65536 / 10 
)
static

Definition at line 5642 of file stress64.cpp.

References i, and bm::bvector< Alloc >::set().

Referenced by RangeDeserializationTest(), and SparseSerializationTest().

◆ GeneratePipelineTestData()

void GeneratePipelineTestData ( std::vector< string > &  str_coll,
str_svect_type str_sv,
unsigned  max_coll = 8000000,
unsigned  repeat_factor = 10 
)
inline

◆ GenerateTestCollection()

static void GenerateTestCollection ( std::vector< bvect > *  target,
unsigned  count,
bvect::size_type  vector_max 
)
static

Definition at line 11416 of file stress64.cpp.

References assert, bm::bvector< Alloc >::count(), FillSetsRandomMethod(), and i.

Referenced by StressTestAggregatorShiftAND().

◆ GenericBVectorTest()

static void GenericBVectorTest ( )
static

◆ GetNextTest()

static void GetNextTest ( )
static

◆ IntervalEnumeratorTest()

static void IntervalEnumeratorTest ( )
static

◆ IsAllOneRangeTest()

static void IsAllOneRangeTest ( )
static

◆ KeepRangeTest()

static void KeepRangeTest ( )
static

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 19814 of file stress64.cpp.

References AddressResolverTest(), AggregatorTest(), AndOperationsTest(), AndOrOperationsTest(), ArenaTest(), dbg_block_allocator::balance(), dbg_ptr_allocator::balance(), BvectorBitForEachTest(), BvectorBulkSetTest(), BvectorEraseTest(), BvectorFindFirstDiffTest(), BvectorFindReverseTest(), BvectorIncTest(), BvectorInsertTest(), BvectorShiftTest(), BVImportTest(), CheckAllocLeaks(), ComparisonTest(), CountRangeTest(), DesrializationTest2(), EmptyBVTest(), EnumeratorTest(), exit(), ExportTest(), FreezeTest(), GAPTestStress(), GenericBVectorTest(), GetNextTest(), IntervalEnumeratorTest(), is_agg, is_all, is_bvbasic, is_bvops, is_bvser, is_bvshift, is_c_coll, is_csv, is_nostress, is_only_stress, is_rankc, is_str_sv, is_sv, IsAllOneRangeTest(), KeepRangeTest(), dbg_block_allocator::na_, dbg_ptr_allocator::na_, OptimizeTest(), OrOperationsTest(), parse_args(), RangeCopyTest(), RangeDeserializationTest(), RangeRandomFillTest(), RankFindTest(), ResizeTest(), RSIndexTest(), SerializationTest(), SetTest(), SimpleRandomFillTest(), SparseSerializationTest(), start_time, StressTest(), StressTestAggregatorAND(), StressTestAggregatorOR(), StressTestAggregatorShiftAND(), StressTestStrSparseVector(), SubOperationsTest(), SyntaxTest(), TestCompressedCollection(), TestCompressedSparseVectorAlgo(), TestCompressedSparseVectorScan(), TestCompressedSparseVectorScanGT(), TestCompressSparseGather(), TestCompressSparseSignedVector(), TestCompressSparseVector(), TestCompressSparseVectorSerial(), TestRankCompress(), TestSignedSparseSort(), TestSignedSparseVector(), TestSignedSparseVectorScan(), TestSignedSparseVectorSerial(), TestSparseFindEqStrPipeline(), TestSparseSort(), TestSparseVector(), TestSparseVector_Stress(), TestSparseVectorAlgo(), TestSparseVectorFilter(), TestSparseVectorGatherDecode(), TestSparseVectorInserter(), TestSparseVectorRange(), TestSparseVectorScan(), TestSparseVectorSerial(), TestSparseVectorSerialization2(), TestSparseVectorTransform(), TestStrSparseSort(), TestStrSparseVector(), and XorOperationsTest().

◆ optimize_fill()

static void optimize_fill ( bvect bv,
bvect::size_type  base,
unsigned  inc,
bvect::size_type  max_bits = bm::gap_max_bits,
bool  value = true 
)
static

◆ OptimizeTest()

static void OptimizeTest ( )
static

◆ OrOperationsTest()

static void OrOperationsTest ( )
static

◆ parse_args()

static int parse_args ( int  argc,
char *  argv[] 
)
static

◆ pool_allocate()

template<class T >
T* pool_allocate ( T **  pool,
int i,
size_t  n 
)

Definition at line 80 of file stress64.cpp.

References i, malloc(), n, and T.

Referenced by pool_block_allocator::allocate().

◆ pool_allocate2()

void* pool_allocate2 ( void **  pool,
int i,
size_t  n 
)
inline

Definition at line 85 of file stress64.cpp.

References i, malloc(), and n.

Referenced by pool_ptr_allocator::allocate().

◆ pool_free()

template<class T >
void pool_free ( T **  pool,
int i,
T p 
)

Definition at line 92 of file stress64.cpp.

References free(), i, and POOL_SIZE.

Referenced by pool_block_allocator::deallocate(), and pool_ptr_allocator::deallocate().

◆ print_bv()

static void print_bv ( const bvect bv)
static

◆ PrintStacks()

void PrintStacks ( unsigned  max_cnt = 10)
inline

Definition at line 19538 of file stress64.cpp.

References cnt.

Referenced by CheckAllocLeaks().

◆ RangeCopyTest()

static void RangeCopyTest ( )
static

◆ RangeDeserializationTest()

static void RangeDeserializationTest ( )
static

◆ RangeForEachTest()

static void RangeForEachTest ( bvect::size_type  from,
bvect::size_type  to 
)
static

◆ RangeRandomFillTest()

static void RangeRandomFillTest ( )
static

Definition at line 4560 of file stress64.cpp.

References assert, BITVECT_SIZE, CheckVectors(), FillSets(), FillSetsIntervals(), bm::id_max32, ITERATIONS, max(), and min().

Referenced by main().

◆ RankFindTest()

static void RankFindTest ( )
static

◆ ResizeTest()

static void ResizeTest ( )
static

◆ RSIndexTest()

static void RSIndexTest ( )
static

◆ SerializationOperation()

static bvect::size_type SerializationOperation ( bvect bv_target,
bvect bv1,
bvect bv2,
set_operation  op,
bool  check_reverse = false 
)
static

◆ SerializationOperation2Test()

static void SerializationOperation2Test ( bvect bv_target,
bvect bv1,
bvect bv2,
bvect::size_type  predicted_count,
set_operation  op_count,
set_operation  op_combine 
)
static

◆ SerializationTest()

static void SerializationTest ( )
static

◆ SetTest()

static void SetTest ( )
static

◆ ShiftRight()

static void ShiftRight ( bvect bv,
bvect::size_type  shift 
)
static

◆ show_help()

static void show_help ( )
static

Definition at line 19596 of file stress64.cpp.

Referenced by parse_args().

◆ SimpleRandomFillTest()

static void SimpleRandomFillTest ( )
static

◆ SparseSerializationTest()

static void SparseSerializationTest ( )
static

◆ StressTest()

static void StressTest ( unsigned  repetitions,
int  set_operation = -1 
)
static

Definition at line 10014 of file stress64.cpp.

References bm::any_and(), bm::any_or(), bm::any_sub(), bm::any_xor(), assert, b, bm::bvector< Alloc >::bit_and(), bm::bvector< Alloc >::bit_or(), bm::bvector< Alloc >::bit_sub(), bm::bvector< Alloc >::bit_xor(), BITVECT_SIZE, bm::BM_BIT, bm::BM_GAP, bm::byte_buffer_ptr::buf(), bm::serializer< BV >::byte_order_serialization(), bm::bvector< Alloc >::calc_stat(), CheckVectors(), bm::bvector< Alloc >::clear(), bm::bvector_mini< A >::combine_and(), bm::bvector_mini< A >::combine_or(), bm::bvector_mini< A >::combine_sub(), bm::bvector_mini< A >::combine_xor(), bm::bvector< Alloc >::compare(), bm::bvector_mini< A >::compare(), bm::bvector< Alloc >::count(), bm::count_and(), bm::count_or(), bm::count_sub(), bm::count_xor(), bm::deserialize(), bm::operation_deserializer< BV >::deserialize(), exit(), FillSetsRandomMethod(), bm::serializer< BV >::gap_length_serialization(), generate_vect48(), generate_vect_simpl0(), bm::bvector< Alloc >::get_first(), i, bm::id_max32, load_BV_set_ref(), bm::bv_statistics::max_serialize_mem, bm::bv_statistics::memory_used, bm::bvector< Alloc >::optimize(), SerializationOperation(), SerializationOperation2Test(), bm::serializer< BV >::serialize(), bm::set_AND, bm::bvector< Alloc >::set_bit_conditional(), bm::serializer< BV >::set_bookmarks(), bm::set_COUNT_AND, bm::set_COUNT_OR, bm::set_COUNT_SUB_AB, bm::set_COUNT_XOR, bm::bvector< Alloc >::set_gap_levels(), bm::bvector< Alloc >::set_new_blocks_strat(), bm::set_OR, bm::set_SUB, bm::set_XOR, ncbi::grid::netcache::search::fields::size, bm::byte_buffer_ptr::size(), TestAND_OR(), TestRandomSubset(), and VisitorAllRangeTest().

Referenced by main().

◆ StressTestAggregatorAND()

static void StressTestAggregatorAND ( unsigned  repetitions)
static

◆ StressTestAggregatorOR()

static void StressTestAggregatorOR ( unsigned  repetitions)
static

◆ StressTestAggregatorShiftAND()

static void StressTestAggregatorShiftAND ( unsigned  repeats)
static

◆ StressTestStrSparseVector()

static void StressTestStrSparseVector ( )
static

◆ SubOperationsTest()

static void SubOperationsTest ( )
static

◆ SyntaxTest()

static void SyntaxTest ( )
static

◆ test_kmers()

void test_kmers ( )
inline

◆ TestAND_OR()

static void TestAND_OR ( bm::random_subset< bvect > &  rsub,
bvect::size_type  count,
const bvect bvect_full1,
const bvect bvect_full2 
)
static

◆ TestCompressedCollection()

static void TestCompressedCollection ( )
static

◆ TestCompressedSparseVectorAlgo()

static void TestCompressedSparseVectorAlgo ( )
static

◆ TestCompressedSparseVectorScan()

static void TestCompressedSparseVectorScan ( )
static

◆ TestCompressedSparseVectorScanGT()

static void TestCompressedSparseVectorScanGT ( )
static

◆ TestCompressSparseGather()

static void TestCompressSparseGather ( )
static

◆ TestCompressSparseSignedVector()

static void TestCompressSparseSignedVector ( )
static

Definition at line 15820 of file stress64.cpp.

References bm::rsc_sparse_vector< Val, SV >::back_insert_iterator::add(), bm::rsc_sparse_vector< Val, SV >::back_insert_iterator::add_null(), bm::rsc_sparse_vector< Val, SV >::const_iterator::advance(), arr, assert, bm::sparse_vector< Val, BV >::at(), bm::rsc_sparse_vector< Val, SV >::at(), b, BM_DECLARE_TEMP_BLOCK, CheckCompressedDecode(), bm::rsc_sparse_vector< Val, SV >::clear(), bm::sparse_vector< Val, BV >::clear(), bm::rsc_sparse_vector< Val, SV >::copy_range(), bm::rsc_sparse_vector< Val, SV >::decode(), bm::rsc_sparse_vector< Val, SV >::decode_buf(), DetailedCheckCompressedDecode(), DetailedCompareSparseVectors(), eq(), bm::rsc_sparse_vector< Val, SV >::equal(), exit(), bm::sparse_vector_scanner< SV, S_FACTOR >::find_eq(), bm::bvector< Alloc >::find_range(), first(), bm::rsc_sparse_vector< Val, SV >::back_insert_iterator::flush(), generate_bvector(), GenerateSV(), bm::rsc_sparse_vector< Val, SV >::get(), bm::rsc_sparse_vector< Val, SV >::get_back_inserter(), bm::bvector< Alloc >::get_enumerator(), bm::bvector< Alloc >::enumerator::go_to(), i, bm::id_max, bm::rsc_sparse_vector< Val, SV >::in_sync(), bm::rsc_sparse_vector< Val, SV >::inc(), bm::rsc_sparse_vector< Val, SV >::const_iterator::is_null(), bm::rsc_sparse_vector< Val, SV >::is_null(), last(), bm::rsc_sparse_vector< Val, SV >::load_from(), bm::rsc_sparse_vector< Val, SV >::load_to(), bm::rsc_sparse_vector< Val, SV >::merge_not_null(), bm::bvector< Alloc >::optimize(), bm::rsc_sparse_vector< Val, SV >::optimize(), bm::sparse_vector< Val, BV >::optimize(), bm::rsc_sparse_vector< Val, SV >::push_back(), bm::sparse_vector< Val, BV >::set(), bm::rsc_sparse_vector< Val, SV >::set(), bm::rsc_sparse_vector< Val, SV >::set_null(), ncbi::grid::netcache::search::fields::size, bm::rsc_sparse_vector< Val, SV >::size(), bm::rsc_sparse_vector< Val, SV >::sync(), bm::use_null, bm::bvector< Alloc >::iterator_base::valid(), bm::rsc_sparse_vector< Val, SV >::const_iterator::valid(), and bm::rsc_sparse_vector< Val, SV >::const_iterator::value().

Referenced by main().

◆ TestCompressSparseVector()

static void TestCompressSparseVector ( )
static

Definition at line 15250 of file stress64.cpp.

References assert, bm::sparse_vector< Val, BV >::at(), bm::rsc_sparse_vector< Val, SV >::at(), BM_DECLARE_TEMP_BLOCK, bm::BM_UNKNOWN, buf, CheckCompressedDecode(), bm::sparse_vector< Val, BV >::clear(), bm::rsc_sparse_vector< Val, SV >::clear_all(), DetailedCheckCompressedDecode(), DetailedCompareSparseVectors(), eq(), bm::rsc_sparse_vector< Val, SV >::equal(), exit(), bm::sparse_vector_scanner< SV, S_FACTOR >::find_eq(), first(), g(), bm::rsc_sparse_vector< Val, SV >::gather(), GenerateSV(), bm::rsc_sparse_vector< Val, SV >::get(), bm::rsc_sparse_vector< Val, SV >::get_unsigned_bits(), bm::bvector< Alloc >::enumerator::go_to(), i, bm::id_max, bm::id_max32, bm::rsc_sparse_vector< Val, SV >::in_sync(), bm::rsc_sparse_vector< Val, SV >::inc(), bm::rsc_sparse_vector< Val, SV >::is_null(), last(), bm::rsc_sparse_vector< Val, SV >::load_from(), bm::rsc_sparse_vector< Val, SV >::load_to(), bm::rsc_sparse_vector< Val, SV >::merge_not_null(), bm::rsc_sparse_vector< Val, SV >::optimize(), bm::sparse_vector< Val, BV >::optimize(), bm::rsc_sparse_vector< Val, SV >::push_back(), bm::sparse_vector< Val, BV >::set(), bm::rsc_sparse_vector< Val, SV >::set(), bm::rsc_sparse_vector< Val, SV >::set_null(), ncbi::grid::netcache::search::fields::size, bm::sparse_vector< Val, BV >::size(), bm::rsc_sparse_vector< Val, SV >::size(), bm::rsc_sparse_vector< Val, SV >::sync(), bm::use_null, and bm::bvector< Alloc >::iterator_base::valid().

Referenced by main().

◆ TestCompressSparseVectorSerial()

static void TestCompressSparseVectorSerial ( )
static

◆ TestRandomSubset()

static void TestRandomSubset ( const bvect bv,
bm::random_subset< bvect > &  rsub,
bvect::size_type  limit = 0 
)
static

◆ TestRankCompress()

static void TestRankCompress ( )
static

◆ TestSignedSparseSort()

static void TestSignedSparseSort ( )
static

◆ TestSignedSparseVector()

static void TestSignedSparseVector ( )
static

◆ TestSignedSparseVectorScan()

static void TestSignedSparseVectorScan ( )
static

◆ TestSignedSparseVectorSerial()

static void TestSignedSparseVectorSerial ( )
static

◆ TestSparseFindEqStrPipeline()

static void TestSparseFindEqStrPipeline ( )
static

◆ TestSparseSort()

static void TestSparseSort ( )
static

◆ TestSparseVector()

static void TestSparseVector ( )
static

Definition at line 11509 of file stress64.cpp.

References arr, assert, bm::sparse_vector< Val, BV >::at(), bm::sparse_vector< Val, BV >::begin(), bm::sparse_vector_scanner< SV, S_FACTOR >::bfind(), bm::bv_statistics::bit_blocks, bm::sparse_vector_serial_layout< SV >::buf(), buf, bm::sparse_vector< Val, BV >::calc_stat(), bm::sparse_vector< Val, BV >::clear(), bm::sparse_vector< Val, BV >::clear_all(), bm::sparse_vector< Val, BV >::clear_range(), compare_SV_set_ref(), CompareSparseVector(), bm::sparse_vector< unsigned, bm::bvector<> >::const_iterator, copy(), bm::bvector< Alloc >::count(), bm::dynamic_range_clip_high(), bm::dynamic_range_clip_low(), bm::sparse_vector< Val, BV >::end(), bm::sparse_vector< Val, BV >::equal(), bm::sparse_vector< Val, BV >::erase(), exit(), bm::sparse_vector< Val, BV >::extract(), bm::sparse_vector< Val, BV >::extract_planes(), bm::sparse_vector< Val, BV >::extract_range(), bm::sparse_vector_scanner< SV, S_FACTOR >::find_nonzero(), bm::sparse_vector< Val, BV >::back_insert_iterator::flush(), bm::bv_statistics::gap_blocks, bm::gap_max_bits, generate_vect48(), generate_vect_simpl0(), bm::sparse_vector< Val, BV >::get(), bm::sparse_vector< Val, BV >::get_back_inserter(), bm::base_sparse_vector< Val, BV, MAX_SIZE >::get_null_bvector(), i, bm::id_max, bm::id_max32, bm::sparse_vector< Val, BV >::import(), bm::sparse_vector< Val, BV >::inc(), bm::sparse_vector< Val, BV >::insert(), bm::base_sparse_vector< Val, BV, MAX_SIZE >::is_null(), bm::base_sparse_vector< Val, BV, MAX_SIZE >::is_nullable(), bm::sparse_vector< Val, BV >::join(), load_SV_set_ref(), bm::sparse_vector< Val, BV >::merge(), n, bm::bvector< Alloc >::opt_compress, bm::sparse_vector< Val, BV >::optimize(), bm::print_svector_stat(), bm::sparse_vector< Val, BV >::push_back(), bm::sparse_vector< Val, BV >::push_back_null(), bm::sparse_vector< Val, BV >::resize(), bm::sparse_vector< Val, BV >::set(), bm::sparse_vector< Val, BV >::set_null(), bm::set_sub_array_size, bm::sparse_vector< Val, BV >::size(), bm::sparse_vector_deserialize(), bm::sparse_vector_serialize(), bm::sparse_vector< Val, BV >::swap(), bm::use_null, and v2.

Referenced by main().

◆ TestSparseVector_Stress()

static void TestSparseVector_Stress ( unsigned  count)
static

◆ TestSparseVectorAlgo()

static void TestSparseVectorAlgo ( )
static

◆ TestSparseVectorFilter()

static void TestSparseVectorFilter ( )
static

◆ TestSparseVectorGatherDecode()

static void TestSparseVectorGatherDecode ( )
static

◆ TestSparseVectorInserter()

static void TestSparseVectorInserter ( )
static

◆ TestSparseVectorRange()

static void TestSparseVectorRange ( )
static

◆ TestSparseVectorScan()

static void TestSparseVectorScan ( )
static

◆ TestSparseVectorSerial()

static void TestSparseVectorSerial ( )
static

◆ TestSparseVectorSerialization2()

static void TestSparseVectorSerialization2 ( )
static

◆ TestSparseVectorTransform()

static void TestSparseVectorTransform ( )
static

◆ TestStrSparseSort()

static void TestStrSparseSort ( )
static

◆ TestStrSparseVector()

static void TestStrSparseVector ( )
static

Definition at line 16696 of file stress64.cpp.

References assert, bm::str_sparse_vector< CharType, BV, STR_SIZE >::assign(), b, bm::sparse_vector_scanner< SV, S_FACTOR >::bfind_eq_str(), bm::sparse_vector_scanner< SV, S_FACTOR >::bind(), BM_DECLARE_TEMP_BLOCK, bm::sparse_vector_serial_layout< SV >::buf(), buf, bm::str_sparse_vector< CharType, BV, STR_SIZE >::build_octet_remap(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::calc_octet_stat(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::clear(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::clear_range(), bm::heap_matrix< Val, ROWS, COLS, BVAlloc >::cols(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::compare(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::decode(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::effective_max_str(), eq(), bm::bvector< Alloc >::equal(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::equal(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::erase(), exit(), bm::sparse_vector_scanner< SV, S_FACTOR >::find_eq_str(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::back_insert_iterator::flush(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::get(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::get_back_inserter(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::const_iterator::go_to(), i, bm::id_max, bm::str_sparse_vector< CharType, BV, STR_SIZE >::import(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::insert(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::const_iterator::is_null(), bm::base_sparse_vector< Val, BV, MAX_SIZE >::is_null(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::is_remap(), bm::sparse_vector_scanner< SV, S_FACTOR >::lower_bound_str(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::optimize(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::push_back(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::recalc_remap_matrix2(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::remap_from(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::remap_fromsv(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::remap_tosv(), bm::heap_matrix< Val, ROWS, COLS, BVAlloc >::row(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::set(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::set_null(), bm::str_sparse_vector< CharType, BV, STR_SIZE >::size(), bm::sparse_vector_deserialize(), str(), util::strcmp(), bm::use_null, bm::str_sparse_vector< CharType, BV, STR_SIZE >::const_iterator::valid(), and bm::str_sparse_vector< CharType, BV, STR_SIZE >::const_iterator::value().

Referenced by main().

◆ verify_all_one_ranges()

static void verify_all_one_ranges ( const bvect bv,
bool  all_one 
)
static

◆ VerifyCountRange()

static void VerifyCountRange ( const bvect bv,
const bvect::rs_index_type bc_arr,
bvect::size_type  from,
bvect::size_type  to 
)
static

◆ VisitorAllRangeTest()

template<class BV >
void VisitorAllRangeTest ( const BV &  bv,
typename BV::size_type  step 
)

◆ XorOperationsTest()

static void XorOperationsTest ( )
static

Variable Documentation

◆ from_arr

bvect::size_type from_arr[] = { 0, 0, 0, 0, 7, 1, 0, 65535, 65535, 0, 0, bm::id_max/2-2001, bm::id_max-2000}

Definition at line 2589 of file stress64.cpp.

Referenced by IsAllOneRangeTest(), and verify_all_one_ranges().

◆ is_agg

bool is_agg = false

Definition at line 19627 of file stress64.cpp.

Referenced by main(), and parse_args().

◆ is_all

bool is_all = true

Definition at line 19619 of file stress64.cpp.

Referenced by main(), and parse_args().

◆ is_bvbasic

bool is_bvbasic = false

Definition at line 19622 of file stress64.cpp.

Referenced by main(), and parse_args().

◆ is_bvops

bool is_bvops = false

Definition at line 19624 of file stress64.cpp.

Referenced by main(), and parse_args().

◆ is_bvser

bool is_bvser = false

Definition at line 19623 of file stress64.cpp.

Referenced by main(), and parse_args().

◆ is_bvshift

bool is_bvshift = false

Definition at line 19625 of file stress64.cpp.

Referenced by main(), and parse_args().

◆ is_c_coll

bool is_c_coll = false

Definition at line 19631 of file stress64.cpp.

Referenced by main(), and parse_args().

◆ is_csv

bool is_csv = false

Definition at line 19629 of file stress64.cpp.

Referenced by main(), and parse_args().

◆ is_low_level

bool is_low_level = false

Definition at line 19620 of file stress64.cpp.

Referenced by parse_args().

◆ is_nostress

bool is_nostress = false

Definition at line 19633 of file stress64.cpp.

Referenced by main(), and parse_args().

◆ is_only_stress

bool is_only_stress = false

Definition at line 19632 of file stress64.cpp.

Referenced by main(), and parse_args().

◆ is_rankc

bool is_rankc = false

Definition at line 19626 of file stress64.cpp.

Referenced by main(), and parse_args().

◆ is_silent

bool is_silent = false

Definition at line 78 of file stress64.cpp.

Referenced by CheckStrSVCompare(), and TestCompressSparseGather().

◆ is_str_sv

bool is_str_sv = false

Definition at line 19630 of file stress64.cpp.

Referenced by main(), and parse_args().

◆ is_support

bool is_support = false

Definition at line 19621 of file stress64.cpp.

Referenced by parse_args().

◆ is_sv

bool is_sv = false

Definition at line 19628 of file stress64.cpp.

Referenced by main(), and parse_args().

◆ ITERATIONS

const unsigned ITERATIONS = 180000

◆ to_arr

bvect::size_type to_arr[] = { 0, 1, 16, 32, 31, 255, 65535, 65536, 65536*2, 65537, bm::id_max/2-2000, bm::id_max/2+2000, bm::id_max-1}

Definition at line 2591 of file stress64.cpp.

Referenced by IsAllOneRangeTest(), and verify_all_one_ranges().

Modified on Mon Apr 22 04:01:24 2024 by modify_doxy.py rev. 669887