aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cl-utils.c1
-rw-r--r--src/diffraction-gpu.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/cl-utils.c b/src/cl-utils.c
index be3e3551..de65db31 100644
--- a/src/cl-utils.c
+++ b/src/cl-utils.c
@@ -39,6 +39,7 @@ const char *clError(cl_int err)
case CL_OUT_OF_RESOURCES : return "out of resources";
case CL_INVALID_KERNEL_NAME : return "invalid kernel name";
case CL_INVALID_KERNEL_ARGS : return "invalid kernel arguments";
+ case CL_INVALID_WORK_GROUP_SIZE : return "invalid work group size";
default :
ERROR("Error code: %i\n", err);
return "unknown error";
diff --git a/src/diffraction-gpu.c b/src/diffraction-gpu.c
index b1f0860a..33410701 100644
--- a/src/diffraction-gpu.c
+++ b/src/diffraction-gpu.c
@@ -266,6 +266,7 @@ struct gpu_context *setup_gpu(int no_sfac, struct image *image,
cl_device_id dev;
size_t sfac_size;
float *sfac_ptr;
+ size_t maxwgsize;
if ( molecule == NULL ) return NULL;
@@ -371,6 +372,10 @@ struct gpu_context *setup_gpu(int no_sfac, struct image *image,
STATUS("done\n");
+ clGetDeviceInfo(dev, CL_DEVICE_MAX_WORK_GROUP_SIZE,
+ sizeof(size_t), &maxwgsize, NULL);
+ STATUS("Maximum work group size = %lli\n", (long long int)maxwgsize);
+
return gctx;
}