-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deactivate openmp for windowns/clang-cl
- Loading branch information
1 parent
2e42fde
commit 1a33277
Showing
5 changed files
with
80 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
src/themachinethatgoesping/tools/helper/.docstrings/omp_helper.doc.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
//sourcehash: dde3ddcac5c985162f89b5211421b3158f063275d1d62c44b6407d304669c384 | ||
|
||
/* | ||
This file contains docstrings for use in the Python bindings. | ||
Do not edit! They were automatically extracted by pybind11_mkdoc. | ||
This is a modified version which allows for more than 8 arguments and includes def-guard | ||
*/ | ||
|
||
#pragma once | ||
|
||
#ifndef __DOCSTRINGS_HPP__ | ||
|
||
#define __EXPAND(x) x | ||
#define __COUNT(_1, _2, _3, _4, _5, _6, _7, _8, _9, _10, COUNT, ...) COUNT | ||
#define __VA_SIZE(...) __EXPAND(__COUNT(__VA_ARGS__, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1)) | ||
#define __CAT1(a, b) a##b | ||
#define __CAT2(a, b) __CAT1(a, b) | ||
#define __DOC1(n1) __doc_##n1 | ||
#define __DOC2(n1, n2) __doc_##n1##_##n2 | ||
#define __DOC3(n1, n2, n3) __doc_##n1##_##n2##_##n3 | ||
#define __DOC4(n1, n2, n3, n4) __doc_##n1##_##n2##_##n3##_##n4 | ||
#define __DOC5(n1, n2, n3, n4, n5) __doc_##n1##_##n2##_##n3##_##n4##_##n5 | ||
#define __DOC6(n1, n2, n3, n4, n5, n6) __doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6 | ||
#define __DOC7(n1, n2, n3, n4, n5, n6, n7) __doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7 | ||
#define __DOC8(n1, n2, n3, n4, n5, n6, n7, n8) \ | ||
__doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7##_##n8 | ||
#define __DOC9(n1, n2, n3, n4, n5, n6, n7, n8, n9) \ | ||
__doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7##_##n8##_##n9 | ||
#define __DOC10(n1, n2, n3, n4, n5, n6, n7, n8, n9, n10) \ | ||
__doc_##n1##_##n2##_##n3##_##n4##_##n5##_##n6##_##n7##_##n8##_##n9##_##n10 | ||
#define DOC(...) __EXPAND(__EXPAND(__CAT2(__DOC, __VA_SIZE(__VA_ARGS__)))(__VA_ARGS__)) | ||
|
||
#endif // NEW_DOC_HEADER_HPP | ||
#if defined(__GNUG__) | ||
#pragma GCC diagnostic push | ||
#pragma GCC diagnostic ignored "-Wunused-variable" | ||
#endif | ||
|
||
|
||
static const char *__doc_omp_get_max_threads = R"doc()doc"; | ||
|
||
static const char *__doc_omp_get_num_procs = R"doc()doc"; | ||
|
||
static const char *__doc_omp_get_num_threads = R"doc()doc"; | ||
|
||
static const char *__doc_omp_get_thread_num = R"doc()doc"; | ||
|
||
#if defined(__GNUG__) | ||
#pragma GCC diagnostic pop | ||
#endif | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// SPDX-FileCopyrightText: 2024 Peter Urban, Ghent University | ||
// | ||
// SPDX-License-Identifier: MPL-2.0 | ||
#pragma once | ||
|
||
/* generated doc strings */ | ||
#include ".docstrings/omp_helper.doc.hpp" | ||
|
||
#if defined(_OPENMP) | ||
// only include OpenMP header if it is defined | ||
#include <omp.h> | ||
#else | ||
// If OpenMP is not defined, provide fallback functions that simulate | ||
// single-threaded behavior | ||
inline int omp_get_num_threads() { return 1; } | ||
inline int omp_get_max_threads() { return 1; } | ||
inline int omp_get_thread_num() { return 0; } | ||
inline int omp_get_num_procs() { return 1; } | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters