Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Martin Reinecke
ducc
Commits
01285910
Commit
01285910
authored
Sep 10, 2020
by
Martin Reinecke
Browse files
remove mask variable, it doesn't help much
parent
8ac0f4ae
Pipeline
#81935
passed with stages
in 12 minutes and 46 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
python/gridder_cxx.h
View file @
01285910
...
...
@@ -269,7 +269,6 @@ template<typename T> class Params
double
wmin
,
dw
;
size_t
nplanes
;
double
nm1min
;
vector
<
uint8_t
>
active
;
size_t
nu
,
nv
;
double
ofactor
;
...
...
@@ -574,9 +573,15 @@ template<typename T> class Params
struct
bufmap
{
Vmap
m
;
uint64_t
dummy
[
8
];
uint64_t
dummy
[
8
];
// separator to keep every entry on a different cache line
};
vector
<
bufmap
>
buf
(
nthreads
);
bool
have_wgt
=
wgt
.
size
()
!=
0
;
if
(
have_wgt
)
checkShape
(
wgt
.
shape
(),{
nrow
,
nchan
});
bool
have_ms
=
ms_in
.
size
()
!=
0
;
if
(
have_ms
)
checkShape
(
ms_in
.
shape
(),
{
nrow
,
nchan
});
bool
have_mask
=
mask
.
size
()
!=
0
;
if
(
have_mask
)
checkShape
(
mask
.
shape
(),
{
nrow
,
nchan
});
execParallel
(
nrow
,
nthreads
,
[
&
](
size_t
tid
,
size_t
lo
,
size_t
hi
)
{
auto
&
mymap
(
buf
[
tid
].
m
);
...
...
@@ -587,7 +592,9 @@ template<typename T> class Params
size_t
chan0
=
0
;
for
(
size_t
ichan
=
0
;
ichan
<
nchan
;
++
ichan
)
{
if
(
active
[
irow
*
nchan
+
ichan
])
if
(((
!
have_ms
)
||
(
norm
(
ms_in
(
irow
,
ichan
))
!=
0
))
&&
((
!
have_wgt
)
||
(
wgt
(
irow
,
ichan
)
!=
0
))
&&
((
!
have_mask
)
||
(
mask
(
irow
,
ichan
)
!=
0
)))
{
auto
uvw
=
bl
.
effectiveCoord
(
irow
,
ichan
);
if
(
uvw
.
w
<
0
)
uvw
.
Flip
();
...
...
@@ -623,7 +630,6 @@ template<typename T> class Params
});
// free mask memory
vector
<
uint8_t
>
().
swap
(
active
);
timers
.
poppush
(
"range merging"
);
size_t
nth
=
nthreads
;
while
(
nth
>
1
)
...
...
@@ -1280,7 +1286,6 @@ template<typename T> class Params
bool
have_mask
=
mask
.
size
()
!=
0
;
if
(
have_mask
)
checkShape
(
mask
.
shape
(),
{
nrow
,
nchan
});
active
.
resize
(
nrow
*
nchan
,
0
);
nvis
=
0
;
wmin_d
=
1e300
;
wmax_d
=-
1e300
;
...
...
@@ -1296,7 +1301,6 @@ template<typename T> class Params
((
!
have_mask
)
||
(
mask
(
irow
,
ichan
)
!=
0
)))
{
++
lnvis
;
active
[
irow
*
nchan
+
ichan
]
=
1
;
auto
uvw
=
bl
.
effectiveCoord
(
irow
,
ichan
);
double
w
=
abs
(
uvw
.
w
);
lwmin_d
=
min
(
lwmin_d
,
w
);
...
...
Write
Preview
Markdown
is supported
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