Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
aaa4096b
Commit
aaa4096b
authored
Oct 16, 2020
by
Uwe Schulzweida
Browse files
Renamed wgts to weights.
parent
d8afcd61
Changes
5
Hide whitespace changes
Inline
Side-by-side
src/remap_bicubic.cc
View file @
aaa4096b
...
...
@@ -27,7 +27,7 @@
// bicubic interpolation
static
void
bicubicSetWeights
(
double
iw
,
double
jw
,
double
(
&
w
g
ts
)[
4
][
4
])
bicubicSetWeights
(
double
iw
,
double
jw
,
double
(
&
w
eigh
ts
)[
4
][
4
])
{
const
auto
iw1
=
iw
*
iw
*
(
iw
-
1.
);
const
auto
iw2
=
iw
*
(
iw
-
1.
)
*
(
iw
-
1.
);
...
...
@@ -36,22 +36,22 @@ bicubicSetWeights(double iw, double jw, double (&wgts)[4][4])
const
auto
jw2
=
jw
*
(
jw
-
1.
)
*
(
jw
-
1.
);
const
auto
jw3
=
jw
*
jw
*
(
3.
-
2.
*
jw
);
// clang-format off
w
g
ts
[
0
][
0
]
=
(
1.
-
jw3
)
*
(
1.
-
iw3
);
w
g
ts
[
1
][
0
]
=
(
1.
-
jw3
)
*
iw3
;
w
g
ts
[
2
][
0
]
=
jw3
*
iw3
;
w
g
ts
[
3
][
0
]
=
jw3
*
(
1.
-
iw3
);
w
g
ts
[
0
][
1
]
=
(
1.
-
jw3
)
*
iw2
;
w
g
ts
[
1
][
1
]
=
(
1.
-
jw3
)
*
iw1
;
w
g
ts
[
2
][
1
]
=
jw3
*
iw1
;
w
g
ts
[
3
][
1
]
=
jw3
*
iw2
;
w
g
ts
[
0
][
2
]
=
jw2
*
(
1.
-
iw3
);
w
g
ts
[
1
][
2
]
=
jw2
*
iw3
;
w
g
ts
[
2
][
2
]
=
jw1
*
iw3
;
w
g
ts
[
3
][
2
]
=
jw1
*
(
1.
-
iw3
);
w
g
ts
[
0
][
3
]
=
jw2
*
iw2
;
w
g
ts
[
1
][
3
]
=
jw2
*
iw1
;
w
g
ts
[
2
][
3
]
=
jw1
*
iw1
;
w
g
ts
[
3
][
3
]
=
jw1
*
iw2
;
w
eigh
ts
[
0
][
0
]
=
(
1.
-
jw3
)
*
(
1.
-
iw3
);
w
eigh
ts
[
1
][
0
]
=
(
1.
-
jw3
)
*
iw3
;
w
eigh
ts
[
2
][
0
]
=
jw3
*
iw3
;
w
eigh
ts
[
3
][
0
]
=
jw3
*
(
1.
-
iw3
);
w
eigh
ts
[
0
][
1
]
=
(
1.
-
jw3
)
*
iw2
;
w
eigh
ts
[
1
][
1
]
=
(
1.
-
jw3
)
*
iw1
;
w
eigh
ts
[
2
][
1
]
=
jw3
*
iw1
;
w
eigh
ts
[
3
][
1
]
=
jw3
*
iw2
;
w
eigh
ts
[
0
][
2
]
=
jw2
*
(
1.
-
iw3
);
w
eigh
ts
[
1
][
2
]
=
jw2
*
iw3
;
w
eigh
ts
[
2
][
2
]
=
jw1
*
iw3
;
w
eigh
ts
[
3
][
2
]
=
jw1
*
(
1.
-
iw3
);
w
eigh
ts
[
0
][
3
]
=
jw2
*
iw2
;
w
eigh
ts
[
1
][
3
]
=
jw2
*
iw1
;
w
eigh
ts
[
2
][
3
]
=
jw1
*
iw1
;
w
eigh
ts
[
3
][
3
]
=
jw1
*
iw2
;
// clang-format on
}
...
...
@@ -59,14 +59,14 @@ template <typename T>
int
num_src_points
(
const
Varray
<
T
>
&
mask
,
const
size_t
(
&
src_add
)[
4
],
double
(
&
src_lats
)[
4
]);
static
void
renormalizeWeights
(
const
double
(
&
src_lats
)[
4
],
double
(
&
w
g
ts
)[
4
][
4
])
renormalizeWeights
(
const
double
(
&
src_lats
)[
4
],
double
(
&
w
eigh
ts
)[
4
][
4
])
{
double
sum_w
g
ts
=
0.0
;
// sum of weights for normalization
for
(
unsigned
n
=
0
;
n
<
4
;
++
n
)
sum_w
g
ts
+=
std
::
fabs
(
src_lats
[
n
]);
for
(
unsigned
n
=
0
;
n
<
4
;
++
n
)
w
g
ts
[
n
][
0
]
=
std
::
fabs
(
src_lats
[
n
])
/
sum_w
g
ts
;
for
(
unsigned
n
=
0
;
n
<
4
;
++
n
)
w
g
ts
[
n
][
1
]
=
0.
;
for
(
unsigned
n
=
0
;
n
<
4
;
++
n
)
w
g
ts
[
n
][
2
]
=
0.
;
for
(
unsigned
n
=
0
;
n
<
4
;
++
n
)
w
g
ts
[
n
][
3
]
=
0.
;
double
sum_w
eigh
ts
=
0.0
;
// sum of weights for normalization
for
(
unsigned
n
=
0
;
n
<
4
;
++
n
)
sum_w
eigh
ts
+=
std
::
fabs
(
src_lats
[
n
]);
for
(
unsigned
n
=
0
;
n
<
4
;
++
n
)
w
eigh
ts
[
n
][
0
]
=
std
::
fabs
(
src_lats
[
n
])
/
sum_w
eigh
ts
;
for
(
unsigned
n
=
0
;
n
<
4
;
++
n
)
w
eigh
ts
[
n
][
1
]
=
0.
;
for
(
unsigned
n
=
0
;
n
<
4
;
++
n
)
w
eigh
ts
[
n
][
2
]
=
0.
;
for
(
unsigned
n
=
0
;
n
<
4
;
++
n
)
w
eigh
ts
[
n
][
3
]
=
0.
;
}
static
void
...
...
@@ -82,7 +82,7 @@ bicubicWarning()
}
static
double
bicubicRemap
(
const
double
*
restrict
src_array
,
const
double
(
&
w
g
ts
)[
4
][
4
],
const
size_t
(
&
src_add
)[
4
],
const
RemapGradients
&
gradients
)
bicubicRemap
(
const
double
*
restrict
src_array
,
const
double
(
&
w
eigh
ts
)[
4
][
4
],
const
size_t
(
&
src_add
)[
4
],
const
RemapGradients
&
gradients
)
{
const
auto
&
glat
=
gradients
.
grad_lat
;
const
auto
&
glon
=
gradients
.
grad_lon
;
...
...
@@ -90,8 +90,8 @@ bicubicRemap(const double *restrict src_array, const double (&wgts)[4][4], const
double
tgt_point
=
0.
;
for
(
unsigned
n
=
0
;
n
<
4
;
++
n
)
tgt_point
+=
src_array
[
src_add
[
n
]]
*
w
g
ts
[
n
][
0
]
+
glat
[
src_add
[
n
]]
*
w
g
ts
[
n
][
1
]
+
glon
[
src_add
[
n
]]
*
w
g
ts
[
n
][
2
]
+
glatlon
[
src_add
[
n
]]
*
w
g
ts
[
n
][
3
];
tgt_point
+=
src_array
[
src_add
[
n
]]
*
w
eigh
ts
[
n
][
0
]
+
glat
[
src_add
[
n
]]
*
w
eigh
ts
[
n
][
1
]
+
glon
[
src_add
[
n
]]
*
w
eigh
ts
[
n
][
2
]
+
glatlon
[
src_add
[
n
]]
*
w
eigh
ts
[
n
][
3
];
return
tgt_point
;
}
...
...
@@ -145,10 +145,10 @@ remapBicubicWeights(RemapSearch &rsearch, RemapVars &rv)
const
auto
llpoint
=
remapgrid_get_lonlat
(
tgt_grid
,
tgt_cell_add
);
size_t
src_add
[
4
];
// address for the four source points
double
src_lats
[
4
];
// latitudes of four bilinear corners
double
src_lons
[
4
];
// longitudes of four bilinear corners
double
w
g
ts
[
4
][
4
];
// bicubic weights for four corners
size_t
src_add
[
4
];
// address for the four source points
double
src_lats
[
4
];
// latitudes of four bilinear corners
double
src_lons
[
4
];
// longitudes of four bilinear corners
double
w
eigh
ts
[
4
][
4
];
// bicubic weights for four corners
// Find nearest square of grid points on source grid
auto
search_result
=
remapSearchSquare
(
rsearch
,
llpoint
,
src_add
,
src_lats
,
src_lons
);
...
...
@@ -169,8 +169,8 @@ remapBicubicWeights(RemapSearch &rsearch, RemapVars &rv)
if
(
remapFindWeights
(
llpoint
,
src_lons
,
src_lats
,
&
iw
,
&
jw
))
{
// Successfully found iw,jw - compute weights
bicubicSetWeights
(
iw
,
jw
,
w
g
ts
);
store_weightlinks_bicubic
(
src_add
,
w
g
ts
,
tgt_cell_add
,
weightLinks
);
bicubicSetWeights
(
iw
,
jw
,
w
eigh
ts
);
store_weightlinks_bicubic
(
src_add
,
w
eigh
ts
,
tgt_cell_add
,
weightLinks
);
}
else
{
...
...
@@ -186,8 +186,8 @@ remapBicubicWeights(RemapSearch &rsearch, RemapVars &rv)
if
(
num_src_points
(
src_grid
->
mask
,
src_add
,
src_lats
)
>
0
)
{
tgt_grid
->
cell_frac
[
tgt_cell_add
]
=
1.
;
renormalizeWeights
(
src_lats
,
w
g
ts
);
store_weightlinks_bicubic
(
src_add
,
w
g
ts
,
tgt_cell_add
,
weightLinks
);
renormalizeWeights
(
src_lats
,
w
eigh
ts
);
store_weightlinks_bicubic
(
src_add
,
w
eigh
ts
,
tgt_cell_add
,
weightLinks
);
}
}
}
...
...
@@ -257,10 +257,10 @@ remapBicubic(RemapSearch &rsearch, const double *restrict src_array, double *res
const
auto
llpoint
=
remapgrid_get_lonlat
(
tgt_grid
,
tgt_cell_add
);
size_t
src_add
[
4
];
// address for the four source points
double
src_lats
[
4
];
// latitudes of four bilinear corners
double
src_lons
[
4
];
// longitudes of four bilinear corners
double
w
g
ts
[
4
][
4
];
// bicubic weights for four corners
size_t
src_add
[
4
];
// address for the four source points
double
src_lats
[
4
];
// latitudes of four bilinear corners
double
src_lons
[
4
];
// longitudes of four bilinear corners
double
w
eigh
ts
[
4
][
4
];
// bicubic weights for four corners
// Find nearest square of grid points on source grid
auto
search_result
=
remapSearchSquare
(
rsearch
,
llpoint
,
src_add
,
src_lats
,
src_lons
);
...
...
@@ -281,9 +281,9 @@ remapBicubic(RemapSearch &rsearch, const double *restrict src_array, double *res
if
(
remapFindWeights
(
llpoint
,
src_lons
,
src_lats
,
&
iw
,
&
jw
))
{
// Successfully found iw,jw - compute weights
bicubicSetWeights
(
iw
,
jw
,
w
g
ts
);
sort_add_and_w
g
ts_bicubic
(
src_add
,
w
g
ts
);
tgt_array
[
tgt_cell_add
]
=
bicubicRemap
(
src_array
,
w
g
ts
,
src_add
,
gradients
);
bicubicSetWeights
(
iw
,
jw
,
w
eigh
ts
);
sort_add_and_w
eigh
ts_bicubic
(
src_add
,
w
eigh
ts
);
tgt_array
[
tgt_cell_add
]
=
bicubicRemap
(
src_array
,
w
eigh
ts
,
src_add
,
gradients
);
}
else
{
...
...
@@ -299,9 +299,9 @@ remapBicubic(RemapSearch &rsearch, const double *restrict src_array, double *res
if
(
num_src_points
(
src_grid_mask
,
src_add
,
src_lats
)
>
0
)
{
tgt_grid
->
cell_frac
[
tgt_cell_add
]
=
1.
;
renormalizeWeights
(
src_lats
,
w
g
ts
);
sort_add_and_w
g
ts_bicubic
(
src_add
,
w
g
ts
);
tgt_array
[
tgt_cell_add
]
=
bicubicRemap
(
src_array
,
w
g
ts
,
src_add
,
gradients
);
renormalizeWeights
(
src_lats
,
w
eigh
ts
);
sort_add_and_w
eigh
ts_bicubic
(
src_add
,
w
eigh
ts
);
tgt_array
[
tgt_cell_add
]
=
bicubicRemap
(
src_array
,
w
eigh
ts
,
src_add
,
gradients
);
}
}
}
...
...
src/remap_bilinear.cc
View file @
aaa4096b
...
...
@@ -93,13 +93,13 @@ remapFindWeights(const LonLatPoint &llpoint, const double (&src_lons)[4], const
}
static
void
bilinearSetWeights
(
double
iw
,
double
jw
,
double
(
&
w
g
ts
)[
4
])
bilinearSetWeights
(
double
iw
,
double
jw
,
double
(
&
w
eigh
ts
)[
4
])
{
// clang-format off
w
g
ts
[
0
]
=
(
1.
-
iw
)
*
(
1.
-
jw
);
w
g
ts
[
1
]
=
iw
*
(
1.
-
jw
);
w
g
ts
[
2
]
=
iw
*
jw
;
w
g
ts
[
3
]
=
(
1.
-
iw
)
*
jw
;
w
eigh
ts
[
0
]
=
(
1.
-
iw
)
*
(
1.
-
jw
);
w
eigh
ts
[
1
]
=
iw
*
(
1.
-
jw
);
w
eigh
ts
[
2
]
=
iw
*
jw
;
w
eigh
ts
[
3
]
=
(
1.
-
iw
)
*
jw
;
// clang-format on
}
...
...
@@ -125,11 +125,11 @@ template int num_src_points(const Varray<uint8_t> &mask, const size_t (&src_add)
template
int
num_src_points
(
const
Varray
<
int
>
&
mask
,
const
size_t
(
&
src_add
)[
4
],
double
(
&
src_lats
)[
4
]);
static
void
renormalizeWeights
(
const
double
(
&
src_lats
)[
4
],
double
(
&
w
g
ts
)[
4
])
renormalizeWeights
(
const
double
(
&
src_lats
)[
4
],
double
(
&
w
eigh
ts
)[
4
])
{
double
sum_w
g
ts
=
0.0
;
// sum of weights for normalization
for
(
unsigned
n
=
0
;
n
<
4
;
++
n
)
sum_w
g
ts
+=
std
::
fabs
(
src_lats
[
n
]);
for
(
unsigned
n
=
0
;
n
<
4
;
++
n
)
w
g
ts
[
n
]
=
std
::
fabs
(
src_lats
[
n
])
/
sum_w
g
ts
;
double
sum_w
eigh
ts
=
0.0
;
// sum of weights for normalization
for
(
unsigned
n
=
0
;
n
<
4
;
++
n
)
sum_w
eigh
ts
+=
std
::
fabs
(
src_lats
[
n
]);
for
(
unsigned
n
=
0
;
n
<
4
;
++
n
)
w
eigh
ts
[
n
]
=
std
::
fabs
(
src_lats
[
n
])
/
sum_w
eigh
ts
;
}
static
void
...
...
@@ -145,12 +145,12 @@ bilinearWarning()
}
static
inline
double
bilinearRemap
(
const
double
*
restrict
src_array
,
const
double
(
&
w
g
ts
)[
4
],
const
size_t
(
&
src_add
)[
4
])
bilinearRemap
(
const
double
*
restrict
src_array
,
const
double
(
&
w
eigh
ts
)[
4
],
const
size_t
(
&
src_add
)[
4
])
{
// *tgt_point = 0.;
// for (unsigned n = 0; n < 4; ++n) *tgt_point += src_array[src_add[n]]*w
g
ts[n];
return
src_array
[
src_add
[
0
]]
*
w
g
ts
[
0
]
+
src_array
[
src_add
[
1
]]
*
w
g
ts
[
1
]
+
src_array
[
src_add
[
2
]]
*
w
g
ts
[
2
]
+
src_array
[
src_add
[
3
]]
*
w
g
ts
[
3
];
// for (unsigned n = 0; n < 4; ++n) *tgt_point += src_array[src_add[n]]*w
eigh
ts[n];
return
src_array
[
src_add
[
0
]]
*
w
eigh
ts
[
0
]
+
src_array
[
src_add
[
1
]]
*
w
eigh
ts
[
1
]
+
src_array
[
src_add
[
2
]]
*
w
eigh
ts
[
2
]
+
src_array
[
src_add
[
3
]]
*
w
eigh
ts
[
3
];
}
// This routine computes the weights for a bilinear interpolation.
...
...
@@ -199,7 +199,7 @@ remapBilinearWeights(RemapSearch &rsearch, RemapVars &rv)
size_t
src_add
[
4
];
// address for the four source points
double
src_lats
[
4
];
// latitudes of four bilinear corners
double
src_lons
[
4
];
// longitudes of four bilinear corners
double
w
g
ts
[
4
];
// bilinear weights for four corners
double
w
eigh
ts
[
4
];
// bilinear weights for four corners
// Find nearest square of grid points on source grid
auto
search_result
=
remapSearchSquare
(
rsearch
,
llpoint
,
src_add
,
src_lats
,
src_lons
);
...
...
@@ -220,8 +220,8 @@ remapBilinearWeights(RemapSearch &rsearch, RemapVars &rv)
if
(
remapFindWeights
(
llpoint
,
src_lons
,
src_lats
,
&
iw
,
&
jw
))
{
// Successfully found iw,jw - compute weights
bilinearSetWeights
(
iw
,
jw
,
w
g
ts
);
store_weightlinks
(
0
,
4
,
src_add
,
w
g
ts
,
tgt_cell_add
,
weightLinks
);
bilinearSetWeights
(
iw
,
jw
,
w
eigh
ts
);
store_weightlinks
(
0
,
4
,
src_add
,
w
eigh
ts
,
tgt_cell_add
,
weightLinks
);
}
else
{
...
...
@@ -239,8 +239,8 @@ remapBilinearWeights(RemapSearch &rsearch, RemapVars &rv)
if
(
num_src_points
(
src_grid
->
mask
,
src_add
,
src_lats
)
>
0
)
{
tgt_grid
->
cell_frac
[
tgt_cell_add
]
=
1.
;
renormalizeWeights
(
src_lats
,
w
g
ts
);
store_weightlinks
(
0
,
4
,
src_add
,
w
g
ts
,
tgt_cell_add
,
weightLinks
);
renormalizeWeights
(
src_lats
,
w
eigh
ts
);
store_weightlinks
(
0
,
4
,
src_add
,
w
eigh
ts
,
tgt_cell_add
,
weightLinks
);
}
}
}
...
...
@@ -303,7 +303,7 @@ remapBilinear(RemapSearch &rsearch, const double *restrict src_array, double *re
size_t
src_add
[
4
];
// address for the four source points
double
src_lats
[
4
];
// latitudes of four bilinear corners
double
src_lons
[
4
];
// longitudes of four bilinear corners
double
w
g
ts
[
4
];
// bilinear weights for four corners
double
w
eigh
ts
[
4
];
// bilinear weights for four corners
// Find nearest square of grid points on source grid
auto
search_result
=
remapSearchSquare
(
rsearch
,
llpoint
,
src_add
,
src_lats
,
src_lons
);
...
...
@@ -324,9 +324,9 @@ remapBilinear(RemapSearch &rsearch, const double *restrict src_array, double *re
if
(
remapFindWeights
(
llpoint
,
src_lons
,
src_lats
,
&
iw
,
&
jw
))
{
// Successfully found iw,jw - compute weights
bilinearSetWeights
(
iw
,
jw
,
w
g
ts
);
sort_add_and_4w
g
ts
(
src_add
,
w
g
ts
);
tgt_array
[
tgt_cell_add
]
=
bilinearRemap
(
src_array
,
w
g
ts
,
src_add
);
bilinearSetWeights
(
iw
,
jw
,
w
eigh
ts
);
sort_add_and_4w
eigh
ts
(
src_add
,
w
eigh
ts
);
tgt_array
[
tgt_cell_add
]
=
bilinearRemap
(
src_array
,
w
eigh
ts
,
src_add
);
}
else
{
...
...
@@ -344,9 +344,9 @@ remapBilinear(RemapSearch &rsearch, const double *restrict src_array, double *re
if
(
num_src_points
(
src_grid_mask
,
src_add
,
src_lats
)
>
0
)
{
tgt_grid
->
cell_frac
[
tgt_cell_add
]
=
1.
;
renormalizeWeights
(
src_lats
,
w
g
ts
);
sort_add_and_4w
g
ts
(
src_add
,
w
g
ts
);
tgt_array
[
tgt_cell_add
]
=
bilinearRemap
(
src_array
,
w
g
ts
,
src_add
);
renormalizeWeights
(
src_lats
,
w
eigh
ts
);
sort_add_and_4w
eigh
ts
(
src_add
,
w
eigh
ts
);
tgt_array
[
tgt_cell_add
]
=
bilinearRemap
(
src_array
,
w
eigh
ts
,
src_add
);
}
}
}
...
...
src/remap_conserv.cc
View file @
aaa4096b
...
...
@@ -758,10 +758,10 @@ remapConservWeights(RemapSearch &rsearch, RemapVars &rv)
}
// remapConservWeights
static
double
conservRemap
(
const
double
*
restrict
src_array
,
size_t
num_weights
,
const
Varray
<
double
>
&
w
g
ts
,
const
std
::
vector
<
size_t
>
&
src_add
)
conservRemap
(
const
double
*
restrict
src_array
,
size_t
num_weights
,
const
Varray
<
double
>
&
w
eigh
ts
,
const
std
::
vector
<
size_t
>
&
src_add
)
{
double
tgt_point
=
0.
;
for
(
size_t
i
=
0
;
i
<
num_weights
;
++
i
)
tgt_point
+=
src_array
[
src_add
[
i
]]
*
w
g
ts
[
i
];
for
(
size_t
i
=
0
;
i
<
num_weights
;
++
i
)
tgt_point
+=
src_array
[
src_add
[
i
]]
*
w
eigh
ts
[
i
];
return
tgt_point
;
}
...
...
@@ -948,7 +948,7 @@ remapConserv(NormOpt normOpt, RemapSearch &rsearch, const double *restrict src_a
if
(
num_weights
)
{
sort_add_and_w
g
ts
(
num_weights
,
srch_add
[
ompthID
].
data
(),
partial_weights
.
data
());
sort_add_and_w
eigh
ts
(
num_weights
,
srch_add
[
ompthID
].
data
(),
partial_weights
.
data
());
// Normalize weights using destination area if requested
remapNormalizeWeights
(
normOpt
,
tgt_area
,
tgt_grid
->
cell_frac
[
tgt_cell_add
],
num_weights
,
partial_weights
.
data
());
tgt_array
[
tgt_cell_add
]
=
conservRemap
(
src_array
,
num_weights
,
partial_weights
,
srch_add
[
ompthID
]);
...
...
src/remap_store_link.cc
View file @
aaa4096b
...
...
@@ -74,7 +74,7 @@ sortAddweights4(Addweight4 *addweights)
}
void
sort_add_and_4w
g
ts
(
size_t
*
src_add
,
double
*
weights
)
sort_add_and_4w
eigh
ts
(
size_t
*
src_add
,
double
*
weights
)
{
constexpr
size_t
numWeights
=
4
;
size_t
n
;
...
...
@@ -100,7 +100,7 @@ sort_add_and_4wgts(size_t *src_add, double *weights)
}
void
sort_add_and_w
g
ts
(
size_t
numWeights
,
size_t
*
src_add
,
double
*
weights
)
sort_add_and_w
eigh
ts
(
size_t
numWeights
,
size_t
*
src_add
,
double
*
weights
)
{
size_t
n
;
for
(
n
=
1
;
n
<
numWeights
;
++
n
)
...
...
@@ -128,7 +128,7 @@ sort_add_and_wgts(size_t numWeights, size_t *src_add, double *weights)
}
void
sort_add_and_w
g
ts_bicubic
(
size_t
*
src_add
,
double
(
&
weights
)[
4
][
4
])
sort_add_and_w
eigh
ts_bicubic
(
size_t
*
src_add
,
double
(
&
weights
)[
4
][
4
])
{
constexpr
size_t
numWeights
=
4
;
size_t
n
;
...
...
@@ -205,7 +205,6 @@ void
weightLinksToRemapLinks
(
int
lalloc
,
size_t
gridSize
,
std
::
vector
<
WeightLinks
>
&
weightLinks
,
RemapVars
&
rv
)
{
size_t
nlinks
=
0
;
for
(
size_t
i
=
0
;
i
<
gridSize
;
++
i
)
{
if
(
weightLinks
[
i
].
nlinks
)
...
...
@@ -266,7 +265,6 @@ void
weightLinks4ToRemapLinks
(
size_t
gridSize
,
std
::
vector
<
WeightLinks4
>
&
weightLinks
,
RemapVars
&
rv
)
{
size_t
nlinks
=
0
;
for
(
size_t
i
=
0
;
i
<
gridSize
;
++
i
)
{
if
(
weightLinks
[
i
].
nlinks
)
...
...
src/remap_store_link.h
View file @
aaa4096b
...
...
@@ -55,8 +55,8 @@ void store_weightlinks(int lalloc, size_t numWeights, size_t *srch_add, double *
void
store_weightlinks_bicubic
(
size_t
*
srch_add
,
double
(
&
weights
)[
4
][
4
],
size_t
cell_add
,
std
::
vector
<
WeightLinks4
>
&
weightLinks
);
void
weightLinksToRemapLinks
(
int
lalloc
,
size_t
gridSize
,
std
::
vector
<
WeightLinks
>
&
weightLinks
,
RemapVars
&
rv
);
void
weightLinks4ToRemapLinks
(
size_t
gridSize
,
std
::
vector
<
WeightLinks4
>
&
weightLinks
,
RemapVars
&
rv
);
void
sort_add_and_w
g
ts
(
size_t
numWeights
,
size_t
*
src_add
,
double
*
weights
);
void
sort_add_and_4w
g
ts
(
size_t
*
src_add
,
double
*
weights
);
void
sort_add_and_w
g
ts_bicubic
(
size_t
*
src_add
,
double
(
&
weights
)[
4
][
4
]);
void
sort_add_and_w
eigh
ts
(
size_t
numWeights
,
size_t
*
src_add
,
double
*
weights
);
void
sort_add_and_4w
eigh
ts
(
size_t
*
src_add
,
double
*
weights
);
void
sort_add_and_w
eigh
ts_bicubic
(
size_t
*
src_add
,
double
(
&
weights
)[
4
][
4
]);
#endif
/* REMAP_STORE_LINK */
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment