imate
C++/CUDA Reference
Loading...
Searching...
No Matches
conditional_openmp.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: Copyright 2021, Siavash Ameli <sameli@berkeley.edu>
3 * SPDX-License-Identifier: BSD-3-Clause
4 * SPDX-FileType: SOURCE
5 *
6 * This program is free software: you can redistribute it and/or modify it
7 * under the terms of the license found in the LICENSE.txt file in the root
8 * directory of this source tree.
9 */
10
11
12// =======
13// Headers
14// =======
15
16#include "./conditional_openmp.h" // use_openmp
17
18
19// Nullify all openmp functions
20#if !defined(USE_OPENMP) || (USE_OPENMP != 1)
21
22 // =============
23 // omp init lock
24 // =============
25
27 {
28 (void) lock;
29 }
30
31 // ============
32 // omp set lock
33 // ============
34
36 {
37 (void) lock;
38 }
39
40 // ==============
41 // omp unset lock
42 // ==============
43
45 {
46 (void) lock;
47 }
48
49 // ===================
50 // omp get max threads
51 // ===================
52
54 {
55 return 1;
56 }
57
58 // ==================
59 // omp get thread num
60 // ==================
61
63 {
64 return 0;
65 }
66
67 // ===================
68 // omp set num threads
69 // ===================
70
71 void omp_set_num_threads(int num_threads)
72 {
73 (void) num_threads;
74 }
75
76#endif
void omp_unset_lock(omp_lock_t *lock)
int omp_get_max_threads()
void omp_set_lock(omp_lock_t *lock)
void omp_set_num_threads(int num_threads)
int omp_get_thread_num()
void omp_init_lock(omp_lock_t *lock)
int omp_lock_t