We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
`using namespace boost;
using compute::int_; // get default device and setup context compute::device device = compute::system::default_device(); compute::context context(device); compute::command_queue queue(context, device); // point coordinates int a[]={2}; // create vector for five points compute::vector<int_> vector(1, context); // copy point data to the device compute::copy( reinterpret_cast<int *>(a), reinterpret_cast<int *>(a) + 1, vector.begin(), queue ); compute::vector<int_> out(1, context); boost::compute::function<int (int)> add_four = boost::compute::make_function_from_source<int (int)>( "add_four", "int add_four(int x) { return x + 4; }" ); boost::compute::transform(vector.begin(), vector.end(), out.begin(), add_four, queue); cout<<out[0];`
The text was updated successfully, but these errors were encountered:
No branches or pull requests
`using namespace boost;
The text was updated successfully, but these errors were encountered: