Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
opencl.h
Go to the documentation of this file.
1/*
2 This file is part of darktable,
3 Copyright (C) 2010-2022 darktable developers.
4
5 darktable is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
9
10 darktable is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with darktable. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19#pragma once
20
21#ifdef HAVE_CONFIG_H
22#include "config.h"
23#endif
24
25#define DT_OPENCL_MAX_PLATFORMS 5
26#define DT_OPENCL_MAX_PROGRAMS 256
27#define DT_OPENCL_MAX_KERNELS 512
28#define DT_OPENCL_EVENTLISTSIZE 256
29#define DT_OPENCL_EVENTNAMELENGTH 64
30#define DT_OPENCL_MAX_ERRORS 5
31#define DT_OPENCL_MAX_INCLUDES 7
32#define DT_OPENCL_VENDOR_AMD 4098
33#define DT_OPENCL_VENDOR_NVIDIA 4318
34#define DT_OPENCL_VENDOR_INTEL 0x8086u
35#define DT_OPENCL_CBUFFSIZE 1024
36
37// some pseudo error codes in dt opencl usage
38#define DT_OPENCL_DEFAULT_ERROR -999
39#define DT_OPENCL_SYSMEM_ALLOCATION -998
40
41#include "common/darktable.h"
42
43#ifdef HAVE_OPENCL
44
45#include "common/dlopencl.h"
46#include "common/dtpthread.h"
47#include "common/iop_profile.h"
48#include "control/conf.h"
49
50// #pragma GCC diagnostic push
51// #pragma GCC diagnostic ignored "-Wcomment"
52#include <CL/cl.h>
53// #pragma GCC diagnostic
54
55#ifdef __cplusplus
56extern "C" {
57#endif
58
59#define ROUNDUP(a, n) ((a) % (n) == 0 ? (a) : ((a) / (n)+1) * (n))
60
61// use per device roundups here
62#define ROUNDUPDWD(a, b) dt_opencl_dev_roundup_width(a, b)
63#define ROUNDUPDHT(a, b) dt_opencl_dev_roundup_height(a, b)
64
65#define DT_OPENCL_DEFAULT_COMPILE_INTEL ("-cl-fast-relaxed-math")
66#define DT_OPENCL_DEFAULT_COMPILE_AMD ("-cl-fast-relaxed-math")
67#define DT_OPENCL_DEFAULT_COMPILE_NVIDIA ("-cl-fast-relaxed-math")
68#define DT_OPENCL_DEFAULT_COMPILE ("-cl-fast-relaxed-math")
69#define DT_CLDEVICE_HEAD ("cldevice_v4_")
70
71typedef enum dt_opencl_memory_t
72{
73 OPENCL_MEMORY_ADD,
74 OPENCL_MEMORY_SUB
75} dt_opencl_memory_t;
76
80typedef struct dt_opencl_eventtag_t
81{
82 cl_int retval;
83 cl_ulong timelapsed;
85} dt_opencl_eventtag_t;
86
87typedef enum dt_opencl_pinmode_t
88{
89 DT_OPENCL_PINNING_OFF = 0,
90 DT_OPENCL_PINNING_ON = 1,
91 DT_OPENCL_PINNING_DISABLED = 2
92} dt_opencl_pinmode_t;
93
98typedef struct dt_opencl_device_t
99{
100 dt_pthread_mutex_t lock;
101 cl_device_id devid;
102 cl_context context;
103 cl_command_queue cmd_queue;
104 size_t max_image_width;
105 size_t max_image_height;
106 cl_ulong max_mem_alloc;
107 cl_ulong max_global_mem;
108 cl_ulong used_global_mem;
109 cl_program program[DT_OPENCL_MAX_PROGRAMS];
110 cl_kernel kernel[DT_OPENCL_MAX_KERNELS];
111 int program_used[DT_OPENCL_MAX_PROGRAMS];
112 int kernel_used[DT_OPENCL_MAX_KERNELS];
113 cl_event *eventlist;
114 dt_opencl_eventtag_t *eventtags;
115 int numevents;
116 int eventsconsolidated;
117 int maxevents;
118 int lostevents;
119 int totalevents;
120 int totalsuccess;
121 int totallost;
122 int maxeventslot;
123 int nvidia_sm_20;
124 const char *vendor;
125 const char *name;
126 const char *cname;
127 const char *options;
128 cl_int summary;
129 // the benchmark value must not be changed by the user
130 float benchmark;
131 size_t memory_in_use;
132 size_t peak_memory;
133 size_t used_available;
134
135 // flags detected errors
136 int runtime_error;
137 // if set to TRUE darktable will not use OpenCL kernels which contain atomic operations (example bilateral).
138 // pixelpipe processing will be done on CPU for the affected modules.
139 // useful (only for very old devices) if your OpenCL implementation freezes/crashes on atomics or if
140 // they are processed with a bad performance.
141 int avoid_atomics;
142
143 // pause OpenCL processing for this number of microseconds from time to time
144 int micro_nap;
145
146 // During tiling huge amounts of memory need to be transferred between host and device.
147 // For some OpenCL implementations direct memory transfers give a drastic performance penalty,
148 // this can often be avoided by using indirect transfers via pinned memory,
149 // other devices have more efficient direct memory transfer implementations.
150 // We can't predict on solid grounds if a device belongs to the first or second group,
151 // also pinned mem transfer requires slightly more ram.
152 // this holds a bitmask defined by dt_opencl_pinmode_t
153 // the device specific conf key might hold
154 // 0 -> disabled by default; might be switched on by tune for performance
155 // 1 -> enabled by default
156 // 2 -> disabled under all circumstances. This could/should be used if we give away / ship specific keys for buggy systems
157 int pinned_memory;
158
159 // in OpenCL processing round width/height of global work groups to a multiple of these values.
160 // reasonable values are powers of 2. this parameter can have high impact on OpenCL performance.
161 int clroundup_wd;
162 int clroundup_ht;
163
164 // A bitfield that identifies the type of OpenCL device required to test for on-CPU and more.
165 unsigned int cltype;
166
167 // This defines how often should dt_opencl_events_get_slot do a dt_opencl_events_flush.
168 // It should definitely le lower than the number of events that can be handled by the device/driver.
169 // FIXME we should be able to test for that with using >= OpenCl 2.0
170 int event_handles;
171
172 // opencl_events enabled for the device, set internally via event_handles
173 int use_events;
174
175 // a device might be turned off by force by setting this value to 1
176 // also used for blacklisted drivers
177 int disabled;
178
179 // Some devices are known to be unused by other apps so there is no need to test for available memory at all.
180 // Also some devices might behave badly with the checking code, in this case we could enforce a headroom here.
181 size_t forced_headroom;
182} dt_opencl_device_t;
183
184struct dt_bilateral_cl_global_t;
185struct dt_local_laplacian_cl_global_t;
186struct dt_dwt_cl_global_t; // wavelet decompose
187struct dt_heal_cl_global_t; // healing
188struct dt_colorspaces_cl_global_t; // colorspaces transform
189struct dt_guided_filter_cl_global_t;
190
195typedef struct dt_opencl_t
196{
197 dt_pthread_mutex_t lock;
198 int inited;
199 int print_statistics;
200 int enabled;
201 int stopped;
202 int num_devs;
203 int error_count;
204 int opencl_synchronization_timeout;
205 uint32_t crc;
206 int mandatory[5];
207 int *dev_priority_image;
208 int *dev_priority_preview;
209 int *dev_priority_export;
210 int *dev_priority_thumbnail;
211 dt_opencl_device_t *dev;
212 dt_dlopencl_t *dlocl;
213
214 // Benchmarking GUIĀ to make user wait while we run expensive stuff in background
215 GtkWidget *dialog;
216 GtkWidget *progress;
217 GtkWidget *label;
218 char progress_label[256];
219 double steps;
220 double step;
221
222 // we want the cpu benchmark to be available
223 float cpubenchmark;
224 // global kernels for blending operations.
225 struct dt_blendop_cl_global_t *blendop;
226
227 // global kernels for bilateral filtering, to be reused by a few plugins.
228 struct dt_bilateral_cl_global_t *bilateral;
229
230 // global kernels for gaussian filtering, to be reused by a few plugins.
231 struct dt_gaussian_cl_global_t *gaussian;
232
233 // global kernels for interpolation resampling.
234 struct dt_interpolation_cl_global_t *interpolation;
235
236 // global kernels for local laplacian filter.
237 struct dt_local_laplacian_cl_global_t *local_laplacian;
238
239 // global kernels for dwt filter.
240 struct dt_dwt_cl_global_t *dwt;
241
242 // global kernels for heal filter.
243 struct dt_heal_cl_global_t *heal;
244
245 // global kernels for colorspaces filter.
246 struct dt_colorspaces_cl_global_t *colorspaces;
247
248 // global kernels for guided filter.
249 struct dt_guided_filter_cl_global_t *guided_filter;
251
255typedef struct dt_opencl_local_buffer_t
256{
257 const int xoffset;
258 const int xfactor;
259 const int yoffset;
260 const int yfactor;
261 const size_t cellsize;
262 const size_t overhead;
263 int sizex; // initial value and final values after optimization
264 int sizey; // initial value and final values after optimization
265} dt_opencl_local_buffer_t;
266
270int dt_opencl_get_device_info(dt_opencl_t *cl, cl_device_id device, cl_device_info param_name, void **param_value,
271 size_t *param_value_size);
272
274void dt_opencl_init(dt_opencl_t *cl, const gboolean exclude_opencl, const gboolean print_statistics);
275
278
280void dt_opencl_cleanup_device(dt_opencl_t *cl, int i);
281
284int dt_opencl_finish(const int devid);
285
287int dt_opencl_enqueue_barrier(const int devid);
288
290int dt_opencl_lock_device(const int pipetype);
291
293void dt_opencl_unlock_device(const int dev);
294
296void dt_opencl_md5sum(const char **files, char **md5sums);
297
299int dt_opencl_load_program(const int dev, const int prog, const char *filename, const char *binname,
300 const char *cachedir, char *md5sum, char **includemd5, int *loaded_cached);
301
303int dt_opencl_build_program(const int dev, const int prog, const char *binname, const char *cachedir,
304 char *md5sum, int loaded_cached);
305
307int dt_opencl_create_kernel(const int program, const char *name);
308
310void dt_opencl_free_kernel(const int kernel);
311
313int dt_opencl_get_max_work_item_sizes(const int dev, size_t *sizes);
314
316int dt_opencl_get_work_group_limits(const int dev, size_t *sizes, size_t *workgroupsize,
317 unsigned long *localmemsize);
318
320int dt_opencl_get_kernel_work_group_size(const int dev, const int kernel, size_t *kernelworkgroupsize);
321
323int dt_opencl_set_kernel_arg(const int dev, const int kernel, const int num, const size_t size,
324 const void *arg);
325
327int dt_opencl_enqueue_kernel_2d(const int dev, const int kernel, const size_t *sizes);
328
330int dt_opencl_enqueue_kernel_2d_with_local(const int dev, const int kernel, const size_t *sizes,
331 const size_t *local);
332
334int dt_opencl_is_inited(void);
335
337int dt_opencl_is_enabled(void);
338
340void dt_opencl_disable(void);
341
344
346int dt_opencl_copy_device_to_host(const int devid, void *host, void *device, const int width,
347 const int height, const int bpp);
348
349int dt_opencl_read_host_from_device(const int devid, void *host, void *device, const int width,
350 const int height, const int bpp);
351
352int dt_opencl_read_host_from_device_rowpitch(const int devid, void *host, void *device, const int width,
353 const int height, const int rowpitch);
354
355int dt_opencl_read_host_from_device_non_blocking(const int devid, void *host, void *device, const int width,
356 const int height, const int bpp);
357
358int dt_opencl_read_host_from_device_rowpitch_non_blocking(const int devid, void *host, void *device,
359 const int width, const int height,
360 const int rowpitch);
361
362int dt_opencl_read_host_from_device_raw(const int devid, void *host, void *device, const size_t *origin,
363 const size_t *region, const int rowpitch, const int blocking);
364
365int dt_opencl_write_host_to_device(const int devid, void *host, void *device, const int width,
366 const int height, const int bpp);
367
368int dt_opencl_write_host_to_device_rowpitch(const int devid, void *host, void *device, const int width,
369 const int height, const int rowpitch);
370
371int dt_opencl_write_host_to_device_non_blocking(const int devid, void *host, void *device, const int width,
372 const int height, const int bpp);
373
374int dt_opencl_write_host_to_device_rowpitch_non_blocking(const int devid, void *host, void *device,
375 const int width, const int height,
376 const int rowpitch);
377
378int dt_opencl_write_host_to_device_raw(const int devid, void *host, void *device, const size_t *origin,
379 const size_t *region, const int rowpitch, const int blocking);
380
381void *dt_opencl_copy_host_to_device(const int devid, void *host, const int width, const int height,
382 const int bpp);
383
384void *dt_opencl_copy_host_to_device_rowpitch(const int devid, void *host, const int width, const int height,
385 const int bpp, const int rowpitch);
386
387void *dt_opencl_copy_host_to_device_constant(const int devid, const size_t size, void *host);
388
389int dt_opencl_enqueue_copy_image(const int devid, cl_mem src, cl_mem dst, size_t *orig_src, size_t *orig_dst,
390 size_t *region);
391
392void *dt_opencl_alloc_device(const int devid, const int width, const int height, const int bpp);
393
394void *dt_opencl_alloc_device_use_host_pointer(const int devid, const int width, const int height,
395 const int bpp, void *host, const int flags);
396
397int dt_opencl_enqueue_copy_image_to_buffer(const int devid, cl_mem src_image, cl_mem dst_buffer,
398 size_t *origin, size_t *region, size_t offset);
399
400int dt_opencl_enqueue_copy_buffer_to_image(const int devid, cl_mem src_buffer, cl_mem dst_image,
401 size_t offset, size_t *origin, size_t *region);
402
403int dt_opencl_enqueue_copy_buffer_to_buffer(const int devid, cl_mem src_buffer, cl_mem dst_buffer,
404 size_t srcoffset, size_t dstoffset, size_t size);
405
406int dt_opencl_read_buffer_from_device(const int devid, void *host, void *device, const size_t offset,
407 const size_t size, const int blocking);
408
409int dt_opencl_write_buffer_to_device(const int devid, void *host, void *device, const size_t offset,
410 const size_t size, const int blocking);
411
412void *dt_opencl_alloc_device_buffer(const int devid, const size_t size);
413
414void *dt_opencl_alloc_device_buffer_with_flags(const int devid, const size_t size, const int flags);
415
416void dt_opencl_release_mem_object(cl_mem mem);
417
418void *dt_opencl_map_buffer(const int devid, cl_mem buffer, const int blocking, const int flags, size_t offset,
419 size_t size);
420
421void *dt_opencl_map_image(const int devid, cl_mem buffer, const int blocking, const int flags, size_t width, size_t height, int bpp);
422
423int dt_opencl_unmap_mem_object(const int devid, cl_mem mem_object, void *mapped_ptr);
424
425size_t dt_opencl_get_mem_object_size(cl_mem mem);
426
427int dt_opencl_get_image_width(cl_mem mem);
428
429int dt_opencl_get_image_height(cl_mem mem);
430
431int dt_opencl_get_image_element_size(cl_mem mem);
432
433int dt_opencl_get_mem_context_id(cl_mem mem);
434
435void dt_opencl_memory_statistics(int devid, cl_mem mem, dt_opencl_memory_t action);
436
438gboolean dt_opencl_image_fits_device(const int devid, const size_t width, const size_t height, const unsigned bpp,
439 const float factor, const size_t overhead);
441cl_ulong dt_opencl_get_device_available(const int devid);
442
444void dt_opencl_check_tuning(const int devid);
445
447cl_ulong dt_opencl_get_device_memalloc(const int devid);
448
450int dt_opencl_dev_roundup_width(int size, const int devid);
451int dt_opencl_dev_roundup_height(int size, const int devid);
452
454cl_event *dt_opencl_events_get_slot(const int devid, const char *tag);
455
457void dt_opencl_events_reset(const int devid);
458
461void dt_opencl_events_wait_for(const int devid);
462
465cl_int dt_opencl_events_flush(const int devid, const int reset);
466
468void dt_opencl_events_profiling(const int devid, const int aggregated);
469
471int dt_opencl_local_buffer_opt(const int devid, const int kernel, dt_opencl_local_buffer_t *factors);
472
474void dt_opencl_write_device_config(const int devid);
475gboolean dt_opencl_read_device_config(const int devid);
476int dt_opencl_avoid_atomics(const int devid);
477int dt_opencl_micro_nap(const int devid);
478gboolean dt_opencl_use_pinned_memory(const int devid);
479
480#ifdef __cplusplus
481}
482#endif
483
484#else
485
486#include "control/conf.h"
487#include <stdlib.h>
488
489#ifdef __cplusplus
490extern "C" {
491#endif
492
500static inline void dt_opencl_init(dt_opencl_t *cl, const gboolean exclude_opencl, const gboolean print_statistics)
501{
502 cl->inited = 0;
503 cl->enabled = 0;
504 cl->stopped = 0;
505 cl->error_count = 0;
506 dt_conf_set_bool("opencl", FALSE);
507 dt_print(DT_DEBUG_OPENCL, "[opencl_init] this version of darktable was built without opencl support\n");
508}
509static inline void dt_opencl_cleanup(dt_opencl_t *cl)
510{
511}
512static inline gboolean dt_opencl_finish(const int devid)
513{
514 return -1;
515}
516static inline int dt_opencl_enqueue_barrier(const int devid)
517{
518 return -1;
519}
520static inline int dt_opencl_lock_device(const int dev)
521{
522 return -1;
523}
524static inline void dt_opencl_unlock_device(const int dev)
525{
526}
527static inline int dt_opencl_load_program(const int dev, const char *filename)
528{
529 return -1;
530}
531static inline int dt_opencl_build_program(const int dev, const int program)
532{
533 return -1;
534}
535static inline int dt_opencl_create_kernel(const int program, const char *name)
536{
537 return -1;
538}
539static inline void dt_opencl_free_kernel(const int kernel)
540{
541}
542static inline int dt_opencl_get_max_work_item_sizes(const int dev, size_t *sizes)
543{
544 return -1;
545}
546static inline int dt_opencl_get_work_group_limits(const int dev, size_t *sizes, size_t *workgroupsize,
547 unsigned long *localmemsize)
548{
549 return -1;
550}
551static inline int dt_opencl_get_kernel_work_group_size(const int dev, const int kernel,
552 size_t *kernelworkgroupsize)
553{
554 return -1;
555}
556static inline int dt_opencl_set_kernel_arg(const int dev, const int kernel, const size_t size, const void *arg)
557{
558 return -1;
559}
560static inline int dt_opencl_enqueue_kernel_2d(const int dev, const int kernel, const size_t *sizes)
561{
562 return -1;
563}
564static inline int dt_opencl_enqueue_kernel_2d_with_local(const int dev, const int kernel, const size_t *sizes,
565 const size_t *local)
566{
567 return -1;
568}
569static inline int dt_opencl_is_inited(void)
570{
571 return 0;
572}
573static inline int dt_opencl_is_enabled(void)
574{
575 return 0;
576}
577static inline void dt_opencl_disable(void)
578{
579}
580static inline int dt_opencl_update_settings(void)
581{
582 return 0;
583}
584static inline gboolean dt_opencl_image_fits_device(const int devid, const size_t width, const size_t height,
585 const unsigned bpp, const float factor, const size_t overhead)
586{
587 return FALSE;
588}
589static inline size_t dt_opencl_get_device_available(const int devid)
590{
591 return 0;
592}
593static inline void dt_opencl_check_tuning(const int devid)
594{
595 return;
596}
597static inline size_t dt_opencl_get_device_memalloc(const int devid)
598{
599 return 0;
600}
601static inline void dt_opencl_release_mem_object(void *mem)
602{
603}
604static inline void *dt_opencl_events_get_slot(const int devid, const char *tag)
605{
606 return NULL;
607}
608static inline void dt_opencl_events_reset(const int devid)
609{
610}
611static inline void dt_opencl_events_wait_for(const int devid)
612{
613}
614static inline int dt_opencl_events_flush(const int devid, const int reset)
615{
616 return 0;
617}
618static inline void dt_opencl_events_profiling(const int devid, const int aggregated)
619{
620}
621
622#ifdef __cplusplus
623}
624#endif
625
626#endif
627
628// clang-format off
629// modelines: These editor modelines have been set for all relevant files by tools/update_modelines.py
630// vim: shiftwidth=2 expandtab tabstop=2 cindent
631// kate: tab-indents: off; indent-width 2; replace-tabs on; indent-mode cstyle; remove-trailing-spaces modified;
632// clang-format on
#define FALSE
Definition ashift_lsd.c:147
int width
Definition bilateral.h:1
int height
Definition bilateral.h:1
static float kernel(const float *x, const float *y)
Definition colorchecker.c:435
char * name
Definition common/metadata.c:41
void dt_conf_set_bool(const char *name, int val)
Definition conf.c:125
void reset(dt_view_t *self)
Definition darkroom.c:545
void dt_print(dt_debug_thread_t thread, const char *msg,...)
Definition darktable.c:1395
@ DT_DEBUG_OPENCL
Definition darktable.h:478
static float gaussian(float x, float std)
Definition filmic.c:374
void guided_filter(const float *const guide, const float *const in, float *const out, const int width, const int height, const int ch, const int w, const float sqrt_eps, const float guide_weight, const float min, const float max)
Definition guided_filter.c:309
int bpp
Definition imageio/format/pdf.c:76
void local_laplacian(const float *const input, float *const out, const int wd, const int ht, const float sigma, const float shadows, const float highlights, const float clarity, local_laplacian_boundary_t *b)
Definition locallaplacian.h:63
size_t size
Definition mipmap_cache.c:3
dt_mipmap_buffer_dsc_flags flags
Definition mipmap_cache.c:4
static int dt_opencl_enqueue_kernel_2d(const int dev, const int kernel, const size_t *sizes)
Definition opencl.h:560
static int dt_opencl_is_enabled(void)
Definition opencl.h:573
static int dt_opencl_get_kernel_work_group_size(const int dev, const int kernel, size_t *kernelworkgroupsize)
Definition opencl.h:551
static size_t dt_opencl_get_device_available(const int devid)
Definition opencl.h:589
static int dt_opencl_set_kernel_arg(const int dev, const int kernel, const size_t size, const void *arg)
Definition opencl.h:556
static void dt_opencl_events_profiling(const int devid, const int aggregated)
Definition opencl.h:618
static size_t dt_opencl_get_device_memalloc(const int devid)
Definition opencl.h:597
static void * dt_opencl_events_get_slot(const int devid, const char *tag)
Definition opencl.h:604
static int dt_opencl_create_kernel(const int program, const char *name)
Definition opencl.h:535
static int dt_opencl_build_program(const int dev, const int program)
Definition opencl.h:531
static void dt_opencl_events_reset(const int devid)
Definition opencl.h:608
static void dt_opencl_unlock_device(const int dev)
Definition opencl.h:524
static int dt_opencl_update_settings(void)
Definition opencl.h:580
static void dt_opencl_check_tuning(const int devid)
Definition opencl.h:593
static int dt_opencl_is_inited(void)
Definition opencl.h:569
static int dt_opencl_lock_device(const int dev)
Definition opencl.h:520
static int dt_opencl_events_flush(const int devid, const int reset)
Definition opencl.h:614
static int dt_opencl_get_max_work_item_sizes(const int dev, size_t *sizes)
Definition opencl.h:542
static gboolean dt_opencl_image_fits_device(const int devid, const size_t width, const size_t height, const unsigned bpp, const float factor, const size_t overhead)
Definition opencl.h:584
static gboolean dt_opencl_finish(const int devid)
Definition opencl.h:512
#define DT_OPENCL_EVENTNAMELENGTH
Definition opencl.h:29
static void dt_opencl_free_kernel(const int kernel)
Definition opencl.h:539
static int dt_opencl_enqueue_barrier(const int devid)
Definition opencl.h:516
static int dt_opencl_get_work_group_limits(const int dev, size_t *sizes, size_t *workgroupsize, unsigned long *localmemsize)
Definition opencl.h:546
static void dt_opencl_release_mem_object(void *mem)
Definition opencl.h:601
#define DT_OPENCL_MAX_PROGRAMS
Definition opencl.h:26
static void dt_opencl_init(dt_opencl_t *cl, const gboolean exclude_opencl, const gboolean print_statistics)
Definition opencl.h:500
static void dt_opencl_disable(void)
Definition opencl.h:577
static void dt_opencl_events_wait_for(const int devid)
Definition opencl.h:611
static int dt_opencl_load_program(const int dev, const char *filename)
Definition opencl.h:527
static void dt_opencl_cleanup(dt_opencl_t *cl)
Definition opencl.h:509
static int dt_opencl_enqueue_kernel_2d_with_local(const int dev, const int kernel, const size_t *sizes, const size_t *local)
Definition opencl.h:564
#define DT_OPENCL_MAX_KERNELS
Definition opencl.h:27
const float factor
Definition pdf.h:85
Definition blend.h:223
Definition opencl.h:494
int error_count
Definition opencl.h:498
int stopped
Definition opencl.h:497
int enabled
Definition opencl.h:496
int inited
Definition opencl.h:495
Definition ansel-curve-tool.c:515