Bolt  1.3
C++ template library with support for OpenCL
Namespaces | Functions
binary_search.h File Reference

Returns true if the search element is found in the given input range and false otherwise. More...

#include <bolt/amp/bolt.h>
#include <string>
#include <bolt/amp/detail/binary_search.inl>

Go to the source code of this file.

Namespaces

namespace  bolt
 Defining namespace for the Bolt project.
 
namespace  bolt::amp
 Namespace containing AMP related data types and functions.
 

Functions

template<typename ForwardIterator , typename T >
bool bolt::amp::binary_search (bolt::amp::control &ctl, ForwardIterator first, ForwardIterator last, const T &value)
 This version of binary search returns true if the search value is present within the given input range and false otherwise. The routine requires the elements to be arranged in ascending/descending order. It returns true iff there exists an iterator i in [first, last) such that *i < value and value < *i are both false.
 
template<typename ForwardIterator , typename T >
bool bolt::amp::binary_search (ForwardIterator first, ForwardIterator last, const T &value)
 
template<typename ForwardIterator , typename T , typename StrictWeakOrdering >
bool bolt::amp::binary_search (bolt::amp::control &ctl, ForwardIterator first, ForwardIterator last, const T &value, StrictWeakOrdering comp)
 This version of binary search returns true if the search value is present within the given input range and false otherwise. The routine requires the elements to be arranged in ascending/descending order. It returns true iff there exists an iterator i in [first, last) such that comp(*i, value) and comp(value, *i) are both false.
 
template<typename ForwardIterator , typename T , typename StrictWeakOrdering >
bool bolt::amp::binary_search (ForwardIterator first, ForwardIterator last, const T &value, StrictWeakOrdering comp)
 

Detailed Description

Returns true if the search element is found in the given input range and false otherwise.