Bolt
1.3
C++ template library with support for OpenCL
|
Namespace containing OpenCL related data types and functions. More...
Typedefs | |
typedef ::std::map < ProgramMapKey, ProgramMapValue, ProgramMapKeyComp > | ProgramMap |
Functions | |
template<typename ForwardIterator , typename T > | |
bool | 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 | binary_search (ForwardIterator first, ForwardIterator last, const T &value, const std::string &cl_code="") |
template<typename ForwardIterator , typename T , typename StrictWeakOrdering > | |
bool | 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 | binary_search (ForwardIterator first, ForwardIterator last, const T &value, StrictWeakOrdering comp, const std::string &cl_code="") |
std::string | fileToString (const std::string &fileName) |
::std::vector< ::cl::Kernel > | getKernels (const control &ctl, const ::std::vector< ::std::string > &typeNames, const KernelTemplateSpecializer *const kts, const ::std::vector< ::std::string > &typeDefinitions, const std::string &baseKernelString, const std::string &compileOptions="") |
void | getVersion (cl_uint &major, cl_uint &minor, cl_uint &patch) |
Query the Bolt library for version information. | |
std::string | clErrorStringA (const cl_int &status) |
Translates an integer OpenCL error code to a std::string at runtime. | |
std::wstring | clErrorStringW (const cl_int &status) |
Translates an integer OpenCL error code to a std::wstring at runtime. | |
cl_int | V_OpenCL (cl_int res, const std::string &msg, size_t lineno) |
Helper print function to stringify OpenCL error codes. | |
void | wait (const bolt::cl::control &ctl,::cl::Event &e) |
template<typename InputIterator , typename OutputIterator > | |
OutputIterator | copy (const bolt::cl::control &ctl, InputIterator first, InputIterator last, OutputIterator result, const std::string &user_code="") |
template<typename InputIterator , typename OutputIterator > | |
OutputIterator | copy (InputIterator first, InputIterator last, OutputIterator result, const std::string &user_code="") |
template<typename InputIterator , typename Size , typename OutputIterator > | |
OutputIterator | copy_n (const bolt::cl::control &ctl, InputIterator first, Size n, OutputIterator result, const std::string &user_code="") |
template<typename InputIterator , typename Size , typename OutputIterator > | |
OutputIterator | copy_n (InputIterator first, Size n, OutputIterator result, const std::string &user_code="") |
template<typename InputIterator , typename Predicate > | |
bolt::cl::iterator_traits < InputIterator > ::difference_type | count_if (control &ctl, InputIterator first, InputIterator last, Predicate predicate=bolt::cl::detail::CountIfEqual< int >(), const std::string &cl_code="") |
count_if counts the number of elements in the specified range for which the specified predicate is true . | |
template<typename InputIterator , typename Predicate > | |
bolt::cl::iterator_traits < InputIterator > ::difference_type | count_if (InputIterator first, InputIterator last, Predicate predicate, const std::string &cl_code="") |
template<typename InputIterator , typename EqualityComparable > | |
bolt::cl::iterator_traits < InputIterator > ::difference_type | count (control &ctl, InputIterator first, InputIterator last, const EqualityComparable &value, const std::string &cl_code="") |
count counts the number of elements in the specified range which compare equal to the specified value . | |
template<typename InputIterator , typename EqualityComparable > | |
bolt::cl::iterator_traits < InputIterator > ::difference_type | count (InputIterator first, InputIterator last, const EqualityComparable &value, const std::string &cl_code="") |
template<typename InputIterator > | |
bolt::cl::iterator_traits < InputIterator > ::difference_type | distance (InputIterator first, InputIterator last) |
template<typename ForwardIterator , typename T > | |
void | fill (const bolt::cl::control &ctl, ForwardIterator first, ForwardIterator last, const T &value, const std::string &cl_code="") |
Fill assigns the value of value to each element in the range [first,last]. | |
template<typename ForwardIterator , typename T > | |
void | fill (ForwardIterator first, ForwardIterator last, const T &value, const std::string &cl_code="") |
template<typename OutputIterator , typename Size , typename T > | |
OutputIterator | fill_n (const bolt::cl::control &ctl, OutputIterator first, Size n, const T &value, const std::string &cl_code="") |
fill_n assigns the value value to every element in the range [first,first+n]. The return value is first + n. | |
template<typename OutputIterator , typename Size , typename T > | |
OutputIterator | fill_n (OutputIterator first, Size n, const T &value, const std::string &cl_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator > | |
void | gather (::bolt::cl::control &ctl, InputIterator1 map_first, InputIterator1 map_last, InputIterator2 input_first, OutputIterator result, const std::string &user_code="") |
This version of gather copies elements from a source array to a destination range according to a specified map. For each i in InputIterator1 in the range [map_first, map_last), gather copies the corresponding input_first [ map [ i ] ] to result[ i - map_first ]. | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator > | |
void | gather (InputIterator1 map_first, InputIterator1 map_last, InputIterator2 input_first, OutputIterator result, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename InputIterator3 , typename OutputIterator > | |
void | gather_if (bolt::cl::control &ctl, InputIterator1 map_first, InputIterator1 map_last, InputIterator2 stencil, InputIterator3 input_first, OutputIterator result, const std::string &user_code="") |
This version of gather_if copies elements from a source array to a destination range according to a specified map. For each i in InputIterator1 in the range [map_first, map_last), gather_if copies the corresponding input_first [ map [ i ] ] to result[ i - map_first ] if stencil[ i - map_first ] is true . | |
template<typename InputIterator1 , typename InputIterator2 , typename InputIterator3 , typename OutputIterator > | |
void | gather_if (InputIterator1 map_first, InputIterator1 map_last, InputIterator2 stencil, InputIterator3 input_first, OutputIterator result, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename InputIterator3 , typename OutputIterator , typename Predicate > | |
void | gather_if (bolt::cl::control &ctl, InputIterator1 map_first, InputIterator1 map_last, InputIterator2 stencil, InputIterator3 input, OutputIterator result, Predicate pred, const std::string &user_code="") |
This version of gather_if copies elements from a source array to a destination range according to a specified map. For each i in InputIterator1 in the range [map_first, map_last), gather_if copies the corresponding input_first [ map [ i ] ] to result[ i - map_first ] if pred (stencil[ i - map_first ]) is true . | |
template<typename InputIterator1 , typename InputIterator2 , typename InputIterator3 , typename OutputIterator , typename Predicate > | |
void | gather_if (InputIterator1 map_first, InputIterator1 map_last, InputIterator2 stencil, InputIterator3 input, OutputIterator result, Predicate pred, const std::string &user_code="") |
template<typename ForwardIterator , typename Generator > | |
void | generate (bolt::cl::control &ctl, ForwardIterator first, ForwardIterator last, Generator gen, const std::string &cl_code="") |
generate assigns to each element of a sequence [first,last] the value returned by gen. | |
template<typename ForwardIterator , typename Generator > | |
void | generate (ForwardIterator first, ForwardIterator last, Generator gen, const std::string &cl_code="") |
template<typename OutputIterator , typename Size , typename Generator > | |
OutputIterator | generate_n (bolt::cl::control &ctl, OutputIterator first, Size n, Generator gen, const std::string &cl_code="") |
generate_n assigns to each element of a sequence [first,first+n] the value returned by gen. | |
template<typename OutputIterator , typename Size , typename Generator > | |
OutputIterator | generate_n (OutputIterator first, Size n, Generator gen, const std::string &cl_code="") |
template<typename InputIterator , typename OutputType > | |
OutputType | inner_product (bolt::cl::control &ctl, InputIterator first1, InputIterator last1, InputIterator first2, OutputType init, const std::string &cl_code="") |
Inner Product returns the inner product of two iterators. This is similar to calculating binary transform and then reducing the result. The inner_product operation is similar the std::inner_product function. This function can take optional control structure to control command-queue. | |
template<typename InputIterator , typename OutputType > | |
OutputType | inner_product (InputIterator first1, InputIterator last1, InputIterator first2, OutputType init, const std::string &cl_code="") |
template<typename InputIterator , typename OutputType , typename BinaryFunction1 , typename BinaryFunction2 > | |
OutputType | inner_product (bolt::cl::control &ctl, InputIterator first1, InputIterator last1, InputIterator first2, OutputType init, BinaryFunction1 f1, BinaryFunction2 f2, const std::string &cl_code="") |
Inner Product returns the inner product of two iterators using user specified binary functors f1 and f2. This is similar to calculating transform and then reducing the result. The functor f1 should be commutative. This function can take optional control structure to control command-queue. The inner_product operation is similar the std::inner_product function. | |
template<typename InputIterator , typename OutputType , typename BinaryFunction1 , typename BinaryFunction2 > | |
OutputType | inner_product (InputIterator first1, InputIterator last1, InputIterator first2, OutputType init, BinaryFunction1 f1, BinaryFunction2 f2, const std::string &cl_code="") |
template<typename ForwardIterator > | |
ForwardIterator | max_element (bolt::cl::control &ctl, ForwardIterator first, ForwardIterator last, const std::string &cl_code="") |
The max_element returns the location of the first maximum element in the specified range. | |
template<typename ForwardIterator > | |
ForwardIterator | max_element (ForwardIterator first, ForwardIterator last, const std::string &cl_code="") |
template<typename ForwardIterator , typename BinaryPredicate > | |
ForwardIterator | max_element (bolt::cl::control &ctl, ForwardIterator first, ForwardIterator last, BinaryPredicate binary_op, const std::string &cl_code="") |
The max_element returns the location of the first maximum element in the specified range using the specified binary_op. | |
template<typename ForwardIterator , typename BinaryPredicate > | |
ForwardIterator | max_element (ForwardIterator first, ForwardIterator last, BinaryPredicate binary_op, const std::string &cl_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator > | |
OutputIterator | merge (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, const std::string &cl_code="") |
merge returns the result of combining the two sorted range [first1, last1] and [first2, last2] in to a single sorted range [result , result + (last1-first1) + ( last2-first2)] | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator > | |
OutputIterator | merge (bolt::cl::control &ctl, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, const std::string &cl_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename StrictWeakCompare > | |
OutputIterator | merge (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, StrictWeakCompare comp, const std::string &cl_code="") |
merge returns the result of combining the two sorted range [first1, last1] and [first2, last2] in to a single sorted range [result , result + (last1-first1) + ( last2-first2)] | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename StrictWeakCompare > | |
OutputIterator | merge (bolt::cl::control &ctl, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, InputIterator2 last2, OutputIterator result, StrictWeakCompare comp, const std::string &cl_code="") |
template<typename ForwardIterator > | |
ForwardIterator | min_element (bolt::cl::control &ctl, ForwardIterator first, ForwardIterator last, const std::string &cl_code="") |
The min_element returns the location of the first minimum element in the specified range. | |
template<typename ForwardIterator > | |
ForwardIterator | min_element (ForwardIterator first, ForwardIterator last, const std::string &cl_code="") |
template<typename ForwardIterator , typename BinaryPredicate > | |
ForwardIterator | min_element (bolt::cl::control &ctl, ForwardIterator first, ForwardIterator last, BinaryPredicate binary_op, const std::string &cl_code="") |
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 | min_element (ForwardIterator first, ForwardIterator last, BinaryPredicate binary_op, const std::string &cl_code="") |
template<typename T1 , typename T2 > | |
bool | operator== (const pair< T1, T2 > &x, const pair< T1, T2 > &y) |
template<typename T1 , typename T2 > | |
bool | operator< (const pair< T1, T2 > &x, const pair< T1, T2 > &y) |
template<typename T1 , typename T2 > | |
bool | operator!= (const pair< T1, T2 > &x, const pair< T1, T2 > &y) |
template<typename T1 , typename T2 > | |
bool | operator> (const pair< T1, T2 > &x, const pair< T1, T2 > &y) |
template<typename T1 , typename T2 > | |
bool | operator<= (const pair< T1, T2 > &x, const pair< T1, T2 > &y) |
template<typename T1 , typename T2 > | |
bool | operator>= (const pair< T1, T2 > &x, const pair< T1, T2 > &y) |
template<typename T1 , typename T2 > | |
pair< T1, T2 > | make_pair (T1 x, T2 y) |
template<typename InputIterator > | |
std::iterator_traits < InputIterator >::value_type | reduce (bolt::cl::control &ctl, InputIterator first, InputIterator last, const std::string &cl_code="") |
reduce returns the result of combining all the elements in the specified range using the specified binary_op. The classic example is a summation, where the binary_op is the plus operator. By default, the initial value is "0" and the binary operator is "plus<>()". | |
template<typename InputIterator > | |
std::iterator_traits < InputIterator >::value_type | reduce (InputIterator first, InputIterator last, const std::string &cl_code="") |
template<typename InputIterator , typename T > | |
T | reduce (bolt::cl::control &ctl, InputIterator first, InputIterator last, T init, const std::string &cl_code="") |
reduce returns the result of combining all the elements in the specified range using the specified binary_op. The classic example is a summation, where the binary_op is the plus operator. By default, the initial value is "0" and the binary operator is "plus<>()". | |
template<typename InputIterator , typename T > | |
T | reduce (InputIterator first, InputIterator last, T init, const std::string &cl_code="") |
template<typename InputIterator , typename T , typename BinaryFunction > | |
T | reduce (bolt::cl::control &ctl, InputIterator first, InputIterator last, T init, BinaryFunction binary_op=bolt::cl::plus< T >(), const std::string &cl_code="") |
reduce returns the result of combining all the elements in the specified range using the specified binary_op. The classic example is a summation, where the binary_op is the plus operator. By default, the binary operator is "plus<>()". The version takes a bolt::cl::control structure as a first argument. | |
template<typename InputIterator , typename T , typename BinaryFunction > | |
T | reduce (InputIterator first, InputIterator last, T init, BinaryFunction binary_op, const std::string &cl_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator1 , typename OutputIterator2 > | |
pair< OutputIterator1, OutputIterator2 > | reduce_by_key (control &ctl, InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, OutputIterator2 values_output, const std::string &user_code="") |
reduce_by_key performs, on a sequence, a reduction of each sub-sequence as defined by equivalent keys; the BinaryFunction in this version is plus(), and the BinaryPredicate is equal_to(). | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator1 , typename OutputIterator2 > | |
pair< OutputIterator1, OutputIterator2 > | reduce_by_key (InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, OutputIterator2 values_output, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator1 , typename OutputIterator2 , typename BinaryPredicate > | |
pair< OutputIterator1, OutputIterator2 > | reduce_by_key (control &ctl, InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, OutputIterator2 values_output, BinaryPredicate binary_pred, const std::string &user_code="") |
reduce_by_key performs, on a sequence, a reduction of each sub-sequence as defined by equivalent keys; the BinaryFunction in this version is plus(). reduce_by_key is a generalization of reduce to key-value pairs. If the reduction operator is not commutative then bolt::reduce_by_key should not be used. | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator1 , typename OutputIterator2 , typename BinaryPredicate > | |
pair< OutputIterator1, OutputIterator2 > | reduce_by_key (InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, OutputIterator2 values_output, BinaryPredicate binary_pred, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator1 , typename OutputIterator2 , typename BinaryPredicate , typename BinaryFunction > | |
pair< OutputIterator1, OutputIterator2 > | reduce_by_key (control &ctl, InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, OutputIterator2 values_output, BinaryPredicate binary_pred, BinaryFunction binary_op, const std::string &user_code="") |
reduce_by_key performs, on a sequence, a reduction of each sub-sequence as defined by equivalent keys; reduce_by_key is a generalization of reduce to key-value pairs. If the reduction operator is not commutative then bolt::reduce_by_key should not be used. | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator1 , typename OutputIterator2 , typename BinaryPredicate , typename BinaryFunction > | |
pair< OutputIterator1, OutputIterator2 > | reduce_by_key (InputIterator1 keys_first, InputIterator1 keys_last, InputIterator2 values_first, OutputIterator1 keys_output, OutputIterator2 values_output, BinaryPredicate binary_pred, BinaryFunction binary_op, const std::string &user_code="") |
template<typename InputIterator , typename OutputIterator > | |
OutputIterator | inclusive_scan (control &ctl, InputIterator first, InputIterator last, OutputIterator result, const std::string &user_code="") |
inclusive_scan calculates a running sum over a range of values, inclusive of the current value. The result value at iterator position i is the running sum of all values less than i in the input range. inclusive_scan requires associativity of the binary operation to parallelize the prefix sum. | |
template<typename InputIterator , typename OutputIterator > | |
OutputIterator | inclusive_scan (InputIterator first, InputIterator last, OutputIterator result, const std::string &user_code="") |
template<typename InputIterator , typename OutputIterator , typename BinaryFunction > | |
OutputIterator | inclusive_scan (control &ctl, InputIterator first, InputIterator last, OutputIterator result, BinaryFunction binary_op, const std::string &user_code="") |
inclusive_scan calculates a running sum over a range of values, inclusive of the current value. The result value at iterator position i is the running sum of all values less than i in the input range. inclusive_scan requires associativity of the binary operation to parallelize the prefix sum. | |
template<typename InputIterator , typename OutputIterator , typename BinaryFunction > | |
OutputIterator | inclusive_scan (InputIterator first, InputIterator last, OutputIterator result, BinaryFunction binary_op, const std::string &user_code="") |
template<typename InputIterator , typename OutputIterator > | |
OutputIterator | exclusive_scan (control &ctl, InputIterator first, InputIterator last, OutputIterator result, const std::string &user_code="") |
exclusive_scan calculates a running sum over a range of values, exclusive of the current value. The result value at iterator position i is the running sum of all values less than i in the input range. exclusive_scan requires associativity of the binary operation to parallelize it. | |
template<typename InputIterator , typename OutputIterator > | |
OutputIterator | exclusive_scan (InputIterator first, InputIterator last, OutputIterator result, const std::string &user_code="") |
template<typename InputIterator , typename OutputIterator , typename T > | |
OutputIterator | exclusive_scan (control &ctl, InputIterator first, InputIterator last, OutputIterator result, T init, const std::string &user_code="") |
exclusive_scan calculates a running sum over a range of values, exclusive of the current value. The result value at iterator position i is the running sum of all values less than i in the input range. exclusive_scan requires associativity of the binary operation to parallelize it. | |
template<typename InputIterator , typename OutputIterator , typename T > | |
OutputIterator | exclusive_scan (InputIterator first, InputIterator last, OutputIterator result, T init, const std::string &user_code="") |
template<typename InputIterator , typename OutputIterator , typename T , typename BinaryFunction > | |
OutputIterator | exclusive_scan (control &ctl, InputIterator first, InputIterator last, OutputIterator result, T init, BinaryFunction binary_op, const std::string &user_code="") |
exclusive_scan calculates a running sum over a range of values, exclusive of the current value. The result value at iterator position i is the running sum of all values less than i in the input range. exclusive_scan requires associativity of the binary operation to parallelize it. | |
template<typename InputIterator , typename OutputIterator , typename T , typename BinaryFunction > | |
OutputIterator | exclusive_scan (InputIterator first, InputIterator last, OutputIterator result, T init, BinaryFunction binary_op, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator > | |
OutputIterator | inclusive_scan_by_key (control &ctl, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, const std::string &user_code="") |
inclusive_scan_by_key performs, on a sequence, an inclusive scan of each sub-sequence as defined by equivalent keys; the BinaryFunction in this version is plus(), and the BinaryPredicate is equal_to(). inclusive_scan_by_key uses the associative operator binary_op to perform the parallel segmented prefix sum. | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator > | |
OutputIterator | inclusive_scan_by_key (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename BinaryPredicate > | |
OutputIterator | inclusive_scan_by_key (control &ctl, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, BinaryPredicate binary_pred, const std::string &user_code="") |
inclusive_scan_by_key performs, on a sequence, an inclusive scan of each sub-sequence as defined by equivalent keys; the BinaryFunction in this version is plus(). inclusive_scan_by_key uses the associative operator binary_op to perform the parallel segmented prefix sum. | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename BinaryPredicate > | |
OutputIterator | inclusive_scan_by_key (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, BinaryPredicate binary_pred, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename BinaryPredicate , typename BinaryFunction > | |
OutputIterator | inclusive_scan_by_key (control &ctl, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, BinaryPredicate binary_pred, BinaryFunction binary_funct, const std::string &user_code="") |
inclusive_scan_by_key performs, on a sequence, an inclusive scan of each sub-sequence as defined by equivalent keys. inclusive_scan_by_key uses the associative operator binary_op to perform the parallel segmented prefix sum. | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename BinaryPredicate , typename BinaryFunction > | |
OutputIterator | inclusive_scan_by_key (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, BinaryPredicate binary_pred, BinaryFunction binary_funct, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator > | |
OutputIterator | exclusive_scan_by_key (control &ctl, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, const std::string &user_code="") |
exclusive_scan_by_key performs, on a sequence, an exclusive scan of each sub-sequence as defined by equivalent keys; the BinaryFunction in this version is plus(), the BinaryPredicate is equal_to(), and init is 0. exclusive_scan_by_key uses the associative operator binary_op to perform the parallel segmented prefix sum. | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator > | |
OutputIterator | exclusive_scan_by_key (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename T > | |
OutputIterator | exclusive_scan_by_key (control &ctl, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, T init, const std::string &user_code="") |
exclusive_scan_by_key performs, on a sequence, an exclusive scan of each sub-sequence as defined by equivalent keys; the BinaryFunction in this version is plus(), and the BinaryPredicate is equal_to(). exclusive_scan_by_key uses the associative operator binary_op to perform the parallel segmented prefix sum. | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename T > | |
OutputIterator | exclusive_scan_by_key (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, T init, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename T , typename BinaryPredicate > | |
OutputIterator | exclusive_scan_by_key (control &ctl, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, T init, BinaryPredicate binary_pred, const std::string &user_code="") |
exclusive_scan_by_key performs, on a sequence, an exclusive scan of each sub-sequence as defined by equivalent keys; the BinaryFunction in this version is plus(). exclusive_scan_by_key uses the associative operator binary_op to perform the parallel segmented prefix sum. | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename T , typename BinaryPredicate > | |
OutputIterator | exclusive_scan_by_key (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, T init, BinaryPredicate binary_pred, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename T , typename BinaryPredicate , typename BinaryFunction > | |
OutputIterator | exclusive_scan_by_key (control &ctl, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, T init, BinaryPredicate binary_pred, BinaryFunction binary_funct, const std::string &user_code="") |
exclusive_scan_by_key performs, on a sequence, an exclusive scan of each sub-sequence as defined by equivalent keys. exclusive_scan_by_key uses the associative operator binary_op to perform the parallel segmented prefix sum. | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename T , typename BinaryPredicate , typename BinaryFunction > | |
OutputIterator | exclusive_scan_by_key (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, T init, BinaryPredicate binary_pred, BinaryFunction binary_funct, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator > | |
void | scatter (::bolt::cl::control &ctl, InputIterator1 first, InputIterator1 last, InputIterator2 map, OutputIterator result, const std::string &user_code="") |
This version of scatter copies elements from a source range to a destination array according to a specified map. For each i in InputIterator1 in the range [first, last), scatter copies the corresponding input_first to result[ map [ i ] ]. | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator > | |
void | scatter (InputIterator1 first, InputIterator1 last1, InputIterator2 map, OutputIterator result, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename InputIterator3 , typename OutputIterator > | |
void | scatter_if (bolt::cl::control &ctl, InputIterator1 first1, InputIterator1 last1, InputIterator2 map, InputIterator3 stencil, OutputIterator result, const std::string &user_code="") |
This version of scatter_if copies elements from a source range to a destination array according to a specified map. For each i in InputIterator1 in the range [first, last), scatter_if copies the corresponding input_first to result[ map [ i ] ] if stencil[ i - first ] is true . | |
template<typename InputIterator1 , typename InputIterator2 , typename InputIterator3 , typename OutputIterator > | |
void | scatter_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 map, InputIterator3 stencil, OutputIterator result, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename InputIterator3 , typename OutputIterator , typename Predicate > | |
void | scatter_if (bolt::cl::control &ctl, InputIterator1 first1, InputIterator1 last1, InputIterator2 map, InputIterator3 stencil, OutputIterator result, Predicate pred, const std::string &user_code="") |
This version of scatter_if copies elements from a source range to a destination array according to a specified map. For each i in InputIterator1 in the range [first, last), scatter_if copies the corresponding input_first to result[ map [ i ] ] if pred (stencil[ i - first ]) is true . | |
template<typename InputIterator1 , typename InputIterator2 , typename InputIterator3 , typename OutputIterator , typename Predicate > | |
void | scatter_if (InputIterator1 first1, InputIterator1 last1, InputIterator2 map, InputIterator3 stencil, OutputIterator result, Predicate pred, const std::string &user_code="") |
template<typename RandomAccessIterator > | |
void | sort (bolt::cl::control &ctl, RandomAccessIterator first, RandomAccessIterator last, const std::string &cl_code="") |
This version of sort returns the sorted result of all the elements in the RandomAccessIterator between the the first and last elements. The routine arranges the elements in an ascending order. RandomAccessIterator's value_type must provide operator < overload. | |
template<typename RandomAccessIterator > | |
void | sort (RandomAccessIterator first, RandomAccessIterator last, const std::string &cl_code="") |
template<typename RandomAccessIterator , typename StrictWeakOrdering > | |
void | sort (bolt::cl::control &ctl, RandomAccessIterator first, RandomAccessIterator last, StrictWeakOrdering comp, const std::string &cl_code="") |
sort returns the sorted result of all the elements in the inputIterator between the the first and last elements using the specified binary_op. You can arrange the elements in an ascending order, where the binary_op is the less<>() operator. This version of sort takes a bolt::cl::control structure as a first argument and compares objects using functor object defined by StrictWeakOrdering . | |
template<typename RandomAccessIterator , typename StrictWeakOrdering > | |
void | sort (RandomAccessIterator first, RandomAccessIterator last, StrictWeakOrdering comp, const std::string &cl_code="") |
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 > | |
void | sort_by_key (bolt::cl::control &ctl, RandomAccessIterator1 keys_first, RandomAccessIterator1 keys_last, RandomAccessIterator2 values_first, const std::string &cl_code="") |
This version of sort_by_key returns the sorted result of all the elements in the RandomAccessIterator between the the first and last elements key elements and corresponding values. The routine arranges the elements in an ascending order. | |
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 > | |
void | sort_by_key (RandomAccessIterator1 keys_first, RandomAccessIterator1 keys_last, RandomAccessIterator2 values_first, const std::string &cl_code="") |
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename StrictWeakOrdering > | |
void | sort_by_key (bolt::cl::control &ctl, RandomAccessIterator1 keys_first, RandomAccessIterator1 keys_last, RandomAccessIterator2 values_first, StrictWeakOrdering comp, const std::string &cl_code="") |
This version of sort_by_key returns the sorted result of all the elements in the RandomAccessIterator between the the first and last elements key elements and corresponding values. The routine arranges the elements in an ascending order. | |
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename StrictWeakOrdering > | |
void | sort_by_key (RandomAccessIterator1 keys_first, RandomAccessIterator1 keys_last, RandomAccessIterator2 values_first, StrictWeakOrdering comp, const std::string &cl_code="") |
template<typename RandomAccessIterator > | |
void | stable_sort (RandomAccessIterator first, RandomAccessIterator last, const std::string &cl_code="") |
template<typename RandomAccessIterator , typename StrictWeakOrdering > | |
void | stable_sort (RandomAccessIterator first, RandomAccessIterator last, StrictWeakOrdering comp, const std::string &cl_code="") |
template<typename RandomAccessIterator > | |
void | stable_sort (bolt::cl::control &ctl, RandomAccessIterator first, RandomAccessIterator last, const std::string &cl_code="") |
template<typename RandomAccessIterator , typename StrictWeakOrdering > | |
void | stable_sort (bolt::cl::control &ctl, RandomAccessIterator first, RandomAccessIterator last, StrictWeakOrdering comp, const std::string &cl_code="") |
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 > | |
void | stable_sort_by_key (RandomAccessIterator1 keys_first, RandomAccessIterator1 keys_last, RandomAccessIterator2 values_first, const std::string &cl_code="") |
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename StrictWeakOrdering > | |
void | stable_sort_by_key (RandomAccessIterator1 keys_first, RandomAccessIterator1 keys_last, RandomAccessIterator2 values_first, StrictWeakOrdering comp, const std::string &cl_code="") |
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 > | |
void | stable_sort_by_key (bolt::cl::control &ctl, RandomAccessIterator1 keys_first, RandomAccessIterator1 keys_last, RandomAccessIterator2 values_first, const std::string &cl_code="") |
template<typename RandomAccessIterator1 , typename RandomAccessIterator2 , typename StrictWeakOrdering > | |
void | stable_sort_by_key (bolt::cl::control &ctl, RandomAccessIterator1 keys_first, RandomAccessIterator1 keys_last, RandomAccessIterator2 values_first, StrictWeakOrdering comp, const std::string &cl_code="") |
template<typename InputIterator , typename OutputIterator , typename UnaryFunction > | |
void | transform (::bolt::cl::control &ctl, InputIterator first, InputIterator last, OutputIterator result, UnaryFunction op, const std::string &user_code="") |
This version of transform applies a unary operation on input sequences and stores the result in the corresponding position in an output sequence.The input and output sequences can coincide, resulting in an in-place transformation. | |
template<typename InputIterator , typename OutputIterator , typename UnaryFunction > | |
void | transform (InputIterator first, InputIterator last, OutputIterator result, UnaryFunction op, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename BinaryFunction > | |
void | transform (bolt::cl::control &ctl, InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, BinaryFunction op, const std::string &user_code="") |
This version of transform applies a binary function to each pair of elements from two input sequences and stores the result in the corresponding position in an output sequence. The input and output sequences can coincide, resulting in an in-place transformation. | |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator , typename BinaryFunction > | |
void | transform (InputIterator1 first1, InputIterator1 last1, InputIterator2 first2, OutputIterator result, BinaryFunction op, const std::string &user_code="") |
template<typename InputIterator , typename UnaryFunction , typename T , typename BinaryFunction > | |
T | transform_reduce (control &ctl, InputIterator first, InputIterator last, UnaryFunction transform_op, T init, BinaryFunction reduce_op, const std::string &user_code="") |
transform_reduce fuses transform and reduce operations together, increasing performance by reducing memory passes. | |
template<typename InputIterator , typename UnaryFunction , typename T , typename BinaryFunction > | |
T | transform_reduce (InputIterator first, InputIterator last, UnaryFunction transform_op, T init, BinaryFunction reduce_op, const std::string &user_code="") |
template<typename InputIterator , typename OutputIterator , typename UnaryFunction , typename BinaryFunction > | |
OutputIterator | transform_inclusive_scan (bolt::cl::control &ctl, InputIterator first, InputIterator last, OutputIterator result, UnaryFunction unary_op, BinaryFunction binary_op, const std::string &user_code="") |
transform_inclusive_scan performs, on a sequence, the transformation defined by a unary operator, then the inclusive scan defined by a binary operator. | |
template<typename InputIterator , typename OutputIterator , typename UnaryFunction , typename BinaryFunction > | |
OutputIterator | transform_inclusive_scan (InputIterator first, InputIterator last, OutputIterator result, UnaryFunction unary_op, BinaryFunction binary_op, const std::string &user_code="") |
template<typename InputIterator , typename OutputIterator , typename UnaryFunction , typename T , typename BinaryFunction > | |
OutputIterator | transform_exclusive_scan (bolt::cl::control &ctl, InputIterator first, InputIterator last, OutputIterator result, UnaryFunction unary_op, T init, BinaryFunction binary_op, const std::string &user_code="") |
transform_exclusive_scan performs, on a sequence, the transformation defined by a unary operator, then the exclusive scan defined by a binary operator. | |
template<typename InputIterator , typename OutputIterator , typename UnaryFunction , typename T , typename BinaryFunction > | |
OutputIterator | transform_exclusive_scan (InputIterator first, InputIterator last, OutputIterator result, UnaryFunction unary_op, T init, BinaryFunction binary_op, const std::string &user_code="") |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator > | |
void | gather (bolt::cl::control &ctl, InputIterator1 map_first, InputIterator1 map_last, InputIterator2 input, OutputIterator result, const std::string &user_code) |
template<unsigned int N, typename T1 , typename T2 > | |
tuple_element< N, pair< T1, T2 > >::type & | get (pair< T1, T2 > &p) |
template<unsigned int N, typename T1 , typename T2 > | |
const tuple_element< N, pair < T1, T2 > >::type & | get (const pair< T1, T2 > &p) |
template<typename InputIterator1 , typename InputIterator2 , typename OutputIterator > | |
void | scatter (bolt::cl::control &ctl, InputIterator1 first1, InputIterator1 last1, InputIterator2 map, OutputIterator result, const std::string &user_code) |
template<typename Iterator > | |
Iterator::value_type * | addressof (Iterator itr) |
template<typename T > | |
T * | addressof (T *itr) |
template<typename UnaryFunction , typename Iterator > | |
bolt::cl::transform_iterator < UnaryFunction, Iterator > ::pointer | addressof (const typename bolt::cl::transform_iterator< UnaryFunction, Iterator > itr) |
template<typename value_type > | |
bolt::cl::counting_iterator < value_type >::pointer | addressof (typename bolt::cl::counting_iterator< value_type > itr) |
template<typename value_type > | |
bolt::cl::constant_iterator < value_type >::pointer | addressof (typename bolt::cl::constant_iterator< value_type > itr) |
template<typename Iterator , typename DeviceIterator > | |
const transform_iterator < typename Iterator::unary_func, DeviceIterator > | create_device_itr (bolt::cl::transform_iterator_tag, Iterator itr, DeviceIterator dev_itr_1) |
template<typename Iterator , typename DeviceIterator > | |
const bolt::cl::device_vector < typename Iterator::value_type > ::iterator | create_device_itr (std::random_access_iterator_tag, Iterator itr, DeviceIterator dev_itr_1) |
template<typename T , typename DeviceIterator > | |
const bolt::cl::device_vector < T >::iterator | create_device_itr (std::random_access_iterator_tag, T *ptr, DeviceIterator dev_itr_1) |
template<typename Iterator , typename DeviceIterator > | |
const constant_iterator < typename Iterator::value_type > | create_device_itr (bolt::cl::constant_iterator_tag, Iterator itr, DeviceIterator dev_itr_1) |
template<typename Iterator , typename DeviceIterator > | |
const counting_iterator < typename Iterator::value_type > | create_device_itr (bolt::cl::counting_iterator_tag, Iterator itr, DeviceIterator dev_itr_1) |
template<typename Iterator , typename T > | |
transform_iterator< typename Iterator::unary_func, T * > | create_mapped_iterator (bolt::cl::transform_iterator_tag, bolt::cl::control &ctl, Iterator &itr, T *ptr) |
template<typename Iterator , typename T > | |
T * | create_mapped_iterator (bolt::cl::device_vector_tag, bolt::cl::control &ctl, Iterator &itr, T *ptr) |
template<typename Iterator , typename T > | |
const constant_iterator < typename Iterator::value_type > & | create_mapped_iterator (bolt::cl::constant_iterator_tag, bolt::cl::control &ctl, Iterator &itr, T *ptr) |
template<typename Iterator , typename T > | |
const counting_iterator < typename Iterator::value_type > & | create_mapped_iterator (bolt::cl::counting_iterator_tag, bolt::cl::control &ctl, Iterator &itr, T *ptr) |
template<typename Iterator , typename T > | |
const permutation_iterator < typename Iterator::value_type *, typename Iterator::index_type * > | create_mapped_iterator (bolt::cl::permutation_iterator_tag, bolt::cl::control &ctl, Iterator &itr, T *ptr) |
template<typename Type > | |
constant_iterator< Type > | make_constant_iterator (Type constValue) |
template<typename Type > | |
counting_iterator< Type > | make_counting_iterator (Type constValue) |
BOLT_ITERATOR_FACADE_RELATION (==, return, equal) | |
BOLT_ITERATOR_FACADE_RELATION (!=, return!, equal) | |
BOLT_ITERATOR_FACADE_RELATION (<, return 0 >, distance_from) | |
BOLT_ITERATOR_FACADE_RELATION (>, return 0<, distance_from) | |
BOLT_ITERATOR_FACADE_RELATION (<=, return 0 >=, distance_from) | |
BOLT_ITERATOR_FACADE_RELATION (>=, return 0<=, distance_from) | |
template<class Derived1 , class V1 , class TC1 , class Reference1 , class Difference1 , class Derived2 , class V2 , class TC2 , class Reference2 , class Difference2 > | |
bolt::cl::detail::distance_from_result < bolt::cl::iterator_facade < Derived1, V1, TC1, Reference1, Difference1 > , bolt::cl::iterator_facade < Derived2, V2, TC2, Reference2, Difference2 > >::type | operator- (iterator_facade< Derived1, V1, TC1, Reference1, Difference1 > const &lhs, iterator_facade< Derived2, V2, TC2, Reference2, Difference2 > const &rhs) |
template<class Derived , class V , class TC , class R , class D > | |
Derived | operator+ (bolt::cl::iterator_facade< Derived, V, TC, R, D > const &i, typename Derived::difference_type n) |
template<class Derived , class V , class TC , class R , class D > | |
Derived | operator+ (typename Derived::difference_type n, bolt::cl::iterator_facade< Derived, V, TC, R, D > const &i) |
template<class ElementIterator , class IndexIterator > | |
permutation_iterator < ElementIterator, IndexIterator > | make_permutation_iterator (ElementIterator e, IndexIterator i) |
template<class UnaryFunc , class Iterator > | |
transform_iterator< UnaryFunc, Iterator > | make_transform_iterator (Iterator it, UnaryFunc fun) |
template<class UnaryFunc , class Iterator > | |
std::enable_if< std::is_class < UnaryFunc >::value, transform_iterator< UnaryFunc, Iterator > >::type | make_transform_iterator (Iterator it) |
Namespace containing OpenCL related data types and functions.
std::string bolt::cl::clErrorStringA | ( | const cl_int & | status | ) |
Translates an integer OpenCL error code to a std::string at runtime.
status | The OpenCL error code |
std::wstring bolt::cl::clErrorStringW | ( | const cl_int & | status | ) |
Translates an integer OpenCL error code to a std::wstring at runtime.
status | The OpenCL error code |
void bolt::cl::getVersion | ( | cl_uint & | major, |
cl_uint & | minor, | ||
cl_uint & | patch | ||
) |
Query the Bolt library for version information.
Return the major, minor and patch version numbers associated with the Bolt library
[out] | major | Major functionality change |
[out] | minor | Minor functionality change |
[out] | patch | Bug fixes, documentation changes, no new features introduced |
|
inline |
Helper print function to stringify OpenCL error codes.
res | The OpenCL error code |
msg | A relevant message to be printed out supplied by user |
lineno | Source line number; not currently used |