![]() |
Ansel 0.0
A darktable fork - bloat + design vision
|
#include "common/opencl.h"#include "common/startup_progress.h"#include "common/utility.h"#include "system/capabilities.h"#include "pixel/bilateralcl.h"#include "darktable.h"#include "common/dlopencl.h"#include "pixel/dwt.h"#include "common/file_location.h"#include "pixel/gaussian.h"#include "pixel/guided_filter.h"#include "pixel/heal.h"#include "pixel/interpolation.h"#include "pixel/locallaplaciancl.h"#include "system/nvidia_gpus.h"#include "system/opencl_drivers_blacklist.h"#include "common/conf.h"#include "develop/blend.h"#include "develop/pixelpipe.h"#include "caches/pixelpipe_cache.h"#include <assert.h>#include <locale.h>#include <stdio.h>#include <string.h>#include <strings.h>#include <ctype.h>#include <errno.h>#include <libgen.h>#include <sys/stat.h>#include <zlib.h>
Include dependency graph for opencl.c:Go to the source code of this file.
Data Structures | |
| struct | dt_opencl_t |
| struct | dt_opencl_mem_record_t |
Typedefs | |
| typedef struct dt_opencl_t | dt_opencl_t |
| typedef struct dt_opencl_mem_record_t | dt_opencl_mem_record_t |
Functions | |
| static void | dt_opencl_cleanup_device (dt_opencl_t *cl, int i) |
| static void | _opencl_splash_update_compile (const char *programname) |
| static const char * | dt_opencl_get_vendor_by_id (unsigned int id) |
| static char * | _ascii_str_canonical (const char *in, char *out, int maxlen) |
| static void | dt_opencl_priority_parse (dt_opencl_t *cl, char *configstr, int *priority_list, int *mandatory) |
| static void | dt_opencl_update_priorities () |
| static void | dt_opencl_apply_scheduling_profile () |
| static void | dt_opencl_set_synchronization_timeout (int value) |
| static int | dt_opencl_get_device_info (dt_opencl_t *cl, cl_device_id device, cl_device_info param_name, void **param_value, size_t *param_value_size) |
| int | dt_opencl_avoid_atomics (const int devid) |
| int | dt_opencl_micro_nap (const int devid) |
| gboolean | dt_opencl_use_pinned_memory (const int devid) |
| gboolean | dt_opencl_is_pinned_memory (cl_mem mem) |
| void | dt_opencl_write_device_config (const int devid) |
| static int | _dt_opencl_get_conf_int (const gchar *key_device, const gchar *conf_name, gboolean *safety_ok) |
| gboolean | dt_opencl_read_device_config (const int devid) |
| int | dt_opencl_get_detected_device_count (void) |
| const dt_opencl_detected_device_t * | dt_opencl_get_detected_device (const int detected) |
| gboolean | dt_opencl_detected_device_enabled (const int detected) |
| int | dt_opencl_set_detected_device_enabled (const int detected, const gboolean enabled) |
| gboolean | dt_opencl_detected_device_pinned_memory (const int detected) |
| int | dt_opencl_set_detected_device_pinned_memory (const int detected, const gboolean enabled) |
| size_t | dt_opencl_detected_device_headroom (const int detected) |
| int | dt_opencl_set_detected_device_headroom (const int detected, const size_t headroom) |
| static int | dt_opencl_device_init (dt_opencl_t *cl, const int dev, cl_device_id *devices, const int k) |
| void | dt_opencl_init (const gboolean exclude_opencl, const gboolean print_statistics) |
| void | dt_opencl_cleanup (void) |
| gboolean | dt_opencl_finish (const int devid) |
| int | dt_opencl_enqueue_barrier (const int devid) |
| static int | _take_from_list (int *list, int value) |
| static int | _device_by_cname (const char *name) |
| int | dt_opencl_reserve_device_for_pipe (const int pipetype) |
Reserve a device for a pipe run: choose a free one by the pipe's priority list and take its lock. Blocks or gives up per the opencl_mandatory_timeout conf key. | |
| void | dt_opencl_release_device (const int devid) |
| Release a device reserved by either reserve function. | |
| void | dt_opencl_reserve_device_by_id (const int devid) |
| Reserve a device the caller has already identified, blocking until it is free. | |
| int | dt_opencl_try_reserve_device_by_id (const int devid) |
| Reserve a device only if it is free right now. | |
| int | dt_opencl_get_num_devices (void) |
| Number of usable OpenCL devices; 0 when OpenCL is unavailable. | |
| const char * | dt_opencl_get_device_name (const int devid) |
| Human-readable device name, owned by the OpenCL module. | |
| gboolean | dt_opencl_get_device_max_image_size (const int devid, int *width, int *height) |
| Largest 2D image the device will accept, which is what bounds tile size. | |
| size_t | dt_opencl_get_device_max_global_mem (const int devid) |
| Total device memory in bytes, or 0 for an out-of-range id. | |
| int | dt_opencl_report_pipe_error (void) |
| Record that a pipe run failed on OpenCL, and decide whether to give up on it. | |
| static FILE * | fopen_stat (const char *filename, struct stat *st) |
| void | dt_opencl_md5sum (const char **files, char **md5sums) |
| int | dt_opencl_load_program (const int dev, const int prog, const char *filename, const char *binname, const char *cachedir, char *md5sum, char **includemd5, int *loaded_cached) |
| int | dt_opencl_build_program (const int dev, const int prog, const char *binname, const char *cachedir, char *md5sum, int loaded_cached) |
| int | dt_opencl_create_kernel (const int prog, const char *name) |
| void | dt_opencl_free_kernel (const int kernel) |
| int | dt_opencl_get_max_work_item_sizes (const int dev, size_t *sizes) |
| int | dt_opencl_get_work_group_limits (const int dev, size_t *sizes, size_t *workgroupsize, unsigned long *localmemsize) |
| int | dt_opencl_get_kernel_work_group_size (const int dev, const int kernel, size_t *kernelworkgroupsize) |
| int | dt_opencl_set_kernel_arg (const int dev, const int kernel, const int num, const size_t size, const void *arg) |
| int | dt_opencl_enqueue_kernel_2d (const int dev, const int kernel, const size_t *sizes) |
| int | dt_opencl_enqueue_kernel_2d_with_local (const int dev, const int kernel, const size_t *sizes, const size_t *local) |
| int | dt_opencl_copy_device_to_host (const int devid, void *host, void *device, const int width, const int height, const int bpp) |
| int | dt_opencl_read_host_from_device (const int devid, void *host, void *device, const int width, const int height, const int bpp) |
| int | dt_opencl_read_host_from_device_rowpitch (const int devid, void *host, void *device, const int width, const int height, const int rowpitch) |
| int | dt_opencl_read_host_from_device_non_blocking (const int devid, void *host, void *device, const int width, const int height, const int bpp) |
| int | dt_opencl_read_host_from_device_rowpitch_non_blocking (const int devid, void *host, void *device, const int width, const int height, const int rowpitch) |
| int | dt_opencl_read_host_from_device_raw (const int devid, void *host, void *device, const size_t *origin, const size_t *region, const int rowpitch, const int blocking) |
| int | dt_opencl_write_host_to_device (const int devid, void *host, void *device, const int width, const int height, const int bpp) |
| int | dt_opencl_write_host_to_device_rowpitch (const int devid, void *host, void *device, const int width, const int height, const int rowpitch) |
| int | dt_opencl_write_host_to_device_non_blocking (const int devid, void *host, void *device, const int width, const int height, const int bpp) |
| int | dt_opencl_write_host_to_device_rowpitch_non_blocking (const int devid, void *host, void *device, const int width, const int height, const int rowpitch) |
| int | dt_opencl_write_host_to_device_raw (const int devid, const void *host, void *device, const size_t *origin, const size_t *region, const int rowpitch, const int blocking) |
| int | dt_opencl_enqueue_copy_image (const int devid, cl_mem src, cl_mem dst, size_t *orig_src, size_t *orig_dst, size_t *region) |
| int | dt_opencl_enqueue_copy_image_to_buffer (const int devid, cl_mem src_image, cl_mem dst_buffer, size_t *origin, size_t *region, size_t offset) |
| int | dt_opencl_enqueue_copy_buffer_to_image (const int devid, cl_mem src_buffer, cl_mem dst_image, size_t offset, size_t *origin, size_t *region) |
| int | dt_opencl_enqueue_copy_buffer_to_buffer (const int devid, cl_mem src_buffer, cl_mem dst_buffer, size_t srcoffset, size_t dstoffset, size_t size) |
| int | dt_opencl_read_buffer_from_device (const int devid, void *host, void *device, const size_t offset, const size_t size, const int blocking) |
| int | dt_opencl_write_buffer_to_device (const int devid, void *host, void *device, const size_t offset, const size_t size, const int blocking) |
| void * | dt_opencl_copy_host_to_device_constant (const int devid, const size_t size, void *host) |
| void * | dt_opencl_copy_host_to_device (const int devid, void *host, const int width, const int height, const int bpp) |
| void * | dt_opencl_copy_host_to_device_rowpitch (const int devid, void *host, const int width, const int height, const int bpp, const int rowpitch) |
| void | dt_opencl_release_mem_object (cl_mem mem) |
| void * | dt_opencl_map_buffer (const int devid, cl_mem buffer, const int blocking, const int flags, size_t offset, size_t size) |
| void * | dt_opencl_map_image (const int devid, cl_mem buffer, const int blocking, const int flags, size_t width, size_t height, int bpp) |
| int | dt_opencl_unmap_mem_object (const int devid, cl_mem mem_object, void *mapped_ptr) |
| static void * | _dt_opencl_alloc_image2d (const int devid, const int width, const int height, const size_t bytes, const cl_mem_flags flags, const cl_image_format fmt, void *host, const char *const context) |
| void * | dt_opencl_alloc_device (const int devid, const int width, const int height, const int bpp) |
| void * | dt_opencl_alloc_device_use_host_pointer (const int devid, const int width, const int height, const int bpp, void *host, const int flags) |
| void * | dt_opencl_alloc_device_buffer_with_flags (const int devid, const size_t size, const int flags, void *host_ptr) |
| void * | dt_opencl_alloc_device_buffer (const int devid, const size_t size) |
| size_t | dt_opencl_get_mem_object_size (cl_mem mem) |
| int | dt_opencl_get_mem_context_id (cl_mem mem) |
| cl_mem_flags | dt_opencl_get_mem_flags (cl_mem mem) |
| int | dt_opencl_get_image_width (cl_mem mem) |
| int | dt_opencl_get_image_height (cl_mem mem) |
| int | dt_opencl_get_image_element_size (cl_mem mem) |
| void | dt_opencl_memory_statistics (int devid, cl_mem mem, size_t size, dt_opencl_memory_t action) |
| void | dt_opencl_check_tuning (const int devid) |
| cl_ulong | dt_opencl_get_device_available (const int devid) |
| static cl_ulong | _opencl_get_device_memalloc (const int devid) |
| cl_ulong | dt_opencl_get_device_memalloc (const int devid) |
| dt_opencl_fit_reason_t | dt_opencl_image_fits_device_reason (const int devid, const size_t width, const size_t height, const unsigned bpp, const float factor, const size_t overhead, size_t *needed, size_t *limit) |
| 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) |
| int | dt_opencl_dev_roundup_width (int size, const int devid) |
| int | dt_opencl_dev_roundup_height (int size, const int devid) |
| int | dt_opencl_is_inited (void) |
| int | dt_opencl_is_enabled (void) |
| void | dt_opencl_disable (void) |
| int | dt_opencl_update_settings (void) |
| cl_event * | dt_opencl_events_get_slot (const int devid, const char *tag) |
| void | dt_opencl_events_reset (const int devid) |
| void | dt_opencl_events_wait_for (const int devid) |
| cl_int | dt_opencl_events_flush (const int devid, const int reset) |
| void | dt_opencl_events_profiling (const int devid, const int aggregated) |
| static int | nextpow2 (int n) |
| int | dt_opencl_local_buffer_opt (const int devid, const int kernel, dt_opencl_local_buffer_t *factors) |
Variables | |
| static dt_opencl_t * | _opencl = NULL |
| typedef struct dt_opencl_mem_record_t dt_opencl_mem_record_t |
| typedef struct dt_opencl_t dt_opencl_t |
|
static |
Definition at line 1481 of file opencl.c.
References IS_NULL_PTR, n, and out.
Referenced by _device_by_cname(), and dt_opencl_device_init().
|
static |
Definition at line 1459 of file opencl.c.
References _ascii_str_canonical(), _opencl, dt_opencl_device_t::cname, dt_opencl_t::dev, i, name, and dt_opencl_t::num_devs.
Referenced by dt_opencl_priority_parse().
|
inlinestatic |
Definition at line 2585 of file opencl.c.
References _opencl, dt_opencl_device_t::context, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clCreateImage2D, DT_DEBUG_OPENCL, dt_dev_pixelpipe_cache_flush_clmem(), dt_opencl_memory_statistics(), dt_print(), flags, height, dt_opencl_t::inited, OPENCL_MEMORY_ADD, dt_dlopencl_t::symbols, and width.
Referenced by dt_opencl_alloc_device(), and dt_opencl_alloc_device_use_host_pointer().
|
static |
Definition at line 268 of file opencl.c.
References dt_conf_get_int(), dt_conf_key_not_empty(), DT_DEBUG_OPENCL, dt_free, dt_print(), FALSE, and key.
Referenced by dt_opencl_read_device_config().
|
static |
Definition at line 2860 of file opencl.c.
References _opencl, dt_opencl_t::dev, and dt_opencl_device_t::max_mem_alloc.
Referenced by dt_opencl_get_device_memalloc(), and dt_opencl_image_fits_device_reason().
|
inlinestatic |
Definition at line 132 of file opencl.c.
References dt_startup_progress_report(), and IS_NULL_PTR.
Referenced by dt_opencl_device_init().
|
static |
Definition at line 1442 of file opencl.c.
References value.
Referenced by dt_opencl_priority_parse().
| void * dt_opencl_alloc_device | ( | const int | devid, |
| const int | width, | ||
| const int | height, | ||
| const int | bpp | ||
| ) |
Definition at line 2616 of file opencl.c.
References _dt_opencl_alloc_image2d(), bpp, DT_OPENCL_BPP_DECODE, DT_OPENCL_BPP_IS_RGBA8, height, and width.
Referenced by _blend_layer_over_input_cl(), _cf_joint_stage_cl_selftest(), _cf_stage_cl(), _default_process_tiling_cl_ptp(), _default_process_tiling_cl_roi(), _downsample_guided_laplacian_postfilter_cl(), _drawlayer_acquire_layer_image(), _hf_stage_cl(), _hl_knee_estimate_cl(), _refine_with_detail_mask_cl(), _region_blur_cl_selftest(), _retouch_blur_cl(), box_max_cl(), box_min_cl(), color_smoothing_cl(), dt_bilateral_slice_to_output_cl(), dt_dev_pixelpipe_cache_alloc_cl_device_buffer(), dt_develop_blend_process_cl(), dt_ioppr_transform_image_colorspace_rgb_cl(), dt_local_laplacian_init_cl(), green_equilibration_cl(), guided_filter_cl_impl(), process_cl(), process_cl(), process_cl(), process_default_cl(), process_harmonic_cl(), process_laplacian_bayer_cl(), process_laplacian_passthrough_cl(), process_laplacian_xtrans_cl(), process_markesteijn_cl(), process_nlmeans_cl(), process_rcd_cl(), process_vng_cl(), process_wavelets_cl(), and reconstruct_highlights_cl().
| void * dt_opencl_alloc_device_buffer | ( | const int | devid, |
| const size_t | size | ||
| ) |
Definition at line 2692 of file opencl.c.
References dt_opencl_alloc_device_buffer_with_flags(), and size.
Referenced by _aniso_stage_cl_selftest(), _cf_harmonic_fill_cl_n(), _cf_harmonic_fill_cl_selftest(), _cf_joint_fit_cl(), _cf_joint_stage_cl(), _cf_joint_stage_cl_selftest(), _cf_pair_stage_cl(), _cf_stage_cl_selftest(), _chromaticity_gradient_stage_cl_selftest(), _harmonic_reconstruct_cl(), _hf_stage_cl(), _hf_stage_cl_selftest(), _hl_knee_estimate_cl(), _joint_core_stage_cl_selftest(), _knee_cl_selftest(), _refine_with_detail_mask_cl(), _region_guided_filter_cl_selftest(), _retouch_clone_cl(), _retouch_heal_cl(), _selfdome_stage_cl_selftest(), _sp_cl_upload(), _weights_cl(), dt_bilateral_init_cl(), dt_gaussian_init_cl(), dt_iop_colorreconstruct_bilateral_init_cl(), dwt_wavelet_decompose_cl(), green_equilibration_cl(), nlmeans_denoise_cl(), nlmeans_denoiseprofile_cl(), process_cl(), process_harmonic_cl(), process_laplacian_bayer_cl(), process_laplacian_passthrough_cl(), process_laplacian_xtrans_cl(), process_markesteijn_cl(), process_nlmeans_cl(), process_rcd_cl(), process_wavelets_cl(), and rt_build_scaled_mask_cl().
| void * dt_opencl_alloc_device_buffer_with_flags | ( | const int | devid, |
| const size_t | size, | ||
| const int | flags, | ||
| void * | host_ptr | ||
| ) |
Definition at line 2662 of file opencl.c.
References _opencl, dt_opencl_device_t::context, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clCreateBuffer, DT_DEBUG_OPENCL, dt_dev_pixelpipe_cache_flush_clmem(), dt_opencl_memory_statistics(), dt_print(), flags, dt_opencl_t::inited, OPENCL_MEMORY_ADD, size, and dt_dlopencl_t::symbols.
Referenced by dt_opencl_alloc_device_buffer().
| void * dt_opencl_alloc_device_use_host_pointer | ( | const int | devid, |
| const int | width, | ||
| const int | height, | ||
| const int | bpp, | ||
| void * | host, | ||
| const int | flags | ||
| ) |
Definition at line 2639 of file opencl.c.
References _dt_opencl_alloc_image2d(), bpp, DT_OPENCL_BPP_DECODE, DT_OPENCL_BPP_IS_RGBA8, flags, height, and width.
Referenced by _drawlayer_acquire_source_image(), dt_dev_pixelpipe_cache_get_cl_buffer(), and dt_dev_pixelpipe_cache_get_pinned_image().
|
static |
adjust opencl subsystem according to scheduling profile
Definition at line 2991 of file opencl.c.
References _opencl, dt_conf_get_int(), dt_opencl_set_synchronization_timeout(), dt_opencl_update_priorities(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), and dt_opencl_t::lock.
Referenced by dt_opencl_init().
| int dt_opencl_avoid_atomics | ( | const int | devid | ) |
Definition at line 210 of file opencl.c.
References _opencl, dt_opencl_device_t::avoid_atomics, dt_opencl_t::dev, and dt_opencl_t::inited.
Referenced by commit_params().
| int dt_opencl_build_program | ( | const int | dev, |
| const int | prog, | ||
| const char * | binname, | ||
| const char * | cachedir, | ||
| char * | md5sum, | ||
| int | loaded_cached | ||
| ) |
builds the given program.
defined(_WIN32)
Definition at line 2042 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_opencl_device_t::devid, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clBuildProgram, dt_dlopencl_symbols_t::dt_clGetProgramBuildInfo, dt_dlopencl_symbols_t::dt_clGetProgramInfo, DT_DEBUG_OPENCL, dt_free, DT_OPENCL_MAX_PROGRAMS, dt_print(), dt_vprint(), f, i, IS_NULL_PTR, dt_opencl_device_t::options, PATH_MAX, dt_opencl_device_t::program, and dt_dlopencl_t::symbols.
Referenced by dt_opencl_device_init().
| void dt_opencl_check_tuning | ( | const int | devid | ) |
check tuning settings and available memory for the device
Definition at line 2835 of file opencl.c.
References _opencl, dt_opencl_t::dev, DT_DEBUG_MEMORY, DT_DEBUG_OPENCL, dt_print(), dt_opencl_device_t::forced_headroom, dt_opencl_t::inited, MAX, dt_opencl_device_t::max_global_mem, dt_opencl_device_t::name, and dt_opencl_device_t::used_available.
Referenced by dt_dev_pixelpipe_process(), and dt_opencl_set_detected_device_headroom().
cleans up the opencl subsystem.
Definition at line 1351 of file opencl.c.
References _opencl, dt_opencl_detected_device_t::cname, dt_opencl_t::detected_devs, dt_opencl_t::dev, dt_opencl_t::dev_priority_export, dt_opencl_t::dev_priority_image, dt_opencl_t::dev_priority_preview, dt_opencl_t::dev_priority_thumbnail, dt_opencl_t::dlocl, dt_bilateral_free_cl_global(), dt_colorspaces_free_cl_global(), dt_develop_blend_free_cl_global(), dt_dwt_free_cl_global(), dt_free, dt_gaussian_free_cl_global(), dt_guided_filter_free_cl_global(), dt_heal_free_cl_global(), dt_interpolation_free_cl_global(), dt_local_laplacian_free_cl_global(), dt_opencl_cleanup_device(), dt_pthread_mutex_destroy(), i, dt_opencl_t::inited, IS_NULL_PTR, dt_dlopencl_t::library, dt_opencl_t::lock, dt_opencl_t::mem_sizes, dt_opencl_t::mem_sizes_lock, dt_opencl_detected_device_t::name, dt_opencl_t::num_detected_devs, dt_opencl_t::num_devs, and dt_dlopencl_t::symbols.
Referenced by dt_cleanup().
|
static |
Definition at line 1302 of file opencl.c.
References dt_opencl_device_t::cmd_queue, dt_opencl_device_t::cname, dt_opencl_device_t::context, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clReleaseCommandQueue, dt_dlopencl_symbols_t::dt_clReleaseContext, dt_dlopencl_symbols_t::dt_clReleaseKernel, dt_dlopencl_symbols_t::dt_clReleaseProgram, DT_DEBUG_MEMORY, DT_DEBUG_OPENCL, dt_free, dt_get_debug_flags(), dt_opencl_events_reset(), DT_OPENCL_MAX_KERNELS, DT_OPENCL_MAX_PROGRAMS, dt_print_nts(), dt_pthread_mutex_destroy(), dt_opencl_device_t::eventlist, dt_opencl_device_t::eventtags, i, IS_NULL_PTR, k, dt_opencl_device_t::kernel, dt_opencl_device_t::kernel_used, dt_opencl_device_t::lock, dt_opencl_device_t::maxeventslot, dt_opencl_device_t::name, dt_opencl_device_t::options, dt_opencl_device_t::options_md5, dt_opencl_device_t::peak_memory, dt_opencl_t::print_statistics, dt_opencl_device_t::program, dt_opencl_device_t::program_used, dt_dlopencl_t::symbols, dt_opencl_device_t::totalevents, dt_opencl_device_t::totallost, dt_opencl_device_t::totalsuccess, dt_opencl_device_t::use_events, and dt_opencl_device_t::vendor.
Referenced by dt_opencl_cleanup(), and dt_opencl_init().
| int dt_opencl_copy_device_to_host | ( | const int | devid, |
| void * | host, | ||
| void * | device, | ||
| const int | width, | ||
| const int | height, | ||
| const int | bpp | ||
| ) |
HAVE_OPENCL mode only: copy and alloc buffers.
Definition at line 2303 of file opencl.c.
References bpp, dt_opencl_read_host_from_device(), height, and width.
Referenced by _harmonic_cl_roundtrip(), _region_blur_cl_selftest(), dt_colorspaces_apply_profile_cl(), dt_develop_blend_process_cl(), dt_ioppr_transform_image_colorspace_rgb_cl(), process_cl(), and process_harmonic_cl().
| void * dt_opencl_copy_host_to_device | ( | const int | devid, |
| void * | host, | ||
| const int | width, | ||
| const int | height, | ||
| const int | bpp | ||
| ) |
Definition at line 2487 of file opencl.c.
References bpp, dt_opencl_copy_host_to_device_rowpitch(), height, and width.
Referenced by _drawlayer_acquire_source_image(), dt_colorspaces_apply_profile_cl(), dt_ioppr_build_iccprofile_params_cl(), dt_ioppr_transform_image_colorspace_rgb_cl(), and process_cl().
Definition at line 2472 of file opencl.c.
References _opencl, dt_opencl_device_t::context, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clCreateBuffer, DT_DEBUG_OPENCL, dt_opencl_memory_statistics(), dt_print(), dt_opencl_t::inited, OPENCL_MEMORY_ADD, size, and dt_dlopencl_t::symbols.
Referenced by _hl_cl_lch_xtrans(), _hl_cl_visualize(), _refine_with_detail_mask_cl(), _retouch_fill_cl(), _simulate_channel_cl(), apply_global_distortion_map_cl(), dt_colorspaces_apply_profile_cl(), dt_develop_blend_process_cl(), dt_interpolation_resample_cl(), dt_ioppr_build_iccprofile_params_cl(), dt_ioppr_transform_image_colorspace_rgb_cl(), dual_demosaic_cl(), process_cl(), process_cl(), process_harmonic_cl(), process_laplacian_bayer_cl(), process_laplacian_passthrough_cl(), process_laplacian_xtrans_cl(), process_markesteijn_cl(), process_vng_cl(), process_wavelets_cl(), rt_copy_image_masked_cl(), rt_copy_in_to_out_cl(), and rt_copy_mask_to_alpha_cl().
| void * dt_opencl_copy_host_to_device_rowpitch | ( | const int | devid, |
| void * | host, | ||
| const int | width, | ||
| const int | height, | ||
| const int | bpp, | ||
| const int | rowpitch | ||
| ) |
Definition at line 2493 of file opencl.c.
References _opencl, bpp, dt_opencl_device_t::context, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clCreateImage2D, DT_DEBUG_OPENCL, dt_opencl_memory_statistics(), dt_print(), height, dt_opencl_t::inited, OPENCL_MEMORY_ADD, dt_dlopencl_t::symbols, and width.
Referenced by dt_opencl_copy_host_to_device().
| int dt_opencl_create_kernel | ( | const int | program, |
| const char * | name | ||
| ) |
inits a kernel. returns the index or -1 if fail.
Definition at line 2170 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clCreateKernel, DT_DEBUG_OPENCL, DT_OPENCL_MAX_KERNELS, DT_OPENCL_MAX_PROGRAMS, dt_print(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_vprint(), error(), dt_opencl_t::inited, k, dt_opencl_device_t::kernel, dt_opencl_device_t::kernel_used, dt_opencl_t::lock, name, dt_opencl_t::num_devs, dt_opencl_device_t::program, and dt_dlopencl_t::symbols.
Referenced by dt_bilateral_init_cl_global(), dt_colorspaces_init_cl_global(), dt_develop_blend_init_cl_global(), dt_dwt_init_cl_global(), dt_gaussian_init_cl_global(), dt_guided_filter_init_cl_global(), dt_interpolation_init_cl_global(), dt_local_laplacian_init_cl_global(), dt_nn_cl_create(), init_global(), and init_global().
| gboolean dt_opencl_detected_device_enabled | ( | const int | detected | ) |
Return whether a detected GPU is enabled by its per-device OpenCL preference.
Definition at line 365 of file opencl.c.
References dt_opencl_detected_device_t::cname, dt_opencl_detected_device_t::config_id, dt_opencl_detected_device_t::disabled, DT_CLDEVICE_HEAD, dt_conf_get_int(), dt_conf_key_not_empty(), dt_opencl_get_detected_device(), FALSE, IS_NULL_PTR, and key.
Referenced by dt_gui_preferences_show(), and dt_opencl_set_detected_device_enabled().
| size_t dt_opencl_detected_device_headroom | ( | const int | detected | ) |
Return the per-device GPU vRAM headroom in MiB.
Definition at line 444 of file opencl.c.
References dt_opencl_detected_device_t::cname, dt_opencl_detected_device_t::config_id, DT_CLDEVICE_HEAD, dt_conf_get_int(), dt_conf_key_not_empty(), dt_opencl_get_detected_device(), dt_opencl_detected_device_t::forced_headroom, IS_NULL_PTR, and key.
Referenced by dt_gui_preferences_show().
| gboolean dt_opencl_detected_device_pinned_memory | ( | const int | detected | ) |
Return whether pinned memory transfer is enabled for a detected GPU.
Definition at line 410 of file opencl.c.
References dt_opencl_detected_device_t::cname, dt_opencl_detected_device_t::config_id, DT_CLDEVICE_HEAD, dt_conf_get_int(), dt_conf_key_not_empty(), dt_opencl_get_detected_device(), DT_OPENCL_PINNING_ON, FALSE, IS_NULL_PTR, key, and dt_opencl_detected_device_t::pinned_memory.
Referenced by dt_gui_preferences_show().
| int dt_opencl_dev_roundup_height | ( | int | size, |
| const int | devid | ||
| ) |
Definition at line 2933 of file opencl.c.
References _opencl, dt_opencl_device_t::clroundup_ht, dt_opencl_t::dev, and size.
| int dt_opencl_dev_roundup_width | ( | int | size, |
| const int | devid | ||
| ) |
round size to a multiple of the value given in the device specifig config parameter clroundup_wd/ht
Definition at line 2928 of file opencl.c.
References _opencl, dt_opencl_device_t::clroundup_wd, dt_opencl_t::dev, and size.
|
static |
Definition at line 482 of file opencl.c.
References _ascii_str_canonical(), _opencl_splash_update_compile(), dt_opencl_device_t::avoid_atomics, dt_opencl_device_t::clroundup_ht, dt_opencl_device_t::clroundup_wd, dt_opencl_device_t::cltype, dt_opencl_detected_device_t::cltype, dt_opencl_device_t::cmd_queue, dt_opencl_device_t::cname, dt_opencl_detected_device_t::cname, darktable_t::conf, dt_opencl_detected_device_t::config_id, dt_opencl_device_t::context, dt_opencl_t::crc, darktable, dt_opencl_t::detected_devs, dt_opencl_t::dev, dt_opencl_device_t::devid, dt_opencl_device_t::disabled, dt_opencl_detected_device_t::disabled, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clCreateCommandQueue, dt_dlopencl_symbols_t::dt_clCreateContext, DT_CLDEVICE_HEAD, dt_dlopencl_symbols_t::dt_clGetDeviceInfo, dt_dlopencl_symbols_t::dt_clGetPlatformInfo, dt_dlopencl_symbols_t::dt_clReleaseCommandQueue, dt_dlopencl_symbols_t::dt_clReleaseContext, dt_dlopencl_symbols_t::dt_clReleaseKernel, dt_dlopencl_symbols_t::dt_clReleaseProgram, dt_concat_path_file(), dt_conf_get_bool(), dt_conf_get_string_const(), dt_conf_key_exists(), dt_conf_save(), dt_conf_set_string(), DT_DEBUG_OPENCL, DT_DEBUG_PERF, dt_free, dt_get_debug_flags(), dt_get_wtime(), dt_loc_get_kerneldir(), dt_loc_get_user_cache_dir(), dt_nvidia_gpu_supports_sm_20(), dt_opencl_build_program(), DT_OPENCL_CBUFFSIZE, dt_opencl_check_driver_blacklist(), DT_OPENCL_DEFAULT_COMPILE, DT_OPENCL_DEFAULT_COMPILE_AMD, DT_OPENCL_DEFAULT_COMPILE_INTEL, DT_OPENCL_DEFAULT_COMPILE_NVIDIA, dt_opencl_get_device_info(), dt_opencl_get_vendor_by_id(), dt_opencl_load_program(), DT_OPENCL_MAX_INCLUDES, DT_OPENCL_MAX_KERNELS, DT_OPENCL_MAX_PROGRAMS, dt_opencl_md5sum(), DT_OPENCL_PINNING_ON, dt_opencl_read_device_config(), DT_OPENCL_VENDOR_AMD, DT_OPENCL_VENDOR_INTEL, DT_OPENCL_VENDOR_NVIDIA, dt_opencl_write_device_config(), dt_print(), dt_print_nts(), dt_pthread_mutex_destroy(), dt_pthread_mutex_init(), dt_util_str_replace(), dt_vprint(), dt_opencl_device_t::event_handles, dt_opencl_device_t::eventlist, dt_opencl_device_t::eventsconsolidated, dt_opencl_device_t::eventtags, f, FALSE, dt_opencl_device_t::forced_headroom, dt_opencl_detected_device_t::forced_headroom, dt_opencl_device_t::host_unified_memory, dt_opencl_detected_device_t::host_unified_memory, i, IS_NULL_PTR, k, dt_opencl_device_t::kernel, dt_opencl_device_t::kernel_used, dt_opencl_device_t::lock, dt_opencl_device_t::lostevents, dt_opencl_device_t::max_global_mem, dt_opencl_device_t::max_image_height, dt_opencl_device_t::max_image_width, dt_opencl_device_t::max_mem_alloc, dt_opencl_device_t::maxevents, dt_opencl_device_t::maxeventslot, dt_opencl_device_t::memory_in_use, dt_opencl_device_t::micro_nap, MIN, n, dt_opencl_device_t::name, dt_opencl_detected_device_t::name, dt_opencl_t::num_detected_devs, dt_opencl_device_t::numevents, dt_opencl_device_t::nvidia_sm_20, dt_opencl_device_t::options, dt_opencl_device_t::options_md5, PATH_MAX, dt_opencl_device_t::peak_memory, dt_opencl_device_t::pinned_memory, dt_opencl_detected_device_t::pinned_memory, dt_opencl_device_t::program, dt_opencl_device_t::program_used, dt_opencl_device_t::runtime_error, dt_opencl_device_t::summary, dt_dlopencl_t::symbols, dt_opencl_device_t::totalevents, dt_opencl_device_t::totallost, dt_opencl_device_t::totalsuccess, TRUE, type, dt_opencl_device_t::use_events, dt_opencl_device_t::used_available, dt_opencl_device_t::used_global_mem, and dt_opencl_device_t::vendor.
Referenced by dt_opencl_init().
disable opencl
Definition at line 2955 of file opencl.c.
References _opencl, dt_conf_set_bool(), dt_opencl_t::enabled, FALSE, and dt_opencl_t::inited.
| int dt_opencl_enqueue_barrier | ( | const int | devid | ) |
enqueues a synchronization point.
Definition at line 1435 of file opencl.c.
References _opencl, dt_opencl_device_t::cmd_queue, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clEnqueueBarrier, dt_opencl_t::inited, and dt_dlopencl_t::symbols.
| int dt_opencl_enqueue_copy_buffer_to_buffer | ( | const int | devid, |
| cl_mem | src_buffer, | ||
| cl_mem | dst_buffer, | ||
| size_t | srcoffset, | ||
| size_t | dstoffset, | ||
| size_t | size | ||
| ) |
Definition at line 2436 of file opencl.c.
References _opencl, dt_opencl_device_t::cmd_queue, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clEnqueueCopyBuffer, DT_DEBUG_OPENCL, dt_opencl_events_get_slot(), dt_print(), dt_opencl_t::inited, size, and dt_dlopencl_t::symbols.
Referenced by _simulate_channel_cl(), _unet_forward_cl(), dt_bilateral_blur_cl(), dt_iop_colorreconstruct_bilateral_blur_cl(), dwt_get_image_layer_cl(), process_cl(), and process_markesteijn_cl().
| int dt_opencl_enqueue_copy_buffer_to_image | ( | const int | devid, |
| cl_mem | src_buffer, | ||
| cl_mem | dst_image, | ||
| size_t | offset, | ||
| size_t * | origin, | ||
| size_t * | region | ||
| ) |
Definition at line 2424 of file opencl.c.
References _opencl, dt_opencl_device_t::cmd_queue, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clEnqueueCopyBufferToImage, DT_DEBUG_OPENCL, dt_opencl_events_get_slot(), dt_print(), dt_opencl_t::inited, and dt_dlopencl_t::symbols.
Referenced by dt_gaussian_blur_cl(), process_cl(), and process_harmonic_cl().
| int dt_opencl_enqueue_copy_image | ( | const int | devid, |
| cl_mem | src, | ||
| cl_mem | dst, | ||
| size_t * | orig_src, | ||
| size_t * | orig_dst, | ||
| size_t * | region | ||
| ) |
Definition at line 2401 of file opencl.c.
References _opencl, dt_opencl_device_t::cmd_queue, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clEnqueueCopyImage, DT_DEBUG_OPENCL, dt_opencl_events_get_slot(), dt_print(), dt_opencl_t::inited, and dt_dlopencl_t::symbols.
Referenced by _blend_layer_over_input_cl(), _drawlayer_copy_or_resample_layer_roi(), color_smoothing_cl(), dt_bilateral_slice_to_output_cl(), dt_develop_blend_process_cl(), dt_interpolation_resample_cl(), dt_ioppr_transform_image_colorspace_rgb_cl(), pixelpipe_process_on_GPU(), process_cl(), process_cl(), process_markesteijn_cl(), process_vng_cl(), process_wavelets_cl(), and reconstruct_highlights_cl().
| int dt_opencl_enqueue_copy_image_to_buffer | ( | const int | devid, |
| cl_mem | src_image, | ||
| cl_mem | dst_buffer, | ||
| size_t * | origin, | ||
| size_t * | region, | ||
| size_t | offset | ||
| ) |
Definition at line 2412 of file opencl.c.
References _opencl, dt_opencl_device_t::cmd_queue, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clEnqueueCopyImageToBuffer, DT_DEBUG_OPENCL, dt_opencl_events_get_slot(), dt_print(), dt_opencl_t::inited, and dt_dlopencl_t::symbols.
Referenced by dt_gaussian_blur_cl(), process_cl(), and process_harmonic_cl().
| int dt_opencl_enqueue_kernel_2d | ( | const int | dev, |
| const int | kernel, | ||
| const size_t * | sizes | ||
| ) |
launch kernel!
Definition at line 2276 of file opencl.c.
References dt_opencl_enqueue_kernel_2d_with_local(), and kernel().
Referenced by _cf_harmonic_fill_cl_n(), _cf_joint_fit_cl(), _cf_joint_stage_cl(), _cf_joint_stage_cl_selftest(), _cf_pair_stage_cl(), _cf_stage_cl(), _downsample_guided_laplacian_postfilter_cl(), _drawlayer_run_premult_over_kernel(), _harmonic_reconstruct_cl(), _hf_stage_cl(), _hl_cl_clip(), _hl_cl_lch_bayer(), _hl_cl_visualize(), _hl_knee_apply_cfa_cl(), _hl_knee_estimate_cl(), _refine_with_detail_mask_cl(), _retouch_blur_cl(), _retouch_fill_cl(), _simulate_channel_cl(), _sp_chol_factor_cl(), _upsample_cl(), apply_global_distortion_map_cl(), box_max_cl(), box_min_cl(), cl_box_mean(), cl_covariances(), cl_generate_result(), cl_solve(), cl_split_rgb(), cl_update_covariance(), cl_variances(), dehaze_cl(), dt_bilateral_blur_cl(), dt_bilateral_init_cl(), dt_bilateral_slice_cl(), dt_bilateral_slice_to_output_cl(), dt_colorspaces_apply_profile_cl(), dt_develop_blend_process_cl(), dt_gaussian_blur_cl(), dt_iop_colorreconstruct_bilateral_blur_cl(), dt_iop_colorreconstruct_bilateral_init_cl(), dt_iop_colorreconstruct_bilateral_slice_cl(), dt_ioppr_transform_image_colorspace_rgb_cl(), dt_local_laplacian_cl(), dual_demosaic_cl(), dwt_add_layer_cl(), dwt_subtract_layer_cl(), dwt_wavelet_decompose_cl(), green_equilibration_cl(), nlmeans_cl_accu(), nlmeans_cl_init(), nlmeans_denoise_cl(), nlmeans_denoiseprofile_cl(), process_cl(), process_cl(), process_cl(), process_default_cl(), process_harmonic_cl(), process_laplacian_bayer_cl(), process_laplacian_passthrough_cl(), process_laplacian_xtrans_cl(), process_markesteijn_cl(), process_nlmeans_cl(), process_rcd_cl(), process_vng_cl(), process_wavelets_cl(), reconstruct_highlights_cl(), rt_copy_image_masked_cl(), rt_copy_in_to_out_cl(), rt_copy_mask_to_alpha_cl(), transition_map_cl(), wavelets_process_cl(), and wavelets_process_cl().
| int dt_opencl_enqueue_kernel_2d_with_local | ( | const int | dev, |
| const int | kernel, | ||
| const size_t * | sizes, | ||
| const size_t * | local | ||
| ) |
launch kernel with defined local size!
Definition at line 2282 of file opencl.c.
References _opencl, dt_opencl_device_t::cmd_queue, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clEnqueueNDRangeKernel, dt_dlopencl_symbols_t::dt_clGetKernelInfo, DT_DEBUG_OPENCL, dt_get_debug_flags(), dt_opencl_events_get_slot(), DT_OPENCL_MAX_KERNELS, dt_print(), dt_opencl_t::inited, kernel(), dt_opencl_device_t::kernel, and dt_dlopencl_t::symbols.
Referenced by _cf_harmonic_fill_cl_n(), _conv_cl(), _downsample_guided_laplacian_postfilter_cl(), _hl_cl_lch_xtrans(), _sp_chol_factor_cl(), _sp_chol_solve_cl(), color_smoothing_cl(), dt_bilateral_splat_cl(), dt_gaussian_blur_cl(), dt_interpolation_resample_cl(), dt_iop_colorreconstruct_bilateral_splat_cl(), dt_opencl_enqueue_kernel_2d(), green_equilibration_cl(), nlmeans_cl_horiz(), nlmeans_denoise_cl(), nlmeans_denoiseprofile_cl(), process_cl(), process_default_cl(), process_laplacian_bayer_cl(), process_laplacian_passthrough_cl(), process_laplacian_xtrans_cl(), process_markesteijn_cl(), process_nlmeans_cl(), process_rcd_cl(), process_vng_cl(), process_wavelets_cl(), reconstruct_highlights_cl(), wavelets_process_cl(), and wavelets_process_cl().
| cl_int dt_opencl_events_flush | ( | const int | devid, |
| const int | reset | ||
| ) |
Wait for events in eventlist to terminate, check for return status and profiling info of events. If "reset" is TRUE report summary info (would be CL_COMPLETE or last error code) and print profiling info if needed. If "reset" is FALSE just store info (success value, profiling) from terminated events and release events for re-use by OpenCL driver.
Definition at line 3196 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clGetEventInfo, dt_dlopencl_symbols_t::dt_clGetEventProfilingInfo, dt_dlopencl_symbols_t::dt_clReleaseEvent, DT_DEBUG_OPENCL, DT_DEBUG_PERF, dt_get_debug_flags(), dt_opencl_events_profiling(), dt_opencl_events_reset(), dt_opencl_events_wait_for(), dt_print(), dt_opencl_device_t::eventlist, dt_opencl_device_t::eventsconsolidated, dt_opencl_device_t::eventtags, FALSE, dt_opencl_t::inited, IS_NULL_PTR, k, dt_opencl_device_t::lostevents, dt_opencl_device_t::numevents, reset(), dt_opencl_device_t::summary, dt_dlopencl_t::symbols, dt_opencl_device_t::totalsuccess, and dt_opencl_device_t::use_events.
Referenced by dt_dev_pixelpipe_process(), dt_opencl_events_get_slot(), and dt_opencl_finish().
| cl_event * dt_opencl_events_get_slot | ( | const int | devid, |
| const char * | tag | ||
| ) |
the following eventlist functions assume that affected structures are locked upstream get next free slot in eventlist (and manage size of eventlist)
Definition at line 3003 of file opencl.c.
References _opencl, dt_opencl_t::dev, DT_DEBUG_OPENCL, dt_free, DT_OPENCL_EVENTLISTSIZE, DT_OPENCL_EVENTNAMELENGTH, dt_opencl_events_flush(), dt_print(), dt_opencl_device_t::event_handles, dt_opencl_device_t::eventlist, dt_opencl_device_t::eventsconsolidated, dt_opencl_device_t::eventtags, dt_opencl_t::inited, IS_NULL_PTR, dt_opencl_device_t::lostevents, MAX, dt_opencl_device_t::maxevents, dt_opencl_device_t::maxeventslot, dt_opencl_device_t::numevents, dt_opencl_device_t::totalevents, dt_opencl_device_t::totallost, dt_opencl_device_t::use_events, and void().
Referenced by dt_opencl_enqueue_copy_buffer_to_buffer(), dt_opencl_enqueue_copy_buffer_to_image(), dt_opencl_enqueue_copy_image(), dt_opencl_enqueue_copy_image_to_buffer(), dt_opencl_enqueue_kernel_2d_with_local(), dt_opencl_map_buffer(), dt_opencl_map_image(), dt_opencl_read_buffer_from_device(), dt_opencl_read_host_from_device_raw(), dt_opencl_unmap_mem_object(), dt_opencl_write_buffer_to_device(), and dt_opencl_write_host_to_device_raw().
| void dt_opencl_events_profiling | ( | const int | devid, |
| const int | aggregated | ||
| ) |
display OpenCL profiling information. If "aggregated" is TRUE, try to generate summarized info for each kernel
Definition at line 3299 of file opencl.c.
References _opencl, dt_opencl_t::dev, DT_DEBUG_OPENCL, dt_free, DT_OPENCL_EVENTNAMELENGTH, dt_print(), dt_opencl_device_t::eventlist, dt_opencl_device_t::eventsconsolidated, dt_opencl_device_t::eventtags, i, dt_opencl_t::inited, IS_NULL_PTR, items, k, dt_opencl_device_t::lostevents, dt_opencl_device_t::name, dt_opencl_device_t::numevents, and dt_opencl_device_t::use_events.
Referenced by dt_opencl_events_flush().
| void dt_opencl_events_reset | ( | const int | devid | ) |
reset eventlist to empty state
Definition at line 3101 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clReleaseEvent, dt_opencl_device_t::eventlist, dt_opencl_device_t::eventsconsolidated, dt_opencl_device_t::eventtags, dt_opencl_t::inited, IS_NULL_PTR, k, dt_opencl_device_t::lostevents, dt_opencl_device_t::maxevents, dt_opencl_device_t::numevents, dt_opencl_device_t::summary, dt_dlopencl_t::symbols, and dt_opencl_device_t::use_events.
Referenced by dt_dev_pixelpipe_process(), dt_opencl_cleanup_device(), and dt_opencl_events_flush().
| void dt_opencl_events_wait_for | ( | const int | devid | ) |
Wait for events in eventlist to terminate -> this is a blocking synchronization point! Does not flush eventlist. Side effect: might adjust numevents.
Definition at line 3139 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clWaitForEvents, DT_DEBUG_OPENCL, dt_vprint(), dt_opencl_device_t::eventlist, dt_opencl_device_t::eventsconsolidated, dt_opencl_t::inited, IS_NULL_PTR, k, dt_opencl_device_t::lostevents, dt_opencl_device_t::numevents, dt_dlopencl_t::symbols, dt_opencl_device_t::totallost, and dt_opencl_device_t::use_events.
Referenced by dt_dev_pixelpipe_cache_flush_clmem(), dt_dev_pixelpipe_cache_flush_host_pinned_image(), dt_dev_pixelpipe_cache_prepare_cl_input(), and dt_opencl_events_flush().
| gboolean dt_opencl_finish | ( | const int | devid | ) |
cleans up the i-th device in the cl->dev list both finish functions return TRUE in case of success cleans up command queue.
Definition at line 1421 of file opencl.c.
References _opencl, dt_opencl_device_t::cmd_queue, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clFinish, dt_opencl_events_flush(), FALSE, dt_opencl_t::inited, and dt_dlopencl_t::symbols.
Referenced by _blend_layer_over_input_cl(), _default_process_tiling_cl_ptp(), _default_process_tiling_cl_roi(), _free_cache_entry(), _harmonic_reconstruct_cl(), _sp_chol_factor_cl(), dt_cleanup(), pixelpipe_process_on_GPU(), and process_harmonic_cl().
| void dt_opencl_free_kernel | ( | const int | kernel | ) |
releases kernel resources again.
Definition at line 2213 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clReleaseKernel, DT_OPENCL_MAX_KERNELS, dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_opencl_t::inited, kernel(), dt_opencl_device_t::kernel, dt_opencl_device_t::kernel_used, dt_opencl_t::lock, dt_opencl_t::num_devs, and dt_dlopencl_t::symbols.
Referenced by cleanup_global(), cleanup_global(), dt_bilateral_free_cl_global(), dt_colorspaces_free_cl_global(), dt_develop_blend_free_cl_global(), dt_dwt_free_cl_global(), dt_gaussian_free_cl_global(), dt_guided_filter_free_cl_global(), dt_interpolation_free_cl_global(), dt_local_laplacian_free_cl_global(), and dt_nn_cl_destroy().
| const dt_opencl_detected_device_t * dt_opencl_get_detected_device | ( | const int | detected | ) |
Return metadata for a detected GPU, or NULL when the detected-device index is invalid.
Definition at line 357 of file opencl.c.
References _opencl, dt_opencl_t::detected_devs, IS_NULL_PTR, and dt_opencl_t::num_detected_devs.
Referenced by dt_gui_preferences_show(), dt_opencl_detected_device_enabled(), dt_opencl_detected_device_headroom(), dt_opencl_detected_device_pinned_memory(), dt_opencl_set_detected_device_enabled(), dt_opencl_set_detected_device_headroom(), and dt_opencl_set_detected_device_pinned_memory().
| int dt_opencl_get_detected_device_count | ( | void | ) |
Number of GPU devices detected during OpenCL probing, including devices disabled by user preference.
Definition at line 349 of file opencl.c.
References _opencl, IS_NULL_PTR, and dt_opencl_t::num_detected_devs.
Referenced by dt_gui_preferences_show().
| cl_ulong dt_opencl_get_device_available | ( | const int | devid | ) |
get available memory for the device
Definition at line 2852 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_opencl_t::inited, dt_opencl_device_t::memory_in_use, and dt_opencl_device_t::used_available.
Referenced by _default_process_tiling_cl_ptp(), _default_process_tiling_cl_roi(), dt_opencl_image_fits_device_reason(), and pixelpipe_process_on_GPU().
|
static |
Definition at line 153 of file opencl.c.
References dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clGetDeviceInfo, DT_DEBUG_OPENCL, dt_free, dt_print(), error(), IS_NULL_PTR, and dt_dlopencl_t::symbols.
Referenced by dt_opencl_device_init().
| size_t dt_opencl_get_device_max_global_mem | ( | const int | devid | ) |
Total device memory in bytes, or 0 for an out-of-range id.
Definition at line 1774 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_opencl_t::inited, IS_NULL_PTR, dt_opencl_device_t::max_global_mem, and dt_opencl_t::num_devs.
Referenced by dt_dev_pixelpipe_cache_get_vram_total().
| gboolean dt_opencl_get_device_max_image_size | ( | const int | devid, |
| int * | width, | ||
| int * | height | ||
| ) |
Largest 2D image the device will accept, which is what bounds tile size.
| devid | device id. |
| width | receives the maximum width. Not written for an out-of-range id. |
| height | receives the maximum height. Same. |
Definition at line 1764 of file opencl.c.
References _opencl, dt_opencl_t::dev, FALSE, height, dt_opencl_t::inited, IS_NULL_PTR, dt_opencl_device_t::max_image_height, dt_opencl_device_t::max_image_width, dt_opencl_t::num_devs, TRUE, and width.
Referenced by _default_process_tiling_cl_ptp(), and _default_process_tiling_cl_roi().
| cl_ulong dt_opencl_get_device_memalloc | ( | const int | devid | ) |
get size of allocatable single buffer
Definition at line 2865 of file opencl.c.
References _opencl, _opencl_get_device_memalloc(), and dt_opencl_t::inited.
Referenced by _default_process_tiling_cl_ptp(), and _default_process_tiling_cl_roi().
| const char * dt_opencl_get_device_name | ( | const int | devid | ) |
Human-readable device name, owned by the OpenCL module.
| devid | device id. |
Definition at line 1756 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_opencl_t::inited, IS_NULL_PTR, dt_opencl_device_t::name, and dt_opencl_t::num_devs.
| int dt_opencl_get_image_element_size | ( | cl_mem | mem | ) |
Definition at line 2757 of file opencl.c.
References _opencl, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clGetImageInfo, IS_NULL_PTR, size, and dt_dlopencl_t::symbols.
Referenced by _cache_entry_materialize_host_data_locked(), _pixel_cache_clmem_get(), ambient_light_cl(), and dt_dev_pixelpipe_cache_borrow_cl_payload().
| int dt_opencl_get_image_height | ( | cl_mem | mem | ) |
Definition at line 2746 of file opencl.c.
References _opencl, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clGetImageInfo, IS_NULL_PTR, size, and dt_dlopencl_t::symbols.
Referenced by _cache_entry_materialize_host_data_locked(), _pixel_cache_clmem_get(), ambient_light_cl(), box_max_cl(), box_min_cl(), dehaze_cl(), dt_dev_pixelpipe_cache_borrow_cl_payload(), and transition_map_cl().
| int dt_opencl_get_image_width | ( | cl_mem | mem | ) |
Definition at line 2735 of file opencl.c.
References _opencl, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clGetImageInfo, IS_NULL_PTR, size, and dt_dlopencl_t::symbols.
Referenced by _cache_entry_materialize_host_data_locked(), _pixel_cache_clmem_get(), ambient_light_cl(), box_max_cl(), box_min_cl(), dehaze_cl(), dt_dev_pixelpipe_cache_borrow_cl_payload(), and transition_map_cl().
| int dt_opencl_get_kernel_work_group_size | ( | const int | dev, |
| const int | kernel, | ||
| size_t * | kernelworkgroupsize | ||
| ) |
return max workgroup size for a specific kernel
Definition at line 2255 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_opencl_device_t::devid, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clGetKernelWorkGroupInfo, DT_OPENCL_MAX_KERNELS, dt_opencl_t::inited, kernel(), dt_opencl_device_t::kernel, and dt_dlopencl_t::symbols.
Referenced by dt_opencl_local_buffer_opt().
| int dt_opencl_get_max_work_item_sizes | ( | const int | dev, |
| size_t * | sizes | ||
| ) |
return max size in sizes[3].
Definition at line 2227 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_opencl_device_t::devid, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clGetDeviceInfo, dt_opencl_t::inited, and dt_dlopencl_t::symbols.
Referenced by dt_opencl_get_work_group_limits().
| int dt_opencl_get_mem_context_id | ( | cl_mem | mem | ) |
Definition at line 2708 of file opencl.c.
References _opencl, dt_opencl_device_t::context, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clGetMemObjectInfo, IS_NULL_PTR, dt_opencl_t::num_devs, and dt_dlopencl_t::symbols.
Referenced by _cache_entry_clmem_flush_device(), _cache_entry_clmem_flush_host_pinned_locked(), _cache_entry_clmem_has_host_pinned_locked(), _cache_entry_materialize_host_data_locked(), _cache_try_restore_device_payload(), _free_cache_entry(), _pixel_cache_clmem_get(), _pixel_cache_clmem_put(), and dt_dev_pixelpipe_cache_borrow_cl_payload().
| cl_mem_flags dt_opencl_get_mem_flags | ( | cl_mem | mem | ) |
Definition at line 2726 of file opencl.c.
References _opencl, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clGetMemObjectInfo, flags, dt_opencl_t::inited, IS_NULL_PTR, and dt_dlopencl_t::symbols.
Referenced by dt_opencl_is_pinned_memory().
| size_t dt_opencl_get_mem_object_size | ( | cl_mem | mem | ) |
Definition at line 2698 of file opencl.c.
References _opencl, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clGetMemObjectInfo, IS_NULL_PTR, size, and dt_dlopencl_t::symbols.
Referenced by dt_dev_pixelpipe_cache_get_entries_stats().
| int dt_opencl_get_num_devices | ( | void | ) |
Number of usable OpenCL devices; 0 when OpenCL is unavailable.
Definition at line 1749 of file opencl.c.
References _opencl, dt_opencl_t::inited, and dt_opencl_t::num_devs.
Referenced by dt_cleanup(), and dt_dev_pixelpipe_cache_get_vram_total().
|
static |
Definition at line 1399 of file opencl.c.
References DT_OPENCL_VENDOR_AMD, DT_OPENCL_VENDOR_INTEL, and DT_OPENCL_VENDOR_NVIDIA.
Referenced by dt_opencl_device_init().
| int dt_opencl_get_work_group_limits | ( | const int | dev, |
| size_t * | sizes, | ||
| size_t * | workgroupsize, | ||
| unsigned long * | localmemsize | ||
| ) |
return max size per dimension in sizes[3] and max total size in workgroupsize
Definition at line 2235 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_opencl_device_t::devid, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clGetDeviceInfo, dt_opencl_get_max_work_item_sizes(), dt_opencl_t::inited, and dt_dlopencl_t::symbols.
Referenced by dt_opencl_local_buffer_opt().
| 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 | ||
| ) |
check if image size fit into limits given by OpenCL runtime
Definition at line 2920 of file opencl.c.
References bpp, DT_OPENCL_FIT_OK, dt_opencl_image_fits_device_reason(), factor, height, and width.
Referenced by guided_filter_cl().
| dt_opencl_fit_reason_t dt_opencl_image_fits_device_reason | ( | const int | devid, |
| const size_t | width, | ||
| const size_t | height, | ||
| const unsigned | bpp, | ||
| const float | factor, | ||
| const size_t | overhead, | ||
| size_t * | needed, | ||
| size_t * | limit | ||
| ) |
Like dt_opencl_image_fits_device() but also reports why the image (didn't) fit. needed and limit are filled with the two byte quantities that were actually compared for the returned reason (both 0 for DIMENSION/UNINITED), so a caller can log a message consistent with the real check instead of guessing a limit. Either out-param may be NULL.
Definition at line 2871 of file opencl.c.
References _opencl, _opencl_get_device_memalloc(), bpp, dt_opencl_t::dev, DT_DEBUG_OPENCL, DT_OPENCL_FIT_ALLOC_LIMIT, DT_OPENCL_FIT_AVAILABLE, DT_OPENCL_FIT_DIMENSION, DT_OPENCL_FIT_OK, DT_OPENCL_FIT_UNINITED, dt_opencl_get_device_available(), dt_print(), factor, height, dt_opencl_t::inited, dt_opencl_device_t::max_image_height, dt_opencl_device_t::max_image_width, n, and width.
Referenced by dt_opencl_image_fits_device(), and pixelpipe_process_on_GPU().
| void dt_opencl_init | ( | const gboolean | exclude_opencl, |
| const gboolean | print_statistics | ||
| ) |
internally calls dt_clGetDeviceInfo, and takes care of memory allocation afterwards, *param_value will point to memory block of size at least *param_value which needs to be g_free()'d manually inits the opencl subsystem.
Definition at line 1058 of file opencl.c.
References _opencl, dt_opencl_t::crc, dt_opencl_t::detected_devs, dt_opencl_t::dev, dt_opencl_t::dev_priority_export, dt_opencl_t::dev_priority_image, dt_opencl_t::dev_priority_preview, dt_opencl_t::dev_priority_thumbnail, dt_opencl_t::dlocl, dt_bilateral_init_cl_global(), dt_capabilities_add(), dt_dlopencl_symbols_t::dt_clGetDeviceIDs, dt_dlopencl_symbols_t::dt_clGetPlatformIDs, dt_dlopencl_symbols_t::dt_clGetPlatformInfo, dt_colorspaces_init_cl_global(), dt_conf_get_bool(), dt_conf_get_int(), dt_conf_get_string_const(), DT_DEBUG_OPENCL, dt_develop_blend_init_cl_global(), dt_dlopencl_init(), dt_dwt_init_cl_global(), dt_free, dt_gaussian_init_cl_global(), dt_guided_filter_init_cl_global(), dt_heal_init_cl_global(), dt_interpolation_init_cl_global(), dt_local_laplacian_init_cl_global(), dt_opencl_apply_scheduling_profile(), DT_OPENCL_CBUFFSIZE, dt_opencl_cleanup_device(), dt_opencl_device_init(), DT_OPENCL_MAX_PLATFORMS, dt_print_nts(), dt_pthread_mutex_init(), dt_opencl_t::enabled, dt_opencl_t::error_count, i, dt_opencl_t::inited, IS_NULL_PTR, k, dt_dlopencl_t::library, dt_opencl_t::lock, dt_opencl_t::mandatory, dt_opencl_t::mem_sizes, dt_opencl_t::mem_sizes_lock, n, dt_opencl_device_t::name, dt_opencl_t::num_detected_devs, dt_opencl_t::num_devs, dt_opencl_t::print_statistics, dt_opencl_t::stopped, and dt_dlopencl_t::symbols.
Referenced by dt_init().
| int dt_opencl_is_enabled | ( | void | ) |
check if opencl is enabled
Definition at line 2947 of file opencl.c.
References _opencl, dt_opencl_t::enabled, FALSE, and dt_opencl_t::inited.
Referenced by _default_size(), _get_base_value(), _rebuild_memory(), and dt_dev_pixelpipe_cache_get_vram_total().
| int dt_opencl_is_inited | ( | void | ) |
check if opencl is inited
Definition at line 2940 of file opencl.c.
References _opencl, and dt_opencl_t::inited.
Referenced by _free_cache_entry(), _is_opencl_supported(), _seal_opencl_cache_policy(), dt_cleanup(), dt_dev_pixelpipe_cache_flush_clmem_for_pipe(), and dt_iop_load_module_so().
| gboolean dt_opencl_is_pinned_memory | ( | cl_mem | mem | ) |
Definition at line 229 of file opencl.c.
References dt_opencl_get_mem_flags(), and flags.
Referenced by _cache_entry_materialize_host_data_locked(), _drawlayer_sync_host_image_to_device(), dt_dev_pixelpipe_cache_get_pinned_image(), dt_dev_pixelpipe_cache_prepare_cl_input(), and dt_dev_pixelpipe_cache_sync_cl_buffer().
| int dt_opencl_load_program | ( | const int | dev, |
| const int | prog, | ||
| const char * | filename, | ||
| const char * | binname, | ||
| const char * | cachedir, | ||
| char * | md5sum, | ||
| char ** | includemd5, | ||
| int * | loaded_cached | ||
| ) |
loads the given .cl file and returns a reference to an internal program.
defined(_WIN32)
Definition at line 1868 of file opencl.c.
References _opencl, dt_opencl_device_t::context, dt_opencl_t::dev, dt_opencl_device_t::devid, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clCreateProgramWithBinary, dt_dlopencl_symbols_t::dt_clCreateProgramWithSource, dt_dlopencl_symbols_t::dt_clGetDeviceInfo, dt_dlopencl_symbols_t::dt_clGetPlatformInfo, dt_concat_path_file(), DT_DEBUG_OPENCL, dt_free, DT_OPENCL_MAX_INCLUDES, DT_OPENCL_MAX_PROGRAMS, dt_print(), dt_vprint(), f, fopen_stat(), IS_NULL_PTR, n, dt_opencl_device_t::options, dt_opencl_device_t::options_md5, PATH_MAX, dt_opencl_device_t::program, dt_opencl_device_t::program_used, and dt_dlopencl_t::symbols.
Referenced by dt_opencl_device_init().
| int dt_opencl_local_buffer_opt | ( | const int | devid, |
| const int | kernel, | ||
| dt_opencl_local_buffer_t * | factors | ||
| ) |
utility function to calculate optimal work group dimensions for a given kernel
Definition at line 3398 of file opencl.c.
References _opencl, dt_opencl_local_buffer_t::cellsize, DT_DEBUG_OPENCL, dt_opencl_get_kernel_work_group_size(), dt_opencl_get_work_group_limits(), dt_print(), FALSE, dt_opencl_t::inited, kernel(), nextpow2(), dt_opencl_local_buffer_t::overhead, dt_opencl_local_buffer_t::sizex, dt_opencl_local_buffer_t::sizey, TRUE, dt_opencl_local_buffer_t::xfactor, dt_opencl_local_buffer_t::xoffset, dt_opencl_local_buffer_t::yfactor, and dt_opencl_local_buffer_t::yoffset.
Referenced by _downsample_guided_laplacian_postfilter_cl(), _hl_cl_lch_xtrans(), color_smoothing_cl(), dt_bilateral_init_cl(), dt_gaussian_init_cl(), dt_interpolation_resample_cl(), dt_iop_colorreconstruct_bilateral_init_cl(), get_blocksizes(), green_equilibration_cl(), process_cl(), process_default_cl(), process_laplacian_bayer_cl(), process_laplacian_passthrough_cl(), process_laplacian_xtrans_cl(), process_markesteijn_cl(), process_nlmeans_cl(), process_rcd_cl(), process_vng_cl(), process_wavelets_cl(), reconstruct_highlights_cl(), wavelets_process_cl(), and wavelets_process_cl().
| void * dt_opencl_map_buffer | ( | const int | devid, |
| cl_mem | buffer, | ||
| const int | blocking, | ||
| const int | flags, | ||
| size_t | offset, | ||
| size_t | size | ||
| ) |
Definition at line 2540 of file opencl.c.
References _opencl, dt_opencl_device_t::cmd_queue, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clEnqueueMapBuffer, DT_DEBUG_OPENCL, dt_opencl_events_get_slot(), dt_print(), flags, dt_opencl_t::inited, size, and dt_dlopencl_t::symbols.
| void * dt_opencl_map_image | ( | const int | devid, |
| cl_mem | buffer, | ||
| const int | blocking, | ||
| const int | flags, | ||
| size_t | width, | ||
| size_t | height, | ||
| int | bpp | ||
| ) |
Definition at line 2554 of file opencl.c.
References _opencl, dt_opencl_device_t::cmd_queue, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clEnqueueMapImage, DT_DEBUG_OPENCL, dt_opencl_events_get_slot(), dt_print(), flags, height, dt_opencl_t::inited, dt_dlopencl_t::symbols, and width.
Referenced by _cache_entry_materialize_host_data_locked(), _drawlayer_sync_host_image_to_device(), dt_dev_pixelpipe_cache_get_pinned_image(), and dt_dev_pixelpipe_cache_sync_cl_buffer().
| void dt_opencl_md5sum | ( | const char ** | files, |
| char ** | md5sums | ||
| ) |
calculates md5sums for a list of CL include files.
Definition at line 1814 of file opencl.c.
References dt_concat_path_file(), DT_DEBUG_OPENCL, dt_free, dt_loc_get_kerneldir(), DT_OPENCL_MAX_INCLUDES, dt_print(), f, fopen_stat(), IS_NULL_PTR, n, and PATH_MAX.
Referenced by dt_opencl_device_init().
| void dt_opencl_memory_statistics | ( | int | devid, |
| cl_mem | mem, | ||
| size_t | size, | ||
| dt_opencl_memory_t | action | ||
| ) |
Definition at line 2775 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_opencl_mem_record_t::devid, DT_DEBUG_MEMORY, DT_DEBUG_OPENCL, dt_get_debug_flags(), dt_print(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), IS_NULL_PTR, MAX, dt_opencl_t::mem_sizes, dt_opencl_t::mem_sizes_lock, dt_opencl_device_t::memory_in_use, OPENCL_MEMORY_ADD, dt_opencl_device_t::peak_memory, size, and dt_opencl_mem_record_t::size.
Referenced by _dt_opencl_alloc_image2d(), dt_opencl_alloc_device_buffer_with_flags(), dt_opencl_copy_host_to_device_constant(), dt_opencl_copy_host_to_device_rowpitch(), and dt_opencl_release_mem_object().
| int dt_opencl_micro_nap | ( | const int | devid | ) |
Definition at line 216 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_opencl_t::inited, and dt_opencl_device_t::micro_nap.
Referenced by nlmeans_denoise_cl().
|
static |
parse a single token of priority string and store priorities in priority_list
Definition at line 1507 of file opencl.c.
References _device_by_cname(), _take_from_list(), dt_free, i, IS_NULL_PTR, and dt_opencl_t::num_devs.
Referenced by dt_opencl_update_priorities().
| int dt_opencl_read_buffer_from_device | ( | const int | devid, |
| void * | host, | ||
| void * | device, | ||
| const size_t | offset, | ||
| const size_t | size, | ||
| const int | blocking | ||
| ) |
Definition at line 2449 of file opencl.c.
References _opencl, dt_opencl_device_t::cmd_queue, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clEnqueueReadBuffer, dt_opencl_events_get_slot(), dt_opencl_t::inited, size, and dt_dlopencl_t::symbols.
Referenced by _aniso_stage_cl_selftest(), _cf_harmonic_fill_cl_selftest(), _cf_joint_stage_cl_selftest(), _cf_stage_cl_selftest(), _chromaticity_gradient_stage_cl_selftest(), _harmonic_reconstruct_cl(), _hf_stage_cl_selftest(), _hl_knee_estimate_cl(), _joint_core_stage_cl_selftest(), _knee_cl_selftest(), _region_guided_filter_cl_selftest(), _selfdome_stage_cl_selftest(), _sp_chol_cl_selftest(), dt_heal_cl(), dt_iop_colorreconstruct_bilateral_freeze_cl(), green_equilibration_cl(), process_cl(), process_harmonic_cl(), process_wavelets_cl(), rt_adjust_levels_cl(), and rt_process_stats_cl().
| gboolean dt_opencl_read_device_config | ( | const int | devid | ) |
Definition at line 285 of file opencl.c.
References _dt_opencl_get_conf_int(), _opencl, dt_opencl_device_t::avoid_atomics, dt_opencl_device_t::clroundup_ht, dt_opencl_device_t::clroundup_wd, dt_opencl_device_t::cname, dt_opencl_t::dev, dt_opencl_device_t::disabled, DT_CLDEVICE_HEAD, dt_conf_get_int(), dt_conf_get_int64(), dt_conf_key_not_empty(), DT_DEBUG_OPENCL, DT_OPENCL_PINNING_DISABLED, DT_OPENCL_PINNING_ON, dt_opencl_write_device_config(), dt_print(), dt_opencl_device_t::event_handles, FALSE, dt_opencl_device_t::forced_headroom, dt_opencl_device_t::host_unified_memory, MAX, dt_opencl_device_t::micro_nap, dt_opencl_device_t::pinned_memory, TRUE, and dt_opencl_device_t::use_events.
Referenced by dt_opencl_device_init().
| int dt_opencl_read_host_from_device | ( | const int | devid, |
| void * | host, | ||
| void * | device, | ||
| const int | width, | ||
| const int | height, | ||
| const int | bpp | ||
| ) |
Definition at line 2309 of file opencl.c.
References bpp, dt_opencl_read_host_from_device_rowpitch(), height, and width.
Referenced by _cache_entry_materialize_host_data_locked(), _refine_with_detail_mask_cl(), ambient_light_cl(), dt_dev_pixelpipe_cache_sync_cl_buffer(), dt_opencl_copy_device_to_host(), and guided_filter_cl_fallback().
| int dt_opencl_read_host_from_device_raw | ( | const int | devid, |
| void * | host, | ||
| void * | device, | ||
| const size_t * | origin, | ||
| const size_t * | region, | ||
| const int | rowpitch, | ||
| const int | blocking | ||
| ) |
Definition at line 2344 of file opencl.c.
References _opencl, dt_opencl_device_t::cmd_queue, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clEnqueueReadImage, dt_opencl_events_get_slot(), dt_opencl_t::inited, and dt_dlopencl_t::symbols.
Referenced by _default_process_tiling_cl_ptp(), _default_process_tiling_cl_roi(), dt_opencl_read_host_from_device_rowpitch(), and dt_opencl_read_host_from_device_rowpitch_non_blocking().
| int dt_opencl_read_host_from_device_rowpitch | ( | const int | devid, |
| void * | host, | ||
| void * | device, | ||
| const int | width, | ||
| const int | height, | ||
| const int | rowpitch | ||
| ) |
Definition at line 2315 of file opencl.c.
References _opencl, dt_opencl_read_host_from_device_raw(), height, dt_opencl_t::inited, and width.
Referenced by dt_opencl_read_host_from_device().
| int dt_opencl_read_host_from_device_rowpitch_non_blocking | ( | const int | devid, |
| void * | host, | ||
| void * | device, | ||
| const int | width, | ||
| const int | height, | ||
| const int | rowpitch | ||
| ) |
Definition at line 2332 of file opencl.c.
References _opencl, dt_opencl_read_host_from_device_raw(), height, dt_opencl_t::inited, and width.
Referenced by dt_opencl_read_host_from_device_non_blocking().
| void dt_opencl_release_device | ( | const int | devid | ) |
Release a device reserved by either reserve function.
done with your command queue.
Definition at line 1722 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_pthread_mutex_BAD_unlock(), dt_opencl_t::inited, dt_opencl_device_t::lock, and dt_opencl_t::num_devs.
Referenced by _free_cache_entry(), dt_dev_pixelpipe_cache_flush_clmem_for_pipe(), and dt_dev_pixelpipe_process().
| void dt_opencl_release_mem_object | ( | cl_mem | mem | ) |
Definition at line 2527 of file opencl.c.
References _opencl, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clReleaseMemObject, dt_opencl_memory_statistics(), dt_opencl_t::inited, IS_NULL_PTR, OPENCL_MEMORY_SUB, and dt_dlopencl_t::symbols.
Referenced by _aniso_stage_cl_selftest(), _blend_layer_over_input_cl(), _cache_entry_clmem_flush_device(), _cache_entry_clmem_flush_host_pinned_locked(), _cf_harmonic_fill_cl_n(), _cf_harmonic_fill_cl_selftest(), _cf_joint_fit_cl(), _cf_joint_stage_cl(), _cf_joint_stage_cl_selftest(), _cf_pair_stage_cl(), _cf_stage_cl(), _cf_stage_cl_selftest(), _chromaticity_gradient_stage_cl_selftest(), _default_process_tiling_cl_ptp(), _default_process_tiling_cl_roi(), _downsample_guided_laplacian_postfilter_cl(), _drawlayer_acquire_source_image(), _harmonic_reconstruct_cl(), _hf_stage_cl(), _hf_stage_cl_selftest(), _hl_cl_lch_xtrans(), _hl_cl_visualize(), _hl_knee_apply_cfa_cl(), _hl_knee_estimate_cl(), _joint_core_stage_cl_selftest(), _knee_cl_selftest(), _pixel_cache_clmem_put(), _refine_with_detail_mask_cl(), _region_blur_cl_selftest(), _region_guided_filter_cl_selftest(), _retouch_blur_cl(), _retouch_clone_cl(), _retouch_fill_cl(), _retouch_heal_cl(), _selfdome_stage_cl_selftest(), _simulate_channel_cl(), _sp_chol_cl_free(), _sp_chol_cl_selftest(), _sp_cl_upload(), _unet_forward_cl(), _weights_cl(), apply_global_distortion_map_cl(), box_max_cl(), box_min_cl(), color_smoothing_cl(), dt_bilateral_free_cl(), dt_bilateral_slice_to_output_cl(), dt_colorspaces_apply_profile_cl(), dt_dev_pixelpipe_cache_flush_entry_clmem(), dt_dev_pixelpipe_cache_get_pinned_image(), dt_dev_pixelpipe_cache_release_cl_buffer(), dt_develop_blend_process_cl(), dt_gaussian_free_cl(), dt_gaussian_init_cl(), dt_interpolation_resample_cl(), dt_iop_colorreconstruct_bilateral_free_cl(), dt_ioppr_free_iccprofile_params_cl(), dt_ioppr_transform_image_colorspace_rgb_cl(), dt_local_laplacian_free_cl(), dt_nn_model_free_cl(), dual_demosaic_cl(), dwt_wavelet_decompose_cl(), green_equilibration_cl(), guided_filter_cl_impl(), nlmeans_denoise_cl(), nlmeans_denoiseprofile_cl(), process_cl(), process_cl(), process_cl(), process_default_cl(), process_harmonic_cl(), process_laplacian_bayer_cl(), process_laplacian_passthrough_cl(), process_laplacian_xtrans_cl(), process_markesteijn_cl(), process_nlmeans_cl(), process_rcd_cl(), process_vng_cl(), process_wavelets_cl(), reconstruct_highlights_cl(), rt_copy_image_masked_cl(), rt_copy_in_to_out_cl(), rt_copy_mask_to_alpha_cl(), and rt_process_forms_cl().
| int dt_opencl_report_pipe_error | ( | void | ) |
Record that a pipe run failed on OpenCL, and decide whether to give up on it.
The count and the give-up threshold belong to the OpenCL module, not to the pipeline: the pipeline's job is to report the failure and be told what to do next. Crossing the threshold also drops the "opencl" capability, so this is the one place that decides OpenCL is finished for the session.
Definition at line 1782 of file opencl.c.
References _opencl, dt_capabilities_remove(), DT_OPENCL_MAX_ERRORS, dt_opencl_t::error_count, and dt_opencl_t::stopped.
Referenced by dt_dev_pixelpipe_process().
| void dt_opencl_reserve_device_by_id | ( | const int | devid | ) |
Reserve a device the caller has already identified, blocking until it is free.
| devid | device id; out-of-range ids are ignored. |
Definition at line 1733 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_pthread_mutex_lock(), dt_opencl_t::inited, dt_opencl_device_t::lock, and dt_opencl_t::num_devs.
Referenced by dt_dev_pixelpipe_cache_flush_clmem_for_pipe().
| int dt_opencl_reserve_device_for_pipe | ( | const int | pipetype | ) |
Reserve a device for a pipe run: choose a free one by the pipe's priority list and take its lock. Blocks or gives up per the opencl_mandatory_timeout conf key.
locks a device for your thread's exclusive use
| pipetype | a dt_dev_pixelpipe_type_t; selects which priority list applies. |
dt_opencl_lock_device(), which took a PIPE TYPE while its dt_opencl_unlock_device() counterpart took a DEVICE ID – two different ints, one of them silently wrong if the pair were ever read as symmetric. The old names are gone rather than redefined, so a stale caller fails to compile. Definition at line 1637 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_opencl_t::dev_priority_export, dt_opencl_t::dev_priority_image, dt_opencl_t::dev_priority_preview, dt_opencl_t::dev_priority_thumbnail, dt_conf_get_int(), DT_DEBUG_OPENCL, DT_DEV_PIXELPIPE_EXPORT, DT_DEV_PIXELPIPE_FULL, DT_DEV_PIXELPIPE_PREVIEW, DT_DEV_PIXELPIPE_THUMBNAIL, dt_free, dt_iop_nap(), dt_print(), dt_pthread_mutex_BAD_trylock(), dt_pthread_mutex_lock(), dt_pthread_mutex_unlock(), dt_opencl_t::inited, dt_opencl_t::lock, dt_opencl_device_t::lock, dt_opencl_t::mandatory, MAX, n, and dt_opencl_t::num_devs.
Referenced by dt_dev_pixelpipe_process().
| int dt_opencl_set_detected_device_enabled | ( | const int | detected, |
| const gboolean | enabled | ||
| ) |
Persist the per-device OpenCL preference and derive the global OpenCL switch from all GPU states.
Definition at line 378 of file opencl.c.
References _opencl, dt_opencl_detected_device_t::cname, dt_opencl_detected_device_t::config_id, dt_opencl_t::detected_devs, dt_opencl_detected_device_t::disabled, DT_CLDEVICE_HEAD, dt_conf_set_bool(), dt_conf_set_int(), dt_opencl_detected_device_enabled(), dt_opencl_get_detected_device(), IS_NULL_PTR, key, and TRUE.
Referenced by _opencl_device_enabled_callback().
| int dt_opencl_set_detected_device_headroom | ( | const int | detected, |
| const size_t | headroom | ||
| ) |
Persist the per-device GPU vRAM headroom in MiB.
Definition at line 456 of file opencl.c.
References _opencl, dt_opencl_detected_device_t::cname, dt_opencl_detected_device_t::config_id, dt_opencl_t::detected_devs, dt_opencl_t::dev, DT_CLDEVICE_HEAD, dt_conf_set_int(), dt_opencl_check_tuning(), dt_opencl_get_detected_device(), dt_opencl_device_t::forced_headroom, dt_opencl_detected_device_t::forced_headroom, IS_NULL_PTR, key, MIN, and dt_opencl_t::num_devs.
Referenced by _opencl_device_headroom_callback().
| int dt_opencl_set_detected_device_pinned_memory | ( | const int | detected, |
| const gboolean | enabled | ||
| ) |
Persist the per-device pinned memory transfer preference.
Definition at line 423 of file opencl.c.
References _opencl, dt_opencl_detected_device_t::cname, dt_opencl_detected_device_t::config_id, dt_opencl_t::detected_devs, dt_opencl_t::dev, DT_CLDEVICE_HEAD, dt_conf_set_int(), dt_opencl_get_detected_device(), DT_OPENCL_PINNING_OFF, DT_OPENCL_PINNING_ON, IS_NULL_PTR, key, dt_opencl_t::num_devs, dt_opencl_device_t::pinned_memory, and dt_opencl_detected_device_t::pinned_memory.
Referenced by _opencl_device_pinned_memory_callback().
| int dt_opencl_set_kernel_arg | ( | const int | dev, |
| const int | kernel, | ||
| const int | num, | ||
| const size_t | size, | ||
| const void * | arg | ||
| ) |
attach arg.
Definition at line 2267 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clSetKernelArg, DT_OPENCL_MAX_KERNELS, dt_opencl_t::inited, kernel(), dt_opencl_device_t::kernel, size, and dt_dlopencl_t::symbols.
Referenced by _cf_harmonic_fill_cl_n(), _cf_joint_fit_cl(), _cf_joint_stage_cl(), _cf_joint_stage_cl_selftest(), _cf_pair_stage_cl(), _cf_stage_cl(), _conv_cl(), _downsample_guided_laplacian_postfilter_cl(), _drawlayer_run_premult_over_kernel(), _harmonic_reconstruct_cl(), _hf_stage_cl(), _hl_cl_clip(), _hl_cl_lch_bayer(), _hl_cl_lch_xtrans(), _hl_cl_visualize(), _hl_knee_apply_cfa_cl(), _hl_knee_estimate_cl(), _refine_with_detail_mask_cl(), _retouch_blur_cl(), _retouch_fill_cl(), _simulate_channel_cl(), _sp_chol_factor_cl(), _sp_chol_solve_cl(), _upsample_cl(), apply_global_distortion_map_cl(), box_max_cl(), box_min_cl(), cl_box_mean(), cl_covariances(), cl_generate_result(), cl_solve(), cl_split_rgb(), cl_update_covariance(), cl_variances(), color_smoothing_cl(), dehaze_cl(), dt_bilateral_blur_cl(), dt_bilateral_init_cl(), dt_bilateral_slice_cl(), dt_bilateral_slice_to_output_cl(), dt_bilateral_splat_cl(), dt_colorspaces_apply_profile_cl(), dt_develop_blend_process_cl(), dt_gaussian_blur_cl(), dt_interpolation_resample_cl(), dt_iop_colorreconstruct_bilateral_blur_cl(), dt_iop_colorreconstruct_bilateral_init_cl(), dt_iop_colorreconstruct_bilateral_slice_cl(), dt_iop_colorreconstruct_bilateral_splat_cl(), dt_ioppr_transform_image_colorspace_rgb_cl(), dt_local_laplacian_cl(), dual_demosaic_cl(), dwt_add_layer_cl(), dwt_subtract_layer_cl(), dwt_wavelet_decompose_cl(), green_equilibration_cl(), nlmeans_cl_accu(), nlmeans_cl_horiz(), nlmeans_cl_init(), nlmeans_denoise_cl(), nlmeans_denoiseprofile_cl(), process_cl(), process_cl(), process_cl(), process_default_cl(), process_harmonic_cl(), process_laplacian_bayer_cl(), process_laplacian_passthrough_cl(), process_laplacian_xtrans_cl(), process_markesteijn_cl(), process_nlmeans_cl(), process_rcd_cl(), process_vng_cl(), process_wavelets_cl(), reconstruct_highlights_cl(), rt_copy_image_masked_cl(), rt_copy_in_to_out_cl(), rt_copy_mask_to_alpha_cl(), transition_map_cl(), wavelets_process_cl(), and wavelets_process_cl().
|
static |
set opencl specific synchronization timeout
Definition at line 2984 of file opencl.c.
References _opencl, DT_DEBUG_OPENCL, dt_print_nts(), dt_opencl_t::opencl_synchronization_timeout, and value.
Referenced by dt_opencl_apply_scheduling_profile().
| int dt_opencl_try_reserve_device_by_id | ( | const int | devid | ) |
Reserve a device only if it is free right now.
| devid | device id. |
Definition at line 1741 of file opencl.c.
References _opencl, dt_opencl_t::dev, dt_pthread_mutex_BAD_trylock(), dt_opencl_t::inited, dt_opencl_device_t::lock, and dt_opencl_t::num_devs.
Referenced by _free_cache_entry().
| int dt_opencl_unmap_mem_object | ( | const int | devid, |
| cl_mem | mem_object, | ||
| void * | mapped_ptr | ||
| ) |
Definition at line 2574 of file opencl.c.
References _opencl, dt_opencl_device_t::cmd_queue, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clEnqueueUnmapMemObject, DT_DEBUG_OPENCL, dt_opencl_events_get_slot(), dt_print(), dt_opencl_t::inited, and dt_dlopencl_t::symbols.
Referenced by _cache_entry_materialize_host_data_locked(), _drawlayer_sync_host_image_to_device(), dt_dev_pixelpipe_cache_get_pinned_image(), and dt_dev_pixelpipe_cache_sync_cl_buffer().
|
static |
set device priorities according to config string
Definition at line 1602 of file opencl.c.
References _opencl, dt_opencl_t::dev_priority_export, dt_opencl_t::dev_priority_image, dt_opencl_t::dev_priority_preview, dt_opencl_t::dev_priority_thumbnail, dt_conf_get_string(), DT_DEBUG_OPENCL, dt_free, dt_opencl_priority_parse(), dt_print_nts(), i, dt_opencl_t::inited, dt_opencl_t::mandatory, and dt_opencl_t::num_devs.
Referenced by dt_opencl_apply_scheduling_profile().
| int dt_opencl_update_settings | ( | void | ) |
update enabled flag and profile with value from preferences, returns enabled flag
Definition at line 2964 of file opencl.c.
References _opencl, dt_conf_get_bool(), DT_DEBUG_OPENCL, dt_print(), dt_opencl_t::enabled, dt_opencl_t::error_count, FALSE, dt_opencl_t::inited, and dt_opencl_t::stopped.
Referenced by dt_dev_pixelpipe_process().
| gboolean dt_opencl_use_pinned_memory | ( | const int | devid | ) |
Definition at line 222 of file opencl.c.
References _opencl, dt_opencl_t::dev, DT_OPENCL_PINNING_ON, FALSE, dt_opencl_t::inited, and dt_opencl_device_t::pinned_memory.
Referenced by dt_dev_pixelpipe_cache_get_cl_buffer(), and dt_dev_pixelpipe_cache_get_pinned_image().
| int dt_opencl_write_buffer_to_device | ( | const int | devid, |
| void * | host, | ||
| void * | device, | ||
| const size_t | offset, | ||
| const size_t | size, | ||
| const int | blocking | ||
| ) |
Definition at line 2460 of file opencl.c.
References _opencl, dt_opencl_device_t::cmd_queue, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clEnqueueWriteBuffer, dt_opencl_events_get_slot(), dt_opencl_t::inited, size, and dt_dlopencl_t::symbols.
Referenced by _aniso_stage_cl_selftest(), _cf_harmonic_fill_cl_selftest(), _cf_joint_stage_cl_selftest(), _cf_stage_cl_selftest(), _chromaticity_gradient_stage_cl_selftest(), _harmonic_reconstruct_cl(), _hf_stage_cl_selftest(), _hl_knee_estimate_cl(), _joint_core_stage_cl_selftest(), _knee_cl_selftest(), _region_guided_filter_cl_selftest(), _selfdome_stage_cl_selftest(), _sp_cl_upload(), _weights_cl(), dt_heal_cl(), process_cl(), rt_adjust_levels_cl(), rt_build_scaled_mask_cl(), and rt_process_stats_cl().
| void dt_opencl_write_device_config | ( | const int | devid | ) |
utility functions handling device specific properties
Definition at line 235 of file opencl.c.
References _opencl, dt_opencl_device_t::avoid_atomics, dt_opencl_device_t::clroundup_ht, dt_opencl_device_t::clroundup_wd, dt_opencl_device_t::cname, dt_opencl_t::dev, dt_opencl_device_t::disabled, DT_CLDEVICE_HEAD, dt_conf_set_int(), DT_OPENCL_PINNING_DISABLED, DT_OPENCL_PINNING_ON, dt_opencl_device_t::event_handles, dt_opencl_device_t::forced_headroom, dt_opencl_device_t::micro_nap, and dt_opencl_device_t::pinned_memory.
Referenced by dt_opencl_device_init(), and dt_opencl_read_device_config().
| int dt_opencl_write_host_to_device | ( | const int | devid, |
| void * | host, | ||
| void * | device, | ||
| const int | width, | ||
| const int | height, | ||
| const int | bpp | ||
| ) |
Definition at line 2356 of file opencl.c.
References bpp, dt_opencl_write_host_to_device_rowpitch(), height, and width.
Referenced by _drawlayer_sync_host_image_to_device(), _harmonic_cl_roundtrip(), _refine_with_detail_mask_cl(), _region_blur_cl_selftest(), dt_colorspaces_apply_profile_cl(), dt_dev_pixelpipe_cache_get_pinned_image(), dt_dev_pixelpipe_cache_prepare_cl_input(), dt_dev_pixelpipe_cache_sync_cl_buffer(), dt_develop_blend_process_cl(), dt_ioppr_transform_image_colorspace_rgb_cl(), guided_filter_cl_fallback(), process_cl(), and process_harmonic_cl().
| int dt_opencl_write_host_to_device_raw | ( | const int | devid, |
| const void * | host, | ||
| void * | device, | ||
| const size_t * | origin, | ||
| const size_t * | region, | ||
| const int | rowpitch, | ||
| const int | blocking | ||
| ) |
Definition at line 2389 of file opencl.c.
References _opencl, dt_opencl_device_t::cmd_queue, dt_opencl_t::dev, dt_opencl_t::dlocl, dt_dlopencl_symbols_t::dt_clEnqueueWriteImage, dt_opencl_events_get_slot(), dt_opencl_t::inited, and dt_dlopencl_t::symbols.
Referenced by _default_process_tiling_cl_ptp(), _default_process_tiling_cl_roi(), _drawlayer_sync_host_image_to_device(), dt_opencl_write_host_to_device_rowpitch(), dt_opencl_write_host_to_device_rowpitch_non_blocking(), and process_cl().
| int dt_opencl_write_host_to_device_rowpitch | ( | const int | devid, |
| void * | host, | ||
| void * | device, | ||
| const int | width, | ||
| const int | height, | ||
| const int | rowpitch | ||
| ) |
Definition at line 2362 of file opencl.c.
References _opencl, dt_opencl_write_host_to_device_raw(), height, dt_opencl_t::inited, and width.
Referenced by dt_opencl_write_host_to_device().
| int dt_opencl_write_host_to_device_rowpitch_non_blocking | ( | const int | devid, |
| void * | host, | ||
| void * | device, | ||
| const int | width, | ||
| const int | height, | ||
| const int | rowpitch | ||
| ) |
Definition at line 2378 of file opencl.c.
References _opencl, dt_opencl_write_host_to_device_raw(), height, dt_opencl_t::inited, and width.
Referenced by dt_opencl_write_host_to_device_non_blocking().
|
static |
Definition at line 1796 of file opencl.c.
References DT_DEBUG_OPENCL, dt_print(), f, and IS_NULL_PTR.
Referenced by dt_opencl_load_program(), and dt_opencl_md5sum().
|
static |
Definition at line 3388 of file opencl.c.
Referenced by dt_opencl_local_buffer_opt().
|
static |
Definition at line 127 of file opencl.c.
Referenced by _device_by_cname(), _dt_opencl_alloc_image2d(), _opencl_get_device_memalloc(), dt_opencl_alloc_device_buffer_with_flags(), dt_opencl_apply_scheduling_profile(), dt_opencl_avoid_atomics(), dt_opencl_build_program(), dt_opencl_check_tuning(), dt_opencl_cleanup(), dt_opencl_copy_host_to_device_constant(), dt_opencl_copy_host_to_device_rowpitch(), dt_opencl_create_kernel(), dt_opencl_dev_roundup_height(), dt_opencl_dev_roundup_width(), dt_opencl_disable(), dt_opencl_enqueue_barrier(), dt_opencl_enqueue_copy_buffer_to_buffer(), dt_opencl_enqueue_copy_buffer_to_image(), dt_opencl_enqueue_copy_image(), dt_opencl_enqueue_copy_image_to_buffer(), dt_opencl_enqueue_kernel_2d_with_local(), dt_opencl_events_flush(), dt_opencl_events_get_slot(), dt_opencl_events_profiling(), dt_opencl_events_reset(), dt_opencl_events_wait_for(), dt_opencl_finish(), dt_opencl_free_kernel(), dt_opencl_get_detected_device(), dt_opencl_get_detected_device_count(), dt_opencl_get_device_available(), dt_opencl_get_device_max_global_mem(), dt_opencl_get_device_max_image_size(), dt_opencl_get_device_memalloc(), dt_opencl_get_device_name(), dt_opencl_get_image_element_size(), dt_opencl_get_image_height(), dt_opencl_get_image_width(), dt_opencl_get_kernel_work_group_size(), dt_opencl_get_max_work_item_sizes(), dt_opencl_get_mem_context_id(), dt_opencl_get_mem_flags(), dt_opencl_get_mem_object_size(), dt_opencl_get_num_devices(), dt_opencl_get_work_group_limits(), dt_opencl_image_fits_device_reason(), dt_opencl_init(), dt_opencl_is_enabled(), dt_opencl_is_inited(), dt_opencl_load_program(), dt_opencl_local_buffer_opt(), dt_opencl_map_buffer(), dt_opencl_map_image(), dt_opencl_memory_statistics(), dt_opencl_micro_nap(), dt_opencl_read_buffer_from_device(), dt_opencl_read_device_config(), dt_opencl_read_host_from_device_raw(), dt_opencl_read_host_from_device_rowpitch(), dt_opencl_read_host_from_device_rowpitch_non_blocking(), dt_opencl_release_device(), dt_opencl_release_mem_object(), dt_opencl_report_pipe_error(), dt_opencl_reserve_device_by_id(), dt_opencl_reserve_device_for_pipe(), dt_opencl_set_detected_device_enabled(), dt_opencl_set_detected_device_headroom(), dt_opencl_set_detected_device_pinned_memory(), dt_opencl_set_kernel_arg(), dt_opencl_set_synchronization_timeout(), dt_opencl_try_reserve_device_by_id(), dt_opencl_unmap_mem_object(), dt_opencl_update_priorities(), dt_opencl_update_settings(), dt_opencl_use_pinned_memory(), dt_opencl_write_buffer_to_device(), dt_opencl_write_device_config(), dt_opencl_write_host_to_device_raw(), dt_opencl_write_host_to_device_rowpitch(), and dt_opencl_write_host_to_device_rowpitch_non_blocking().