boostorg / compute

A C++ GPU Computing Library for OpenCL
http://boostorg.github.io/compute/
Boost Software License 1.0
1.52k stars 333 forks source link

Adding call() function with variadic templates #320

Open adamcavendish opened 9 years ago

adamcavendish commented 9 years ago

For C++11 users, maybe we can setup helper call() functions with variadic templates instead of set_arg() stuffs?

For example: Kernel.hpp Kernel.tcc

kylelutz commented 9 years ago

Something like that would be interesting to have. Currently there is the variadic kernel::set_args() function which can be used to set all of the arguments for a kernel with a single function call like:

kernel.set_args(input.size(), input.data(), output.size(), output.data());