OpenMP interface header, provides compatibility functions if the code is built without OpenMP support. Parallel pragmas are defined here so that they can be completely "disabled" when compiling without OpenMP.
More...
|
| constexpr int | omp_get_max_threads () |
| | Maximum number of threads available.
|
| |
| constexpr int | omp_get_num_threads () |
| | Number of threads in current team.
|
| |
| void | omp_set_num_threads (int) |
| | Set the maximum number of threads.
|
| |
| constexpr int | omp_get_thread_num () |
| | Index of current thread, akin to MPI rank.
|
| |
| constexpr bool | omp_in_parallel () |
| | Returns true if inside a parallel section.
|
| |
| passivedouble | omp_get_wtime () |
| | Return the wall time.
|
| |
| void | omp_init_lock (omp_lock_t *) |
| |
| void | omp_set_lock (omp_lock_t *) |
| |
| void | omp_unset_lock (omp_lock_t *) |
| |
| void | omp_destroy_lock (omp_lock_t *) |
| |
| void | omp_initialize () |
| |
| void | omp_finalize () |
| |
| constexpr size_t | roundUpDiv (size_t numerator, size_t denominator) |
| | Integer division rounding up.
|
| |
| constexpr size_t | nextMultiple (size_t argument, size_t multiple) |
| | Round up to next multiple.
|
| |
| size_t | computeStaticChunkSize (size_t totalWork, size_t numThreads, size_t maxChunkSize) |
| | Compute a chunk size based on totalWork and number of threads such that all threads get the same number of chunks (with limited size).
|
| |
| template<class T , class U > |
| void | parallelCopy (size_t size, const T *src, U *dst) |
| | Copy data from one array-like object to another in parallel.
|
| |
| template<class T , class U > |
| void | parallelSet (size_t size, T val, U *dst) |
| | Set the entries of an array-like object to a constant value in parallel.
|
| |
| template<class T , su2enable_if<!std::is_arithmetic< T >::value > = 0> |
| void | atomicAdd (T rhs, T &lhs) |
| | Atomically update a (shared) lhs value with a (local) rhs value.
|
| |
| template<class T > |
| void | atomicMax (const T &local, T &shared) |
| |
| template<class T > |
| void | atomicMin (const T &local, T &shared) |
| |
OpenMP interface header, provides compatibility functions if the code is built without OpenMP support. Parallel pragmas are defined here so that they can be completely "disabled" when compiling without OpenMP.
- Note
- Do not include omp.h explicitly anywhere, use this header instead.
-
If you use an omp_*** function define a compatibility version here, if that is not practical use define "HAVE_OMP" to guard that function.
-
Always use the macro "SU2_OMP" to create OpenMP constructs, this is so we can disable pragmas. Other convenient pragmas are also defined here e.g. SU2_OMP_PARALLEL. Exotic pragmas of limited portability should be defined here with suitable fallback versions to limit the spread of compiler tricks in other areas of the code.
- Author
- P. Gomes, J. Blühdorn
- Version
- 8.5.0 "Harrier"
SU2 Project Website: https://su2code.github.io
The SU2 Project is maintained by the SU2 Foundation (http://su2foundation.org)
Copyright 2012-2026, SU2 Contributors (cf. AUTHORS.md)
SU2 is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
SU2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with SU2. If not, see http://www.gnu.org/licenses/.