Function template any_of

| Home | Libraries | People | FAQ | More

## Function template any_of

boost::compute::any_of

## Synopsis

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

    template<typename InputIterator, typename UnaryPredicate>
      bool any_of(InputIterator first, InputIterator last,
                  UnaryPredicate predicate,
                  command_queue & queue = system::default_queue());

## Description

Returns `true` if `predicate` returns `true` for any of the elements in the range [`first`, `last`).

For example, to test if a vector contains any negative values:

    boost::compute::any_of(v.begin(), v.end(), _1 < 0, queue);

See Also:

all_of(), none_of()