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
mpim-sw
cdo
Commits
87fe82a0
Commit
87fe82a0
authored
Dec 26, 2017
by
Uwe Schulzweida
Browse files
kdtree: added omp array reduction for min/max.
parent
0e584f3d
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/grid_search.cc
View file @
87fe82a0
...
...
@@ -195,9 +195,8 @@ void *gs_create_kdtree(size_t n, const double *restrict lons, const double *rest
kdata_t
min
[
3
],
max
[
3
];
min
[
0
]
=
min
[
1
]
=
min
[
2
]
=
1e9
;
max
[
0
]
=
max
[
1
]
=
max
[
2
]
=
-
1e9
;
#if defined(HAVE_OPENMP4)
// failed with INTEL CC: error: 'min' has invalid type for 'reduction'
// #pragma omp parallel for reduction(min: min) reduction(max: max)
#if defined(HAVE_OPENMP45)
#pragma omp parallel for reduction(min: min[:3]) reduction(max: max[:3])
#endif
for
(
size_t
i
=
0
;
i
<
n
;
i
++
)
{
...
...
@@ -237,9 +236,8 @@ void *gs_create_nanoflann(size_t n, const double *restrict lons, const double *r
max
[
0
]
=
max
[
1
]
=
max
[
2
]
=
-
1e9
;
// Generating Point Cloud
pointcloud
->
pts
.
resize
(
n
);
#if defined(HAVE_OPENMP4)
// failed with INTEL CC: error: 'min' has invalid type for 'reduction'
// #pragma omp parallel for reduction(min: min) reduction(max: max)
#if defined(HAVE_OPENMP45)
#pragma omp parallel for reduction(min: min[:3]) reduction(max: max[:3])
#endif
for
(
size_t
i
=
0
;
i
<
n
;
i
++
)
{
...
...
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