Bolt
1.3
C++ template library with support for OpenCL
|
Functions | |
template<typename ForwardIterator > | |
ForwardIterator | bolt::amp::min_element (bolt::amp::control &ctl, ForwardIterator first, ForwardIterator last) |
The min_element returns the location of the first minimum element in the specified range. | |
template<typename ForwardIterator > | |
ForwardIterator | bolt::amp::min_element (ForwardIterator first, ForwardIterator last) |
template<typename ForwardIterator , typename BinaryPredicate > | |
ForwardIterator | bolt::amp::min_element (bolt::amp::control &ctl, ForwardIterator first, ForwardIterator last, BinaryPredicate binary_op) |
The min_element returns the location of the first minimum element in the specified range using the specified binary_op. | |
template<typename ForwardIterator , typename BinaryPredicate > | |
ForwardIterator | bolt::amp::min_element (ForwardIterator first, ForwardIterator last, BinaryPredicate binary_op) |
ForwardIterator bolt::amp::min_element | ( | bolt::amp::control & | ctl, |
ForwardIterator | first, | ||
ForwardIterator | last | ||
) |
The min_element returns the location of the first minimum element in the specified range.
ctl | Optional Control structure to control accelerator, debug, tuning, etc.See bolt::amp::control. |
first | A forward iterator addressing the position of the first element in the range to be searched for the minimum element |
last | A forward iterator addressing the position one past the final element in the range to be searched for the minimum element |
ForwardIterator | An iterator that can be dereferenced for an object, and can be incremented to get to the next element in a sequence. |
The following code example shows how to find the position of the min_element
of 10 numbers, using the default BinaryPredicate.
ForwardIterator bolt::amp::min_element | ( | bolt::amp::control & | ctl, |
ForwardIterator | first, | ||
ForwardIterator | last, | ||
BinaryPredicate | binary_op | ||
) |
The min_element returns the location of the first minimum element in the specified range using the specified binary_op.
ctl | Optional Control structure to control accelerator, debug, tuning, etc.See bolt::amp::control. |
first | A forward iterator addressing the position of the first element in the range to be searched for the minimum element |
last | A forward iterator addressing the position one past the final element in the range to be searched for the minimum element |
binary_op | The binary operation used to combine two values. By default, the binary operation is less<>(). |
ForwardIterator | An iterator that can be dereferenced for an object, and can be incremented to get to the next element in a sequence. |
BinaryPredicate | A function object defining an operation that is applied to consecutive elements in the sequence. |
The following code example shows how to find the position of the min_element
of 10 numbers, using the default less operator.