(!pfn_notify && user_data))
throw error(CL_INVALID_VALUE);
- if (any_of(is_zero<cl_device_id>(), devs, devs + num_devs))
+ if (any_of(is_zero<cl_device_id>, devs, devs + num_devs))
throw error(CL_INVALID_DEVICE);
for (auto p : mprops) {
throw error(CL_INVALID_CONTEXT);
if (bool(num_deps) != bool(deps) ||
- any_of(is_zero<cl_event>(), deps, deps + num_deps))
+ any_of(is_zero<cl_event>, deps, deps + num_deps))
throw error(CL_INVALID_EVENT_WAIT_LIST);
if (any_of([](std::unique_ptr<kernel::argument> &arg) {
if (dims < 1 || dims > q->dev.max_block_size().size())
throw error(CL_INVALID_WORK_DIMENSION);
- if (!grid_size || any_of(is_zero<size_t>(), grid_size, grid_size + dims))
+ if (!grid_size || any_of(is_zero<size_t>, grid_size, grid_size + dims))
throw error(CL_INVALID_GLOBAL_WORK_SIZE);
if (block_size) {
throw error(CL_INVALID_CONTEXT);
if (!count || !strings ||
- any_of(is_zero<const char *>(), strings, strings + count))
+ any_of(is_zero<const char *>, strings, strings + count))
throw error(CL_INVALID_VALUE);
// Concatenate all the provided fragments together
throw error(CL_INVALID_COMMAND_QUEUE);
if (bool(num_deps) != bool(deps) ||
- any_of(is_zero<cl_event>(), deps, deps + num_deps))
+ any_of(is_zero<cl_event>, deps, deps + num_deps))
throw error(CL_INVALID_EVENT_WAIT_LIST);
if (any_of([&](const cl_event ev) {
}
template<typename T>
- std::function<bool (const T &)>
- is_zero() {
- return [](const T &x) {
- return x == 0;
- };
+ bool
+ is_zero(T x) {
+ return x == 0;
}
}