summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pomp.h
diff options
context:
space:
mode:
author andreasnaive <andreasnaive@gmail.com>2019-03-25 23:13:40 +0100
committer andreasnaive <andreasnaive@gmail.com>2019-03-25 23:13:40 +0100
commitb380514764cf857469bae61c11143a19f79a74c5 (patch)
tree63c8012e262618f08a332da31dd714281aa2c5ed /src/lib/netlist/plib/pomp.h
parentc24473ddff715ecec2e258a6eb38960cf8c8e98e (diff)
Revert "conflict resolution (nw)"
This reverts commit c24473ddff715ecec2e258a6eb38960cf8c8e98e, reversing changes made to 009cba4fb8102102168ef32870892438327f3705.
Diffstat (limited to 'src/lib/netlist/plib/pomp.h')
-rw-r--r--src/lib/netlist/plib/pomp.h28
1 files changed, 8 insertions, 20 deletions
diff --git a/src/lib/netlist/plib/pomp.h b/src/lib/netlist/plib/pomp.h
index f8a516df485..6559207f09d 100644
--- a/src/lib/netlist/plib/pomp.h
+++ b/src/lib/netlist/plib/pomp.h
@@ -11,8 +11,6 @@
#include "pconfig.h"
-#include <cstddef>
-
#if HAS_OPENMP
#include "omp.h"
#endif
@@ -20,39 +18,29 @@
namespace plib {
namespace omp {
-template <typename I, class T>
-void for_static(const I start, const I end, const T &what)
+template <class T>
+void for_static(const int start, const int end, const T &what)
{
#if HAS_OPENMP && USE_OPENMP
#pragma omp parallel
#endif
{
#if HAS_OPENMP && USE_OPENMP
- #pragma omp for //schedule(static)
+ #pragma omp for schedule(static)
#endif
- for (I i = start; i < end; i++)
+ for (int i = start; i < end; i++)
what(i);
}
}
-template <typename I, class T>
-void for_static_np(const I start, const I end, const T &what)
-{
- for (I i = start; i < end; i++)
- what(i);
-}
-
-
-inline void set_num_threads(const std::size_t threads)
+inline void set_num_threads(const int threads)
{
#if HAS_OPENMP && USE_OPENMP
omp_set_num_threads(threads);
-#else
- plib::unused_var(threads);
#endif
}
-inline std::size_t get_max_threads()
+inline int get_max_threads()
{
#if HAS_OPENMP && USE_OPENMP
return omp_get_max_threads();
@@ -66,7 +54,7 @@ inline std::size_t get_max_threads()
// pdynlib: dynamic loading of libraries ...
// ----------------------------------------------------------------------------------------
-} // namespace omp
-} // namespace plib
+}
+}
#endif /* PSTRING_H_ */