algo search


  • Anonymous

    I'm writing a <FwdIt1, FwdIt2> search(FwdIt1 _1b, FwdIt1 _1e, FwdIt2 _2b, FwdIt2 _2e) for stxxl and I'm trying to find the correct way to copy over the prefetch code in bits/algo/scan.h so that simultaneous increment on both [_1b, _1e) and [_2b, _2e). Porting over the binary predicate is trivial - all I have to do is modify 1 line of code in my copypaste of scan.h :)
    Also, how should nbufers guessing be based on [_2b, _2e) so that find works more efficiently?

  • First of all, where does the data reside.  Are both external or does the pattern fit into internal memory?  Are you implementing some sophisticated algorithm with preprocessing (such as Knuth-Morris-Pratt or Boyer-Moore) or the trivial one?