aboutsummaryrefslogtreecommitdiff
path: root/src/cl-utils.h
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2018-06-26 11:53:44 +0200
committerThomas White <taw@physics.org>2018-06-26 14:07:42 +0200
commit946ee4bc4a0bc13a965d170ab959cfe7a2cf1b27 (patch)
treeda7397b4df4346724115023c5ac04ed50358b37b /src/cl-utils.h
parenta604828f8a21399574a39d9b3ce38b116fd98ee6 (diff)
Embed diffraction.cl and hdfsee.ui into executables
Having to install these causes problems, e.g. you can't run from build directory nor run tests without installing. For hdfsee.ui, the XML is now embedded in the code just as it is for cell_explorer. diffraction.cl is a bit too long and complicated for that. There are a number of nasty ways to embed such files. This one seems to be the overall least nasty, although it requires data/gen-resources to be run whenever diffraction.cl is changed.
Diffstat (limited to 'src/cl-utils.h')
-rw-r--r--src/cl-utils.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/cl-utils.h b/src/cl-utils.h
index 6e76748a..fcaf1380 100644
--- a/src/cl-utils.h
+++ b/src/cl-utils.h
@@ -3,11 +3,11 @@
*
* OpenCL utility functions
*
- * Copyright © 2012-2014 Deutsches Elektronen-Synchrotron DESY,
+ * Copyright © 2012-2018 Deutsches Elektronen-Synchrotron DESY,
* a research centre of the Helmholtz Association.
*
* Authors:
- * 2010-2014 Thomas White <taw@physics.org>
+ * 2010-2018 Thomas White <taw@physics.org>
*
* This file is part of CrystFEL.
*
@@ -36,6 +36,10 @@
extern const char *clError(cl_int err);
extern cl_device_id get_cl_dev(cl_context ctx, int n);
+extern cl_program load_program_from_string(const char *source_in, size_t len,
+ cl_context ctx, cl_device_id dev,
+ cl_int *err, const char *extra_cflags,
+ const char *insert_stuff);
extern cl_program load_program(const char *filename, cl_context ctx,
cl_device_id dev, cl_int *err,
const char *extra_cflags, const char *insert_stuff);