diff options
author | 2019-01-30 02:28:55 +0100 | |
---|---|---|
committer | 2019-01-31 01:03:35 +0100 | |
commit | 1513c777b47d19c7df99ba43142d7a334392a0b5 (patch) | |
tree | 1698a72b6f570e579d9fe409ecb87c18108d5f1a /src/lib/netlist/plib/pomp.h | |
parent | 3d09dec7b80bfaaed75d04ace63fcdc7a289f68a (diff) |
netlist: Refactoring continues ... plus some innovations (nw)
Still some work ahead to separate interface from execution. This is a
preparation to switch to another sparse matrix format easily which may
be better suited for parallel processing.
On the linear algebra side there are some nice additions:
- Two additional sort modes: One tries to obtain a upper left identity
matrix, the other prefers a diagonal band matrix structure. Both deliver
slightly better performance than just sorting.
- Parallel execution analysis for Gaussian elimination and LU solve.
This determines which operations may be done independently.
All of this is not really useful right now. The matrix sizes are below
100 nets. I estimate that we at least need four times more so that CPU
parallel processing overhead pays off. For GPU, add another order. But
it's nice to have code which may scale.
Diffstat (limited to 'src/lib/netlist/plib/pomp.h')
-rw-r--r-- | src/lib/netlist/plib/pomp.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/netlist/plib/pomp.h b/src/lib/netlist/plib/pomp.h index f13df2539ac..19b39466025 100644 --- a/src/lib/netlist/plib/pomp.h +++ b/src/lib/netlist/plib/pomp.h @@ -28,13 +28,21 @@ void for_static(const I start, const I end, const T &what) #endif { #if HAS_OPENMP && USE_OPENMP - #pragma omp for schedule(static) + #pragma omp for //schedule(static) #endif for (I 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) { #if HAS_OPENMP && USE_OPENMP |