aboutsummaryrefslogtreecommitdiff
path: root/src/diffraction-gpu.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-02-24 18:43:22 +0100
committerThomas White <taw@physics.org>2010-02-24 18:43:22 +0100
commitb8872a44c8a6dc60d98d992dca992573a28d059b (patch)
treee1acc45325df145e734662d429870ed8183f44e7 /src/diffraction-gpu.c
parent70caa3bf32cf3c04c32442f7127d6c7df0c10c39 (diff)
Report maximum work group size and if it has been exceeded
Diffstat (limited to 'src/diffraction-gpu.c')
-rw-r--r--src/diffraction-gpu.c5
1 files changed, 5 insertions, 0 deletions
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;
}