Ansel 0.0
A darktable fork - bloat + design vision
Loading...
Searching...
No Matches
openmp.h File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define omp_get_max_threads()   1
 
#define omp_get_thread_num()   0
 
#define dt_omp_in_parallel()   0
 
#define __OMP_PARALLEL__(...)
 
#define __OMP_PARALLEL_FOR__(...)
 
#define __OMP_PARALLEL_FOR_SIMD__(...)
 
#define __OMP_FOR_SIMD__(...)
 
#define __OMP_FOR__(...)
 
#define __OMP_SIMD__(...)
 
#define __OMP_DECLARE_SIMD__(...)
 
#define __OMP_PARALLEL_FOR_CPP__(...)
 
#define dt_omploop_sfence()   dt_sfence()
 

Functions

int dt_get_num_openmp_threads (void)
 Number of OpenMP threads the application decided to use.
 
static int dt_get_thread_num ()
 Index of the calling thread within its parallel region, 0 outside one.
 
static void dt_sfence ()
 

Macro Definition Documentation

◆ __OMP_DECLARE_SIMD__

#define __OMP_DECLARE_SIMD__ (   ...)

Definition at line 100 of file openmp.h.

◆ __OMP_FOR__

#define __OMP_FOR__ (   ...)

Definition at line 98 of file openmp.h.

◆ __OMP_FOR_SIMD__

#define __OMP_FOR_SIMD__ (   ...)

Definition at line 97 of file openmp.h.

◆ __OMP_PARALLEL__

#define __OMP_PARALLEL__ (   ...)

Definition at line 94 of file openmp.h.

◆ __OMP_PARALLEL_FOR__

#define __OMP_PARALLEL_FOR__ (   ...)

Definition at line 95 of file openmp.h.

◆ __OMP_PARALLEL_FOR_CPP__

#define __OMP_PARALLEL_FOR_CPP__ (   ...)

Definition at line 102 of file openmp.h.

◆ __OMP_PARALLEL_FOR_SIMD__

#define __OMP_PARALLEL_FOR_SIMD__ (   ...)

Definition at line 96 of file openmp.h.

◆ __OMP_SIMD__

#define __OMP_SIMD__ (   ...)

Definition at line 99 of file openmp.h.

◆ dt_omp_in_parallel

#define dt_omp_in_parallel ( )    0

Definition at line 92 of file openmp.h.

◆ dt_omploop_sfence

#define dt_omploop_sfence ( )    dt_sfence()

Definition at line 164 of file openmp.h.

◆ omp_get_max_threads

#define omp_get_max_threads ( )    1

Definition at line 90 of file openmp.h.

◆ omp_get_thread_num

#define omp_get_thread_num ( )    0

Definition at line 91 of file openmp.h.

Function Documentation

◆ dt_get_num_openmp_threads()

int dt_get_num_openmp_threads ( void  )

Number of OpenMP threads the application decided to use.

This is the APPLICATION's budget, not omp_get_max_threads(): it is seeded from that value and then overridden by the -t command-line option (clamped to 1..100), so the two disagree whenever the user asked for a specific count. Size per-thread buffers with this one, index them with dt_get_thread_num().

Number of OpenMP threads the application decided to use. DECLARED here so low-level compute code can size per-thread buffers without importing darktable.h; BOUND by the orchestrator (darktable.c).

Definition at line 517 of file darktable.c.

References darktable, and darktable_t::num_openmp_threads.

Referenced by _circle_get_mask(), _circle_get_mask_roi(), _gradient_get_points(), color_picker_helper_4ch_converted_parallel(), color_picker_helper_bayer_parallel(), dt_bilateral_init(), dt_bilateral_memory_use(), dt_bilateral_singlebuffer_size(), dt_bilateral_splat(), dt_colorprofiles_srgb_to_display_strided(), dt_control_work(), dt_control_work_res(), dt_imageio_open_exr(), dt_imageio_open_j2k(), dt_iop_alloc_image_buffers(), dt_iop_image_fill(), dt_pixelpipe_cache_alloc_perthread_impl(), dt_pixelpipe_cache_calloc_perthread_impl(), dwt_wavelet_decompose(), nlmeans_denoise(), process(), process_random(), reconstruct_highlights(), tiling_callback(), wavelet_denoise_xtrans(), write_image(), and write_image().

◆ dt_get_thread_num()

static int dt_get_thread_num ( )
inlinestatic

Index of the calling thread within its parallel region, 0 outside one.

Returns
0 always when built without OpenMP. Safe to use as an index into a per-thread array sized by dt_get_num_openmp_threads().

Definition at line 129 of file openmp.h.

References omp_get_thread_num.

Referenced by blur_2D_Bspline(), color_picker_helper_bayer_parallel(), color_picker_helper_xtrans_parallel(), dt_colorprofiles_srgb_to_display_strided(), dt_points_get(), dwt_decompose_horiz(), process(), and process_random().

◆ dt_sfence()

static void dt_sfence ( )
inlinestatic

Definition at line 142 of file openmp.h.