Closed rosenrodt closed 5 years ago
@jszuppe Maybe it's better if this supports pre-C++11. Should we implement similar class to local_buffer
(say null_buffer
) to support setting kernel argument to NULL?
Maybe it's better if this supports pre-C++11. Should we implement similar class to local_buffer (say null_buffer) to support setting kernel argument to NULL?
I would rather have just the C++11 version. It's very unlikely that someone using C++03 will find and use boost::compute::null_buffer
before just using set_arg(0, sizeof(cl_mem), NULL);
(not mentioning that setting a buffer to NULL
is not a popular use case).
We could stick to C++11. The trade-off would be that people using pre-C++11 won't be able to write nice things like kernel.set_args(b0, b1, nullptr)
.
If that's indeed where we want to go then I'll update the PR.
pre-C++11 you don't have variadic templates, you can't write kernel.set_args(b0, b1, nullptr)
in C++03.
I'm sold. I'll just stick with C++11 version. Please review
Per Khronos OpenCL spec:
But the following call causes error:
One way as suggested in #828 is to use
Now it's just