Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of Boost. Click here to view this page for the latest version.
PrevUpHomeNext

Function template search_n

boost::compute::search_n — Substring matching algorithm.

Synopsis

// In header: <boost/compute/algorithm/search_n.hpp>


template<typename TextIterator, typename ValueType> 
  TextIterator 
  search_n(TextIterator t_first, TextIterator t_last, size_t n, 
           ValueType value, command_queue & queue = system::default_queue());

Description

Searches for the first occurrence of n consecutive occurrences of value in text [t_first, t_last). Space complexity: (distance(t_first, t_last))

Parameters:

n

Number of times value repeats

queue

Queue on which to execute

t_first

Iterator pointing to start of text

t_last

Iterator pointing to end of text

value

Value which repeats

Returns:

Iterator pointing to beginning of first occurrence


PrevUpHomeNext