File OpenMPExecutor.h
↰ Parent directory (ADS/parallel)
The executor [see File Executor.h] on the threads of OpenMP, beyond the book, compiled only when the compiler has OpenMP on (_OPENMP, e.g., -fopenmp, or the CMake option ADS_WITH_OPENMP, OFF by default): bulk( n , f ) is a loop #pragma omp parallel for on n indices with the dynamic schedule of chunks of 1 on min( p , n ) threads, invoke( f , g ) two sections, so that the parallel algorithms of Namespace ADS run on the runtime of OpenMP of the compiler (the libgomp of GCC, the libomp of LLVM) unchanged.
Definition (ADS/parallel/OpenMPExecutor.h)
Detailed Description
The thread that calls is one of the p, as in every region of OpenMP. A call nested in another runs on as many threads as the runtime gives a nested region (by default 1, i.e., in order on that thread).
The contracts [see File Contract.h]: p >= 1; an exception thrown by f stops the claims and is thrown again by bulk() (an exception may not leave a region of OpenMP). OpenMP Architecture Review Board, OpenMP Application Programming Interface, version 5.2, 2021, https://www.openmp.org/spec-html/5.2/
- Donato Meoli
Dipartimento di Informatica Universita’ di Pisa
by Donato Meoli