Skip to content
Snippets Groups Projects
Commit 0bcaeca0 authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

smooth: print max points found in verbose mode.

parent 114bed08
No related branches found
No related tags found
No related merge requests found
......@@ -95,12 +95,13 @@ smooth(int gridID, double missval, const double *restrict array1, double *restri
start = cdoVerbose ? cdo_get_wtime() : 0;
size_t naddsMax = 0;
size_t nmissx = 0;
double findex = 0;
#ifdef HAVE_OPENMP4
#pragma omp parallel for schedule(dynamic) default(none) reduction(+ : nmissx) shared( \
findex, cdoVerbose, knnWeights, spoint, mask, array1, array2, xvals, yvals, gps, gridsize, missval)
#pragma omp parallel for schedule(dynamic) default(none) reduction(+ : nmissx) reduction(max : naddsMax) \
shared(findex, cdoVerbose, knnWeights, spoint, mask, array1, array2, xvals, yvals, gps, gridsize, missval)
#endif
for (size_t i = 0; i < gridsize; ++i)
{
......@@ -116,6 +117,7 @@ smooth(int gridID, double missval, const double *restrict array1, double *restri
// Compute weights based on inverse distance if mask is false, eliminate those points
size_t nadds = knnWeights[ompthID].compute_weights(mask, spoint.radius, spoint.weight0, spoint.weightR);
if (nadds > naddsMax) naddsMax = nadds;
if (nadds)
{
array2[i] = knnWeights[ompthID].array_weights_sum(array1);
......@@ -132,6 +134,7 @@ smooth(int gridID, double missval, const double *restrict array1, double *restri
progressStatus(0, 1, 1);
if (cdoVerbose) cdoPrint("Point search nearest: %.2f seconds", cdo_get_wtime() - start);
if (cdoVerbose) cdoPrint("Max points found: %zu\n", naddsMax);
if (gps) gridPointSearchDelete(gps);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment