Commit b46f1e37 by Christian Kern

Corrected wrong data sizes (data size are now as described in the OpenCL standard.

parent 572d8d00
...@@ -46,8 +46,8 @@ struct embb_mtapi_opencl_plugin_struct { ...@@ -46,8 +46,8 @@ struct embb_mtapi_opencl_plugin_struct {
cl_device_id device_id; cl_device_id device_id;
cl_context context; cl_context context;
cl_command_queue command_queue; cl_command_queue command_queue;
cl_uint work_group_size; size_t work_group_size;
cl_uint work_item_sizes[3]; size_t work_item_sizes[3];
}; };
typedef struct embb_mtapi_opencl_plugin_struct embb_mtapi_opencl_plugin_t; typedef struct embb_mtapi_opencl_plugin_struct embb_mtapi_opencl_plugin_t;
...@@ -270,12 +270,13 @@ void mtapi_opencl_plugin_initialize( ...@@ -270,12 +270,13 @@ void mtapi_opencl_plugin_initialize(
NULL, NULL, &err); NULL, NULL, &err);
} }
if (CL_SUCCESS == err) { if (CL_SUCCESS == err) {
size_t work_group_size;
err = clGetDeviceInfo(plugin->device_id, CL_DEVICE_MAX_WORK_GROUP_SIZE, err = clGetDeviceInfo(plugin->device_id, CL_DEVICE_MAX_WORK_GROUP_SIZE,
sizeof(cl_uint), &plugin->work_group_size, NULL); sizeof(size_t), &plugin->work_group_size, NULL);
} }
if (CL_SUCCESS == err) { if (CL_SUCCESS == err) {
err = clGetDeviceInfo(plugin->device_id, CL_DEVICE_MAX_WORK_ITEM_SIZES, err = clGetDeviceInfo(plugin->device_id, CL_DEVICE_MAX_WORK_ITEM_SIZES,
3 * sizeof(cl_uint), &plugin->work_item_sizes[0], NULL); 3 * sizeof(size_t), &plugin->work_item_sizes[0], NULL);
} }
if (CL_SUCCESS == err) { if (CL_SUCCESS == err) {
plugin->command_queue = clCreateCommandQueue(plugin->context, plugin->command_queue = clCreateCommandQueue(plugin->context,
......
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 sign in to comment