Commit 24c778c6 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

more ExecParallel and more aggressive testing

parent 2803837f
Pipeline #80692 passed with stages
in 15 minutes and 20 seconds
......@@ -1119,10 +1119,11 @@ template<typename T, typename Serv> class WgridHelper
// more efficient: precalculate final vector sizes and avoid reallocations
vector<int> p0(nvis);
mav<size_t,2> cnt({nthreads, nplanes+16}); // safety distance against false sharing
execStatic(nvis, nthreads, 0, [&](Scheduler &sched)
execParallel(nthreads, [&](Scheduler &sched)
{
auto tid=sched.thread_num();
while (auto rng=sched.getNext()) for(auto i=rng.lo; i<rng.hi; ++i)
auto [lo, hi] = calcShare(nthreads, tid, nvis);
for(auto i=lo; i<hi; ++i)
{
p0[i] = max(0,int(1+(abs(srv.getCoord(i).w)-(0.5*supp*dw)-wmin)/dw));
++cnt.v(tid, p0[i]);
......@@ -1142,10 +1143,11 @@ template<typename T, typename Serv> class WgridHelper
}
// fill minplane
execStatic(nvis, nthreads, 0, [&](Scheduler &sched)
execParallel(nthreads, [&](Scheduler &sched)
{
auto tid=sched.thread_num();
while (auto rng=sched.getNext()) for(auto i=rng.lo; i<rng.hi; ++i)
auto [lo, hi] = calcShare(nthreads, tid, nvis);
for(auto i=lo; i<hi; ++i)
minplane[p0[i]][cnt.v(tid,p0[i])++]=idx_t(i);
});
#endif
......
......@@ -74,7 +74,7 @@ def explicit_gridder(uvw, freq, ms, wgt, nxdirty, nydirty, xpixsize, ypixsize,
@pmp("singleprec", (True, False))
@pmp("wstacking", (True, False))
@pmp("use_wgt", (True, False))
@pmp("nthreads", (1, 2))
@pmp("nthreads", (1, 2, 7))
def test_adjointness_ms2dirty(nxdirty, nydirty, ofactor, nrow, nchan, epsilon,
singleprec, wstacking, use_wgt, nthreads):
if singleprec and epsilon < 5e-5:
......@@ -119,7 +119,7 @@ def test_adjointness_ms2dirty(nxdirty, nydirty, ofactor, nrow, nchan, epsilon,
@pmp("singleprec", (False,))
@pmp("wstacking", (False, True))
@pmp("use_wgt", (True,))
@pmp("nthreads", (1, 2))
@pmp("nthreads", (1, 2, 7))
@pmp("fov", (1., 20.))
def test_ms2dirty_against_wdft2(nxdirty, nydirty, ofactor, nrow, nchan, epsilon, singleprec, wstacking, use_wgt, fov, nthreads):
if singleprec and epsilon < 5e-5:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment