bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt > Class Template Reference

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.
const run_options & | get_options () const BMNOEXCEPT
| Get pipeline run options.
void | set_search_mask (const bvector_type *bv_mask) BMNOEXCEPT
| Set pipeline mask bit-vector to restrict the search space.
void | set_search_count_limit (size_type limit) BMNOEXCEPT
| Set search limit for results.
void | set_or_target (bvector_type *bv_or) BMNOEXCEPT
| Attach OR (aggregator vector).

## pipeline fill-in methods

class | sparse_vector_scanner
const SV & | sv_
| target sparse vector ref
aggregator_pipeline_type | agg_pipe_
| traget aggregator pipeline
remap_vector_type | remap_value_vect_
| remap buffer
const bvector_type * | bv_and_mask_
size_t | eff_slices_
| number of effectice NOT NULL value slices
void | add (const typename SV::value_type *str)
| Add new search string.
void | complete ()
| Prepare pipeline for the execution (resize and init internal structures) Once complete, you cannot add() to it.
bool | is_complete () const BMNOEXCEPT
size_type | size () const BMNOEXCEPT
bvect_vector_type & | get_bv_res_vector () BMNOEXCEPT
| Return results vector used for pipeline execution.
bv_count_vector_type & | get_bv_count_vector () BMNOEXCEPT
| Return results vector count used for pipeline execution.
aggregator_pipeline_type & | get_aggregator_pipe () BMNOEXCEPT
| get aggregator pipeline (access to compute internals)
| pipeline (const pipeline &)=delete
pipeline & | operator= (const pipeline &)=delete

## Detailed Description

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>
class bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >

Pipeline to run multiple searches against a particular SV faster using cache optimizations.

USAGE:

- setup the pipeline (add searches)
- run all searches at once
- get the search results (in the order it was added)

Examples
  strsvsample07.cpp.

Definition at line 619 of file bmsparsevec_algo.h.

## Member Typedef Documentation

## aggregator_pipeline_type

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

typedef aggregator_type::template pipeline<Opt> bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::aggregator_pipeline_type

Definition at line 623 of file bmsparsevec_algo.h.

## Constructor & Destructor Documentation

## pipeline() [1/2]

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::pipeline | ( | const SV & | sv | ) |

inline

Definition at line 625 of file bmsparsevec_algo.h.

References bv_and_mask_, eff_slices_, and sv_.

Referenced by operator=(), and pipeline().

## pipeline() [2/2]

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::pipeline | ( | const pipeline< Opt > & |  | ) |

protected delete

References pipeline().

## Member Function Documentation

## add()

template<typename SV, unsigned S_FACTOR>
template<class Opt>

void bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::add | ( | const typename SV::value_type * | str | ) |

Add new search string.

Parameters

  str | - zero terminated string pointer to configure a search for

Definition at line 3247 of file bmsparsevec_algo.h.

References add(), bm::sparse_vector_scanner< SV, S_FACTOR >::add_agg_char(), agg_pipe_, BM_ASSERT, bv_and_mask_, eff_slices_, bm::sparse_vector_scanner< SV, S_FACTOR >::remap_tosv(), remap_value_vect_, and sv_.

Referenced by add(), and main().

## complete()

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

void bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::complete | ( |  | ) |

inline

Prepare pipeline for the execution (resize and init internal structures) Once complete, you cannot add() to it.

Definition at line 675 of file bmsparsevec_algo.h.

References agg_pipe_.

Referenced by main().

## get_aggregator_pipe()

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

aggregator_pipeline_type & bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::get_aggregator_pipe | ( |  | ) |

inline

get aggregator pipeline (access to compute internals)

Definition at line 697 of file bmsparsevec_algo.h.

References agg_pipe_, and BMNOEXCEPT.

## get_bv_count_vector()

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

bv_count_vector_type & bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::get_bv_count_vector | ( |  | ) |

inline

Return results vector count used for pipeline execution.

Definition at line 689 of file bmsparsevec_algo.h.

References agg_pipe_, and BMNOEXCEPT.

## get_bv_res_vector()

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

bvect_vector_type & bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::get_bv_res_vector | ( |  | ) |

inline

Return results vector used for pipeline execution.

Definition at line 685 of file bmsparsevec_algo.h.

References agg_pipe_, and BMNOEXCEPT.

Referenced by main().

## get_options()

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

const run_options & bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::get_options | ( |  | ) | const

inline

Get pipeline run options.

Definition at line 635 of file bmsparsevec_algo.h.

References agg_pipe_, and BMNOEXCEPT.

## is_complete()

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

bool bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::is_complete | ( |  | ) | const

inline

Definition at line 677 of file bmsparsevec_algo.h.

References agg_pipe_, and BMNOEXCEPT.

## operator=()

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

pipeline & bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::operator= | ( | const pipeline< Opt > & |  | ) |

protected delete

References pipeline().

## options()

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

run_options & bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::options | ( |  | ) |

inline

Set pipeline run options.

Definition at line 631 of file bmsparsevec_algo.h.

References agg_pipe_, and BMNOEXCEPT.

Referenced by main().

## set_or_target()

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

void bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::set_or_target | ( | bvector_type * | bv_or | ) |

inline

Attach OR (aggregator vector).

Pipeline results all will be OR-ed (UNION) into the OR target vector

Parameters

  bv_or | - OR target vector

Definition at line 660 of file bmsparsevec_algo.h.

References agg_pipe_, and BMNOEXCEPT.

## set_search_count_limit()

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

void bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::set_search_count_limit | ( | size_type | limit | ) |

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)

Parameters

  limit | - search limit (target population count to search for)

Definition at line 652 of file bmsparsevec_algo.h.

References agg_pipe_, and BMNOEXCEPT.

## set_search_mask()

template<typename SV, unsigned S_FACTOR>
template<class Opt>

void bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::set_search_mask | ( | const bvector_type * | bv_mask | ) |

Set pipeline mask bit-vector to restrict the search space.

Parameters

  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 3235 of file bmsparsevec_algo.h.

References BMNOEXCEPT, bv_and_mask_, and set_search_mask().

Referenced by set_search_mask().

## size()

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

size_type bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::size | ( |  | ) | const

inline

Definition at line 680 of file bmsparsevec_algo.h.

References agg_pipe_, and BMNOEXCEPT.

## Friends And Related Symbol Documentation

## sparse_vector_scanner

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

friend class sparse_vector_scanner

friend

Definition at line 701 of file bmsparsevec_algo.h.

References sparse_vector_scanner.

Referenced by sparse_vector_scanner.

## Field Documentation

## agg_pipe_

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

aggregator_pipeline_type bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::agg_pipe_

protected

traget aggregator pipeline

Definition at line 707 of file bmsparsevec_algo.h.

Referenced by add(), complete(), get_aggregator_pipe(), get_bv_count_vector(), get_bv_res_vector(), get_options(), is_complete(), options(), set_or_target(), set_search_count_limit(), and size().

## bv_and_mask_

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

const bvector_type* bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::bv_and_mask_

protected

Definition at line 709 of file bmsparsevec_algo.h.

Referenced by add(), pipeline(), and set_search_mask().

## eff_slices_

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

size_t bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::eff_slices_

protected

number of effectice NOT NULL value slices

Definition at line 710 of file bmsparsevec_algo.h.

Referenced by add(), and pipeline().

## remap_value_vect_

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

remap_vector_type bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::remap_value_vect_

protected

remap buffer

Definition at line 708 of file bmsparsevec_algo.h.

Referenced by add().

## sv_

template<typename SV, unsigned S_FACTOR>
template<class Opt = bm::agg_run_options<>>

const SV& bm::sparse_vector_scanner< SV, S_FACTOR >::pipeline< Opt >::sv_

protected

target sparse vector ref

Definition at line 706 of file bmsparsevec_algo.h.

Referenced by add(), and pipeline().

The documentation for this class was generated from the following file:

- bmsparsevec_algo.h