Bolt  1.1
C++ template library with support for OpenCL
List of Supported Functions

Table of Contents

Supported Functions and Paths

Bolt function is designed to be executed with four code paths (OpenCL™, C++ AMP, Multicore CPU and Serial CPU). The default mode is "Automatic" which means it will go into GPU path first, then Multicore CPU (Intel TBB), then SerialCpu, control will go to other paths only if the selected one is not found. Forcing the mode to any code path will run the function with that code path. All Bolt functions have OpenCL™, Multicore CPU and Serial path implementation.

Example:

Transform Scan:

Transform_inclusive_scan performs, on a sequence, the transformation defined by a unary operator, then the inclusive scan defined by a binary operator. As Multicore path for transform_inclusive_scan function is not implemented yet, forcing transform_inclusive_scan to MultiCoreCpu will run Serial code in the example below.

.....
int length = 10;
std::vector< float > input( length );
std::vector< float > output( length );
ctl.setForceRunMode(bolt::cl::control::MultiCoreCpu);
bolt::cl::negate<float> unary_op;
bolt::cl::plus<float> binary_op;
bolt::cl::transform_inclusive_scan(ctl, input.begin(), input.end(), output.begin(), unary_op, binary_op ); // run with serial path.

List of Supported Function and Code Paths

API OpenCL™ GPU AMP Multicore TBB Serial
constant_iterator YES NO YES YES
copy YES NO YES YES
copy_n YES NO YES YES
count YES YES YES YES
count_if YES YES YES YES
counting_iterator YES NO YES YES
device_vector YES YES YES YES
exclusive_scan YES YES YES YES
exclusive_scan_by_key YES NO YES YES
fill YES NO YES YES
fill_n YES NO YES YES
generate YES NO YES YES
generate_n YES NO YES YES
inclusive_scan YES YES YES YES
inclusive_scan_by_key YES NO YES YES
inner_product YES NO YES YES
max_element YES NO YES YES
min_element YES NO YES YES
reduce YES YES YES YES
reduce_by_key YES NO YES YES
sort YES YES YES YES
sort_by_key YES NO YES YES
stable_sort YES NO YES YES
stable_sort_by_key YES NO YES YES
transform YES YES YES YES
transform_exclusive_scan YES NO YES YES
transform_inclusive_scan YES NO YES YES
transform_reduce YES YES YES YES
binary_search YES NO YES YES
merge YES NO YES YES
scatter YES NO YES YES
scatter_if YES NO YES YES
gather YES NO YES YES
gather_if YES NO YES

YES