summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/plib/pomp.h
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2019-01-11 21:50:43 +0100
committer couriersud <couriersud@gmx.org>2019-01-11 21:50:43 +0100
commitf12f735f54966b992d23d0502027e8e6d9e1dd95 (patch)
tree7f47ac7064a18b24fd1d7ecc5ff5fa0e1cbf47f4 /src/lib/netlist/plib/pomp.h
parenta14dc4158fc1b1dd9fd1e45c6649ef048775625a (diff)
Fix clang-8 warnings. (nw)
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 6559207f09d..221c0d61c00 100644
--- a/src/lib/netlist/plib/pomp.h
+++ b/src/lib/netlist/plib/pomp.h
@@ -18,8 +18,8 @@
namespace plib {
namespace omp {
-template <class T>
-void for_static(const int start, const int 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
#pragma omp parallel
@@ -28,19 +28,19 @@ void for_static(const int start, const int end, const T &what)
#if HAS_OPENMP && USE_OPENMP
#pragma omp for schedule(static)
#endif
- for (int i = start; i < end; i++)
+ for (I i = start; i < end; i++)
what(i);
}
}
-inline void set_num_threads(const int threads)
+inline void set_num_threads(const std::size_t threads)
{
#if HAS_OPENMP && USE_OPENMP
omp_set_num_threads(threads);
#endif
}
-inline int get_max_threads()
+inline std::size_t get_max_threads()
{
#if HAS_OPENMP && USE_OPENMP
return omp_get_max_threads();