Commit e14237b0 authored by Joseph Noir's avatar Joseph Noir

Fix warnings that occur with --more-warnings

parent 699869d9
......@@ -168,10 +168,10 @@ class actor_facade<Ret(Args...)> : public abstract_actor {
T0& arg0, Ts&... args) {
size_t buffer_size = sizeof(typename T0::value_type) * arg0.size();
auto buffer = v2get(CAF_CLF(clCreateBuffer), m_context.get(),
CL_MEM_READ_ONLY, buffer_size, nullptr);
cl_mem_flags{CL_MEM_READ_ONLY}, buffer_size, nullptr);
cl_event event = v1get<cl_event>(CAF_CLF(clEnqueueWriteBuffer),
m_queue.get(), buffer, CL_FALSE,
0,buffer_size, arg0.data());
m_queue.get(), buffer, cl_bool{CL_FALSE},
cl_uint{0},buffer_size, arg0.data());
events.push_back(std::move(event));
mem_ptr tmp;
tmp.adopt(std::move(buffer));
......@@ -183,7 +183,8 @@ class actor_facade<Ret(Args...)> : public abstract_actor {
void add_arguments_to_kernel(evnt_vec& events, args_vec& arguments,
size_t ret_size, Ts&&... args) {
arguments.clear();
auto buf = v2get(CAF_CLF(clCreateBuffer), m_context.get(), CL_MEM_WRITE_ONLY,
auto buf = v2get(CAF_CLF(clCreateBuffer), m_context.get(),
cl_mem_flags{CL_MEM_WRITE_ONLY},
sizeof(typename R::value_type) * ret_size, nullptr);
mem_ptr tmp;
tmp.adopt(std::move(buf));
......
......@@ -73,19 +73,19 @@ void opencl_metainfo::initialize() {
try {
cmd_queue.adopt(v2get(CAF_CLF(clCreateCommandQueue),
m_context.get(), device.get(),
static_cast<unsigned>(CL_QUEUE_PROFILING_ENABLE)));
unsigned{CL_QUEUE_PROFILING_ENABLE}));
}
catch (std::runtime_error&) {
CAF_LOG_DEBUG("unable to create command queue for device");
}
if (cmd_queue) {
auto max_wgs = v3get<size_t>(CAF_CLF(clGetDeviceInfo), device.get(),
static_cast<unsigned>(CL_DEVICE_MAX_WORK_GROUP_SIZE));
unsigned{CL_DEVICE_MAX_WORK_GROUP_SIZE});
auto max_wid = v3get<cl_uint>(CAF_CLF(clGetDeviceInfo), device.get(),
static_cast<unsigned>(CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS));
unsigned{CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS});
dim_vec max_wi_per_dim(max_wid);
v2callcl(CAF_CLF(clGetDeviceInfo), device.get(),
static_cast<unsigned>(CL_DEVICE_MAX_WORK_ITEM_SIZES),
unsigned{CL_DEVICE_MAX_WORK_ITEM_SIZES},
sizeof(size_t) * max_wid,
max_wi_per_dim.data());
m_devices.push_back(device_info{std::move(device), std::move(cmd_queue),
......
......@@ -57,7 +57,7 @@ program program::create(const char* kernel_source, const char* options,
// create program object from kernel source
size_t kernel_source_length = strlen(kernel_source);
program_ptr pptr;
pptr.adopt(v2get(CAF_CLF(clCreateProgramWithSource),context.get(), 1,
pptr.adopt(v2get(CAF_CLF(clCreateProgramWithSource),context.get(), cl_uint{1},
&kernel_source, &kernel_source_length));
// build programm from program object
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment