Commit 2e652bbb authored by Uwe Schulzweida's avatar Uwe Schulzweida
Browse files

grid search: changed unsigned to size_t.

parent 640c38c9
#if defined(HAVE_CONFIG_H)
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
......@@ -84,7 +84,7 @@ struct gridsearch *gridsearch_create_reg2d(bool lcyclic, size_t nx, size_t ny, c
gs->nx = nx;
gs->ny = ny;
unsigned nxm = nx;
size_t nxm = nx;
if ( lcyclic ) nxm++;
double *reg2d_center_lon = (double *) Malloc(nxm*sizeof(double));
......@@ -397,7 +397,7 @@ kdNode *gs_nearest_kdsph(kdNode *kdt, double lon, double lat, double *prange)
}
unsigned gs_nearest_nearpt3(struct gsNear *near, double lon, double lat, double *prange)
size_t gs_nearest_nearpt3(struct gsNear *near, double lon, double lat, double *prange)
{
size_t index = GS_NOT_FOUND;
if ( near == NULL ) return index;
......@@ -423,7 +423,7 @@ unsigned gs_nearest_nearpt3(struct gsNear *near, double lon, double lat, double
float range = distance(point, point0);
if ( range < range0 )
{
index = (unsigned) closestpt;
index = (size_t) closestpt;
*prange = range;
}
}
......@@ -588,7 +588,7 @@ void knn_check_distance(size_t num_neighbors, const size_t *restrict nbr_add, do
void gridsearch_knn_init(struct gsknn *knn)
{
unsigned ndist = knn->ndist;
size_t ndist = knn->ndist;
size_t *restrict add = knn->add;
double *restrict dist = knn->dist;
......
......@@ -11,14 +11,14 @@
enum T_GRIDSEARCH_METHOD_NN {GS_FULL=1, GS_KDTREE, GS_KDSPH, GS_NEARPT3};
struct gsFull {
unsigned n;
size_t n;
const double *plons;
const double *plats;
float **pts;
};
struct gsNear {
unsigned n;
size_t n;
const double *plons;
const double *plats;
Coord_T **pts;
......@@ -43,8 +43,8 @@ struct gridsearch {
};
struct gsknn {
unsigned ndist;
unsigned size;
size_t ndist;
size_t size;
bool *mask;
size_t *add;
size_t *tmpadd;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment