Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cdo
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor 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
mpim-sw
cdo
Commits
80bf8d23
Commit
80bf8d23
authored
11 months ago
by
Uwe Schulzweida
Browse files
Options
Downloads
Patches
Plain Diff
remap_bicubic: allocate and init srcGridMask (bug fix)
parent
47d55d9d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!225
M214003/develop
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/remap_bicubic.cc
+11
-4
11 additions, 4 deletions
src/remap_bicubic.cc
src/remap_bilinear.cc
+1
-1
1 addition, 1 deletion
src/remap_bilinear.cc
with
12 additions
and
5 deletions
src/remap_bicubic.cc
+
11
−
4
View file @
80bf8d23
...
...
@@ -61,12 +61,10 @@ renormalize_weights(const double (&srcLats)[4], double (&weights)[4][4])
}
static
void
bicubic_sort_weights
(
size_t
(
&
indices
)[
4
],
double
(
&
weights
)[
4
][
4
])
bicubic_sort_weights
_by_index
(
size_t
(
&
indices
)[
4
],
double
(
&
weights
)[
4
][
4
])
{
constexpr
size_t
numWeights
=
4
;
if
(
is_sorted_list
(
numWeights
,
indices
))
return
;
struct
IndexWeightX
{
size_t
index
;
...
...
@@ -90,6 +88,15 @@ bicubic_sort_weights(size_t (&indices)[4], double (&weights)[4][4])
}
}
static
void
bicubic_sort_weights
(
size_t
(
&
indices
)[
4
],
double
(
&
weights
)[
4
][
4
])
{
constexpr
size_t
numWeights
=
4
;
if
(
is_sorted_list
(
numWeights
,
indices
))
return
;
bicubic_sort_weights_by_index
(
indices
,
weights
);
}
static
void
bicubic_warning
()
{
...
...
@@ -238,7 +245,7 @@ remap_bicubic(RemapSearch &rsearch, const Varray<T> &srcArray, Varray<T> &tgtArr
auto
tgtGridSize
=
tgtGrid
->
size
;
auto
srcGridSize
=
srcGrid
->
size
;
Varray
<
short
>
srcGridMask
;
Varray
<
short
>
srcGridMask
(
srcGridSize
,
1
)
;
if
(
numMissVals
)
remap_set_mask
(
srcGridSize
,
srcArray
,
numMissVals
,
missval
,
srcGridMask
);
// Compute mappings from source to target grid
...
...
This diff is collapsed.
Click to expand it.
src/remap_bilinear.cc
+
1
−
1
View file @
80bf8d23
...
...
@@ -135,7 +135,7 @@ bilinear_sort_weights_by_index_zip(size_t (&indices)[4], double (&weights)[4])
}
#endif
void
static
void
bilinear_sort_weights_by_index
(
size_t
(
&
indices
)[
4
],
double
(
&
weights
)[
4
])
{
constexpr
size_t
numWeights
=
4
;
...
...
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