summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pomp.h
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2019-10-18 17:57:55 +0200
committer couriersud <couriersud@gmx.org>2019-10-18 17:57:55 +0200
commitb09fa00cca1a9baa0327a33d865fc970f77d4db0 (patch)
tree47dd943368aa43a0c0cf4256f88e590960c1e99f /src/lib/netlist/plib/pomp.h
parentad27643c07d54fc2cc3e56327fe07335e7763d52 (diff)
Netlist: code maintenance and improvements. [Couriersud]
- Added support for line markers to the preprocessor and parser. - Added support for include processing to the preprocessor. - Moved sources base type to plib to be used for preprocessor includes. This enables to include e.g. from rom memory regions. - Renamed some defines
Diffstat (limited to 'src/lib/netlist/plib/pomp.h')
-rw-r--r--src/lib/netlist/plib/pomp.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/netlist/plib/pomp.h b/src/lib/netlist/plib/pomp.h
index 400fbee9e64..79fa0f4bf9b 100644
--- a/src/lib/netlist/plib/pomp.h
+++ b/src/lib/netlist/plib/pomp.h
@@ -14,7 +14,7 @@
#include <cstdint>
-#if HAS_OPENMP
+#if PHAS_OPENMP
#include "omp.h"
#endif
@@ -26,7 +26,7 @@ void for_static(std::size_t numops, const I start, const I end, const T &what)
{
if (numops>1000)
{
- #if HAS_OPENMP && USE_OPENMP
+ #if PHAS_OPENMP && PUSE_OPENMP
#pragma omp parallel for schedule(static)
#endif
for (I i = start; i < end; i++)
@@ -40,7 +40,7 @@ void for_static(std::size_t numops, const I start, const I end, const T &what)
template <typename I, class T>
void for_static(const I start, const I end, const T &what)
{
-#if HAS_OPENMP && USE_OPENMP
+#if PHAS_OPENMP && PUSE_OPENMP
#pragma omp parallel for schedule(static)
#endif
for (I i = start; i < end; i++)
@@ -57,7 +57,7 @@ void for_static_np(const I start, const I end, const T &what)
inline void set_num_threads(const std::size_t threads)
{
-#if HAS_OPENMP && USE_OPENMP
+#if PHAS_OPENMP && PUSE_OPENMP
omp_set_num_threads(threads);
#else
plib::unused_var(threads);
@@ -66,7 +66,7 @@ inline void set_num_threads(const std::size_t threads)
inline std::size_t get_max_threads()
{
-#if HAS_OPENMP && USE_OPENMP
+#if PHAS_OPENMP && PUSE_OPENMP
return omp_get_max_threads();
#else
return 1;