Fix the accessor classes. Needs more work for performance

This commit is contained in:
Shahram Najm 2018-05-17 12:52:03 +01:00
parent 0db15d3519
commit 664399a925
7 changed files with 20 additions and 19 deletions

View File

@ -120,7 +120,7 @@ static GRIB_INLINE grib_accessor_class* get_class(grib_context* c,char* type)
grib_context_log(c,GRIB_LOG_FATAL,"unable to create class %s",type);
return NULL;
}
#define ACCESSOR_FACTORY_USE_TRIE /*TODO: sort out the hash of accessor classes */
grib_accessor* grib_accessor_factory(grib_section* p, grib_action* creator,
const long len, grib_arguments* params)
{

View File

@ -143,9 +143,9 @@ typedef struct grib_accessor_bufr_data_array {
grib_trie_with_rank* dataAccessorsTrie;
grib_sarray* tempStrings;
int change_ref_value_operand;
size_t refValListSize;
long* refValList;
long refValIndex;
size_t refValListSize;
long* refValList;
long refValIndex;
bufr_tableb_override* tableb_override;
} grib_accessor_bufr_data_array;

View File

@ -57,6 +57,7 @@ typedef struct grib_iterator_gaussian{
double angleOfRotation;
double southPoleLat;
double southPoleLon;
long jPointsAreConsecutive;
/* Members defined in gaussian */
} grib_iterator_gaussian;

View File

@ -38,10 +38,10 @@ or edit "iterator.class" and rerun ./make_class.pl
static void init_class (grib_iterator_class*);
static int init (grib_iterator* iter,grib_handle*,grib_arguments*);
static int init (grib_iterator* i,grib_handle*,grib_arguments*);
static int destroy (grib_iterator* i);
static int reset (grib_iterator* iter);
static long has_next (grib_iterator* iter);
static int reset (grib_iterator* i);
static long has_next (grib_iterator* i);
typedef struct grib_iterator_gen{

View File

@ -34,8 +34,8 @@ or edit "iterator.class" and rerun ./make_class.pl
static void init_class (grib_iterator_class*);
static int init (grib_iterator* iter,grib_handle*,grib_arguments*);
static int next (grib_iterator* iter, double *lat, double *lon, double *val);
static int init (grib_iterator* i,grib_handle*,grib_arguments*);
static int next (grib_iterator* i, double *lat, double *lon, double *val);
typedef struct grib_iterator_latlon{
@ -48,12 +48,12 @@ typedef struct grib_iterator_latlon{
double *los;
long nap;
long nam;
long iScansNegatively;
long isRotated;
double angleOfRotation;
double southPoleLat;
double southPoleLon;
long jPointsAreConsecutive;
long iScansNegatively;
long isRotated;
double angleOfRotation;
double southPoleLat;
double southPoleLon;
long jPointsAreConsecutive;
/* Members defined in latlon */
} grib_iterator_latlon;

View File

@ -62,12 +62,12 @@ typedef struct grib_iterator_regular{
double *los;
long nap;
long nam;
long iScansNegatively;
long isRotated;
long iScansNegatively;
long isRotated;
double angleOfRotation;
double southPoleLat;
double southPoleLon;
long jPointsAreConsecutive;
long jPointsAreConsecutive;
} grib_iterator_regular;
extern grib_iterator_class* grib_iterator_class_gen;

View File

@ -1,8 +1,8 @@
/* This file is automatically generated by ./make_class.pl, do not edit */
extern grib_nearest_class* grib_nearest_class_gen;
extern grib_nearest_class* grib_nearest_class_lambert_conformal;
extern grib_nearest_class* grib_nearest_class_polar_stereographic;
extern grib_nearest_class* grib_nearest_class_latlon_reduced;
extern grib_nearest_class* grib_nearest_class_polar_stereographic;
extern grib_nearest_class* grib_nearest_class_reduced;
extern grib_nearest_class* grib_nearest_class_regular;
extern grib_nearest_class* grib_nearest_class_sh;