Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Reinecke
ducc
Commits
24c778c6
Commit
24c778c6
authored
Aug 18, 2020
by
Martin Reinecke
Browse files
more ExecParallel and more aggressive testing
parent
2803837f
Pipeline
#80692
passed with stages
in 15 minutes and 20 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
python/gridder_cxx.h
View file @
24c778c6
...
...
@@ -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
exec
Static
(
nvis
,
nthreads
,
0
,
[
&
](
Scheduler
&
sched
)
exec
Parallel
(
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
exec
Static
(
nvis
,
nthreads
,
0
,
[
&
](
Scheduler
&
sched
)
exec
Parallel
(
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
...
...
python/test/test_wgridder.py
View file @
24c778c6
...
...
@@ -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
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment