BitMagic-C++
|
Pipeline to run multiple searches against a particular SV faster using cache optimizations. More...
#include <bmsparsevec_algo.h>
Public Types | |
typedef aggregator_type::template pipeline< Opt > | aggregator_pipeline_type |
Public Member Functions | |
pipeline (const SV &sv) | |
run_options & | options () BMNOEXCEPT |
Set pipeline run options. More... | |
const run_options & | get_options () const BMNOEXCEPT |
Get pipeline run options. More... | |
void | set_search_mask (const bvector_type *bv_mask) BMNOEXCEPT |
Set pipeline mask bit-vector to restrict the search space. More... | |
void | set_search_count_limit (size_type limit) BMNOEXCEPT |
Set search limit for results. More... | |
void | set_or_target (bvector_type *bv_or) BMNOEXCEPT |
Attach OR (aggregator vector). More... | |
pipeline fill-in methods | |
class | sparse_vector_scanner |
const SV & | sv_ |
target sparse vector ref More... | |
aggregator_pipeline_type | agg_pipe_ |
traget aggregator pipeline More... | |
remap_vector_type | remap_value_vect_ |
remap buffer More... | |
const bvector_type * | bv_and_mask_ |
size_t | eff_slices_ |
number of effectice NOT NULL value slices More... | |
void | add (const typename SV::value_type *str) |
Add new search string. More... | |
void | complete () |
Prepare pipeline for the execution (resize and init internal structures) Once complete, you cannot add() to it. More... | |
bool | is_complete () const BMNOEXCEPT |
More... | |
size_type | size () const BMNOEXCEPT |
More... | |
bvect_vector_type & | get_bv_res_vector () BMNOEXCEPT |
Return results vector used for pipeline execution. More... | |
bv_count_vector_type & | get_bv_count_vector () BMNOEXCEPT |
Return results vector count used for pipeline execution. More... | |
aggregator_pipeline_type & | get_aggregator_pipe () BMNOEXCEPT |
get aggregator pipeline (access to compute internals) More... | |
pipeline (const pipeline &)=delete | |
pipeline & | operator= (const pipeline &)=delete |
Pipeline to run multiple searches against a particular SV faster using cache optimizations.
USAGE:
Definition at line 537 of file bmsparsevec_algo.h.
void bm::sparse_vector_scanner< SV >::pipeline< Opt >::add | ( | const typename SV::value_type * | str | ) |
Add new search string.
str | - zero terminated string pointer to configure a search for |
Definition at line 2948 of file bmsparsevec_algo.h.
References bm::sparse_vector_scanner< SV >::add_agg_char(), and BM_ASSERT.
Referenced by main().
|
inline |
Prepare pipeline for the execution (resize and init internal structures) Once complete, you cannot add() to it.
Definition at line 593 of file bmsparsevec_algo.h.
References bm::sparse_vector_scanner< SV >::pipeline< Opt >::agg_pipe_.
Referenced by main().
|
inline |
get aggregator pipeline (access to compute internals)
Definition at line 615 of file bmsparsevec_algo.h.
References bm::sparse_vector_scanner< SV >::pipeline< Opt >::agg_pipe_.
|
inline |
Return results vector count used for pipeline execution.
Definition at line 607 of file bmsparsevec_algo.h.
References bm::sparse_vector_scanner< SV >::pipeline< Opt >::agg_pipe_.
|
inline |
Return results vector used for pipeline execution.
Definition at line 603 of file bmsparsevec_algo.h.
References bm::sparse_vector_scanner< SV >::pipeline< Opt >::agg_pipe_.
Referenced by main().
|
inline |
Get pipeline run options.
Definition at line 553 of file bmsparsevec_algo.h.
References bm::sparse_vector_scanner< SV >::pipeline< Opt >::agg_pipe_.
|
inline |
Definition at line 595 of file bmsparsevec_algo.h.
References bm::sparse_vector_scanner< SV >::pipeline< Opt >::agg_pipe_.
|
inline |
Set pipeline run options.
Definition at line 549 of file bmsparsevec_algo.h.
References bm::sparse_vector_scanner< SV >::pipeline< Opt >::agg_pipe_.
Referenced by main().
|
inline |
Attach OR (aggregator vector).
Pipeline results all will be OR-ed (UNION) into the OR target vector
bv_or | - OR target vector |
Definition at line 578 of file bmsparsevec_algo.h.
References bm::sparse_vector_scanner< SV >::pipeline< Opt >::agg_pipe_.
|
inline |
Set search limit for results.
Requires that bit-counting to be enabled in the template parameters. Warning: search limit is approximate (for performance reasons) so it can occasinally find more than requested. It cannot find less. Search limit works for individual results (not ORed aggregate)
limit | - search limit (target population count to search for) |
Definition at line 570 of file bmsparsevec_algo.h.
References bm::sparse_vector_scanner< SV >::pipeline< Opt >::agg_pipe_.
void bm::sparse_vector_scanner< SV >::pipeline< Opt >::set_search_mask | ( | const bvector_type * | bv_mask | ) |
Set pipeline mask bit-vector to restrict the search space.
bv_mask | - pointer to bit-vector restricting search to vector indexes marked as 1s. Pointer ownership is not transferred, NULL value resets the mask. bv_mask defines the mask for all added searches. |
Definition at line 2937 of file bmsparsevec_algo.h.
|
inline |
Definition at line 598 of file bmsparsevec_algo.h.
References bm::sparse_vector_scanner< SV >::pipeline< Opt >::agg_pipe_.
|
protected |
traget aggregator pipeline
Definition at line 625 of file bmsparsevec_algo.h.
Referenced by bm::sparse_vector_scanner< SV >::pipeline< Opt >::complete(), bm::sparse_vector_scanner< SV >::pipeline< Opt >::get_aggregator_pipe(), bm::sparse_vector_scanner< SV >::pipeline< Opt >::get_bv_count_vector(), bm::sparse_vector_scanner< SV >::pipeline< Opt >::get_bv_res_vector(), bm::sparse_vector_scanner< SV >::pipeline< Opt >::get_options(), bm::sparse_vector_scanner< SV >::pipeline< Opt >::is_complete(), bm::sparse_vector_scanner< SV >::pipeline< Opt >::options(), bm::sparse_vector_scanner< SV >::pipeline< Opt >::set_or_target(), bm::sparse_vector_scanner< SV >::pipeline< Opt >::set_search_count_limit(), and bm::sparse_vector_scanner< SV >::pipeline< Opt >::size().
|
protected |
number of effectice NOT NULL value slices
Definition at line 628 of file bmsparsevec_algo.h.
|
protected |
remap buffer
Definition at line 626 of file bmsparsevec_algo.h.
|
protected |
target sparse vector ref
Definition at line 624 of file bmsparsevec_algo.h.