diff options
author | 2019-10-29 19:55:53 +0100 | |
---|---|---|
committer | 2019-10-29 19:55:53 +0100 | |
commit | cac86fb1b4e23602ebf3b84465b687b6301736e3 (patch) | |
tree | 1990e822ff2c8f0ed2d57fd44dd0807562095586 /src/lib/netlist/plib/pomp.h | |
parent | 316ee65978963211783fab69b089ef750f989060 (diff) |
netlist: code maintenance. (nw)
- Removed code no longer used
- Add noexcept where appropriate
- split pparser.[c|h] into ppreprocessor and ptokenizer
- smaller optimizations, e.g. use of std::size_t
- fix lint warnings
Diffstat (limited to 'src/lib/netlist/plib/pomp.h')
-rw-r--r-- | src/lib/netlist/plib/pomp.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/netlist/plib/pomp.h b/src/lib/netlist/plib/pomp.h index 79fa0f4bf9b..26e037bca1d 100644 --- a/src/lib/netlist/plib/pomp.h +++ b/src/lib/netlist/plib/pomp.h @@ -22,7 +22,7 @@ namespace plib { namespace omp { template <typename I, class T> -void for_static(std::size_t numops, const I start, const I end, const T &what) +void for_static(std::size_t numops, const I start, const I end, const T &what) noexcept(noexcept(what)) { if (numops>1000) { @@ -38,7 +38,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) +void for_static(const I start, const I end, const T &what) noexcept(noexcept(what)) { #if PHAS_OPENMP && PUSE_OPENMP #pragma omp parallel for schedule(static) @@ -48,14 +48,14 @@ void for_static(const I start, const I end, const T &what) } template <typename I, class T> -void for_static_np(const I start, const I end, const T &what) +void for_static_np(const I start, const I end, const T &what) noexcept(noexcept(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 std::size_t threads) noexcept { #if PHAS_OPENMP && PUSE_OPENMP omp_set_num_threads(threads); @@ -64,7 +64,7 @@ inline void set_num_threads(const std::size_t threads) #endif } -inline std::size_t get_max_threads() +inline std::size_t get_max_threads() noexcept { #if PHAS_OPENMP && PUSE_OPENMP return omp_get_max_threads(); |