Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nifty_gridder
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ift
nifty_gridder
Commits
a32ddf0c
Commit
a32ddf0c
authored
6 years ago
by
Martin Reinecke
Browse files
Options
Downloads
Patches
Plain Diff
more OpenMP
parent
b6860082
No related branches found
No related tags found
1 merge request
!4
Merge new developments into master
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
nifty_gridder.cc
+7
-0
7 additions, 0 deletions
nifty_gridder.cc
with
7 additions
and
0 deletions
nifty_gridder.cc
+
7
−
0
View file @
a32ddf0c
...
...
@@ -308,6 +308,7 @@ template<typename T> pyarr_c<T> complex2hartley
auto
res
=
makearray
<
T
>
({
nu
,
nv
});
auto
grid2
=
res
.
mutable_data
();
#pragma omp parallel for
for
(
size_t
u
=
0
;
u
<
nu
;
++
u
)
{
size_t
xu
=
(
u
==
0
)
?
0
:
nu
-
u
;
...
...
@@ -332,6 +333,7 @@ template<typename T> pyarr_c<complex<T>> hartley2complex
auto
res
=
makearray
<
complex
<
T
>>
({
nu
,
nv
});
auto
grid2
=
res
.
mutable_data
();
#pragma omp parallel for
for
(
size_t
u
=
0
;
u
<
nu
;
++
u
)
{
size_t
xu
=
(
u
==
0
)
?
0
:
nu
-
u
;
...
...
@@ -356,6 +358,7 @@ template<typename T> void hartley2_2D(const pyarr_c<T> &in, pyarr_c<T> &out)
{
out
.
strides
(
0
),
out
.
strides
(
1
)},
{
0
,
1
},
in
.
data
(),
out
.
mutable_data
(),
T
(
1
),
0
);
auto
ptmp
=
out
.
mutable_data
();
#pragma omp parallel for
for
(
size_t
i
=
1
;
i
<
(
nu
+
1
)
/
2
;
++
i
)
for
(
size_t
j
=
1
;
j
<
(
nv
+
1
)
/
2
;
++
j
)
{
...
...
@@ -384,6 +387,7 @@ vector<double> correction_factors (size_t n, size_t nval, size_t w)
for
(
auto
&
v
:
psi
)
v
=
exp
(
beta
*
(
sqrt
(
1
-
v
*
v
)
-
1.
));
vector
<
double
>
res
(
nval
);
#pragma omp parallel for schedule(static)
for
(
size_t
k
=
0
;
k
<
nval
;
++
k
)
{
double
tmp
=
0
;
...
...
@@ -490,6 +494,7 @@ template<typename T> class Baselines
auto
res
=
makearray
<
T2
>
({
nvis
});
auto
vis
=
res
.
mutable_data
();
#pragma omp parallel for
for
(
size_t
i
=
0
;
i
<
nvis
;
++
i
)
vis
[
i
]
=
ms
[
offset
(
idx
[
i
])];
return
res
;
...
...
@@ -509,6 +514,7 @@ template<typename T> class Baselines
auto
ms
=
res
.
mutable_data
();
for
(
size_t
i
=
0
;
i
<
nrows
*
nchan
;
++
i
)
ms
[
i
]
=
T2
(
0
);
#pragma omp parallel for
for
(
size_t
i
=
0
;
i
<
nvis
;
++
i
)
ms
[
offset
(
idx
[
i
])]
=
vis
[
i
];
return
res
;
...
...
@@ -528,6 +534,7 @@ template<typename T> class Baselines
auto
vis
=
vis_
.
data
();
auto
ms
=
ms_
.
mutable_data
();
#pragma omp parallel for
for
(
size_t
i
=
0
;
i
<
nvis
;
++
i
)
ms
[
offset
(
idx
[
i
])]
+=
vis
[
i
];
return
ms_
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment