|
| 1 | +/* |
| 2 | + * OpDiLib, an Open Multiprocessing Differentiation Library |
| 3 | + * |
| 4 | + * Copyright (C) 2020-2022 Chair for Scientific Computing (SciComp), TU Kaiserslautern |
| 5 | + * Copyright (C) 2023-2025 Chair for Scientific Computing (SciComp), University of Kaiserslautern-Landau |
| 6 | + * Homepage: https://scicomp.rptu.de |
| 7 | + * Contact: Prof. Nicolas R. Gauger (opdi@scicomp.uni-kl.de) |
| 8 | + * |
| 9 | + * Lead developer: Johannes Blühdorn (SciComp, University of Kaiserslautern-Landau) |
| 10 | + * |
| 11 | + * This file is part of OpDiLib (https://scicomp.rptu.de/software/opdi). |
| 12 | + * |
| 13 | + * OpDiLib is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public |
| 14 | + * License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later |
| 15 | + * version. |
| 16 | + * |
| 17 | + * OpDiLib is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied |
| 18 | + * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more |
| 19 | + * details. |
| 20 | + * |
| 21 | + * You should have received a copy of the GNU Lesser General Public License along with OpDiLib. If not, see |
| 22 | + * <http://www.gnu.org/licenses/>. |
| 23 | + * |
| 24 | + */ |
| 25 | + |
| 26 | +namespace opdi { |
| 27 | + |
| 28 | + /* lock routines */ |
| 29 | + |
| 30 | + void opdi_destroy_lock(omp_lock_t* lock) { |
| 31 | + omp_destroy_lock(lock); |
| 32 | + } |
| 33 | + |
| 34 | + void opdi_destroy_nest_lock(omp_nest_lock_t* lock) { |
| 35 | + omp_destroy_nest_lock(lock); |
| 36 | + } |
| 37 | + |
| 38 | + void opdi_set_lock(omp_lock_t* lock) { |
| 39 | + omp_set_lock(lock); |
| 40 | + } |
| 41 | + |
| 42 | + void opdi_set_nest_lock(omp_nest_lock_t* lock) { |
| 43 | + omp_set_nest_lock(lock); |
| 44 | + } |
| 45 | + |
| 46 | + void opdi_unset_lock(omp_lock_t* lock) { |
| 47 | + omp_unset_lock(lock); |
| 48 | + } |
| 49 | + |
| 50 | + void opdi_unset_nest_lock(omp_nest_lock_t* lock) { |
| 51 | + omp_unset_nest_lock(lock); |
| 52 | + } |
| 53 | + |
| 54 | + int opdi_test_lock(omp_lock_t* lock) { |
| 55 | + return omp_test_lock(lock); |
| 56 | + } |
| 57 | + |
| 58 | + int opdi_test_nest_lock(omp_nest_lock_t* lock) { |
| 59 | + return omp_test_nest_lock(lock); |
| 60 | + } |
| 61 | +} |
0 commit comments