Bolt
1.3
C++ template library with support for OpenCL
|
Returns true if the search element is found in the given input range and false otherwise. More...
#include "bolt/cl/device_vector.h"
#include "bolt/cl/functional.h"
#include <string>
#include <bolt/cl/detail/binary_search.inl>
Go to the source code of this file.
Namespaces | |
namespace | bolt |
Defining namespace for the Bolt project. | |
namespace | bolt::cl |
Namespace containing OpenCL related data types and functions. | |
Functions | |
template<typename ForwardIterator , typename T > | |
bool | bolt::cl::binary_search (bolt::cl::control &ctl, ForwardIterator first, ForwardIterator last, const T &value, const std::string &cl_code="") |
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::cl::binary_search (ForwardIterator first, ForwardIterator last, const T &value, const std::string &cl_code="") |
template<typename ForwardIterator , typename T , typename StrictWeakOrdering > | |
bool | bolt::cl::binary_search (bolt::cl::control &ctl, ForwardIterator first, ForwardIterator last, const T &value, StrictWeakOrdering comp, const std::string &cl_code="") |
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::cl::binary_search (ForwardIterator first, ForwardIterator last, const T &value, StrictWeakOrdering comp, const std::string &cl_code="") |
Returns true if the search element is found in the given input range and false otherwise.