diff options
author | Thomas White <taw@physics.org> | 2014-11-14 16:23:20 +0100 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2014-11-14 16:23:20 +0100 |
commit | d545f4f23c7bb31b016ea5935dfd10c4e761b5ac (patch) | |
tree | 4c2c2d595a40be09ff5d49d32fc0addba4cdfd71 /src/diffraction-gpu.h | |
parent | d5fab594831e7884eb2dcf395995ec6d12a9cbfd (diff) |
pattern_sim: Better error trapping
Diffstat (limited to 'src/diffraction-gpu.h')
-rw-r--r-- | src/diffraction-gpu.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/diffraction-gpu.h b/src/diffraction-gpu.h index e7ae23fd..c313859f 100644 --- a/src/diffraction-gpu.h +++ b/src/diffraction-gpu.h @@ -40,9 +40,9 @@ struct gpu_context; #if HAVE_OPENCL -extern void get_diffraction_gpu(struct gpu_context *gctx, struct image *image, - int na, int nb, int nc, UnitCell *ucell, - int no_fringes); +extern int get_diffraction_gpu(struct gpu_context *gctx, struct image *image, + int na, int nb, int nc, UnitCell *ucell, + int no_fringes); extern struct gpu_context *setup_gpu(int no_sfac, const double *intensities, const unsigned char *flags, @@ -51,12 +51,13 @@ extern void cleanup_gpu(struct gpu_context *gctx); #else -static void get_diffraction_gpu(struct gpu_context *gctx, struct image *image, - int na, int nb, int nc, UnitCell *ucell, - int no_fringes) +static int get_diffraction_gpu(struct gpu_context *gctx, struct image *image, + int na, int nb, int nc, UnitCell *ucell, + int no_fringes) { /* Do nothing */ ERROR("This copy of CrystFEL was not compiled with OpenCL support.\n"); + return 1; } static struct gpu_context *setup_gpu(int no_sfac, |