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
c37e0714
Commit
c37e0714
authored
Jan 12, 2018
by
Uwe Schulzweida
Browse files
Test.
parent
9156b649
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/grid_search.cc
View file @
c37e0714
...
...
@@ -204,14 +204,16 @@ void *gs_create_kdtree(size_t n, const double *restrict lons, const double *rest
pointlist
[
i
].
index
=
i
;
}
if
(
cdoVerbose
)
printf
(
"BBOX: min=%g/%g/%g max=%g/%g/%g
\n
"
,
min
[
0
],
min
[
1
],
min
[
2
],
max
[
0
],
max
[
1
],
max
[
2
]);
for
(
unsigned
j
=
0
;
j
<
3
;
++
j
)
{
// min[j] = min[j] < 0 ? min[j]*1.01 : min[j]*0.99;
// max[j] = max[j] < 0 ? max[j]*0.99 : max[j]*1.01;
gs
->
min
[
j
]
=
min
[
j
];
gs
->
max
[
j
]
=
max
[
j
];
}
if
(
cdoVerbose
)
printf
(
"BBOX: min=%g/%g/%g max=%g/%g/%g
\n
"
,
min
[
0
],
min
[
1
],
min
[
2
],
max
[
0
],
max
[
1
],
max
[
2
]);
kdTree_t
*
kdt
=
kd_buildTree
(
pointlist
,
n
,
min
,
max
,
3
,
ompNumThreads
);
if
(
pointlist
)
Free
(
pointlist
);
if
(
kdt
==
NULL
)
cdoAbort
(
"kd_buildTree failed!"
);
...
...
@@ -248,8 +250,11 @@ void *gs_create_nanoflann(size_t n, const double *restrict lons, const double *r
}
gs
->
pointcloud
=
(
void
*
)
pointcloud
;
for
(
unsigned
j
=
0
;
j
<
3
;
++
j
)
{
min
[
j
]
=
min
[
j
]
<
0
?
min
[
j
]
*
1.01
:
min
[
j
]
*
0.99
;
max
[
j
]
=
max
[
j
]
<
0
?
max
[
j
]
*
0.99
:
max
[
j
]
*
1.01
;
gs
->
min
[
j
]
=
min
[
j
];
gs
->
max
[
j
]
=
max
[
j
];
}
...
...
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