mirror of https://github.com/ecmwf/eccodes.git
Renamed C unpack<T> to unpack_helper<T> to avoid collision with C++ code
This commit is contained in:
parent
5045a4832d
commit
0eab0b6f6c
|
@ -213,7 +213,7 @@ static int unpack_long(grib_accessor* a, long* val, size_t* len)
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
static int unpack(grib_accessor* a, T* val, size_t* len)
|
||||
static int unpack_helper(grib_accessor* a, T* val, size_t* len)
|
||||
{
|
||||
static_assert(std::is_floating_point<T>::value, "Requires floating points numbers");
|
||||
long pos = a->offset * 8;
|
||||
|
@ -241,12 +241,12 @@ static int unpack(grib_accessor* a, T* val, size_t* len)
|
|||
|
||||
static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
||||
{
|
||||
return unpack<double>(a, val, len);
|
||||
return unpack_helper<double>(a, val, len);
|
||||
}
|
||||
|
||||
static int unpack_float(grib_accessor* a, float* val, size_t* len)
|
||||
{
|
||||
return unpack<float>(a, val, len);
|
||||
return unpack_helper<float>(a, val, len);
|
||||
}
|
||||
|
||||
static int unpack_double_element(grib_accessor* a, size_t idx, double* val)
|
||||
|
|
|
@ -344,7 +344,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
static int unpack(grib_accessor* a, T* val, size_t* len)
|
||||
static int unpack_helper(grib_accessor* a, T* val, size_t* len)
|
||||
{
|
||||
static_assert(std::is_floating_point<T>::value, "Requires floating point numbers");
|
||||
grib_accessor_data_apply_bitmap* self = (grib_accessor_data_apply_bitmap*)a;
|
||||
|
@ -428,12 +428,12 @@ static int unpack(grib_accessor* a, T* val, size_t* len)
|
|||
|
||||
static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
||||
{
|
||||
return unpack<double>(a, val, len);
|
||||
return unpack_helper<double>(a, val, len);
|
||||
}
|
||||
|
||||
static int unpack_float(grib_accessor* a, float* val, size_t* len)
|
||||
{
|
||||
return unpack<float>(a, val, len);
|
||||
return unpack_helper<float>(a, val, len);
|
||||
}
|
||||
|
||||
static int get_native_type(grib_accessor* a)
|
||||
|
|
|
@ -147,7 +147,7 @@ static int value_count(grib_accessor* a, long* numberOfPoints)
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
static int unpack(grib_accessor* a, T* val, size_t* len)
|
||||
static int unpack_helper(grib_accessor* a, T* val, size_t* len)
|
||||
{
|
||||
grib_accessor_data_apply_boustrophedonic* self = (grib_accessor_data_apply_boustrophedonic*)a;
|
||||
size_t plSize = 0;
|
||||
|
@ -243,12 +243,12 @@ static int unpack(grib_accessor* a, T* val, size_t* len)
|
|||
|
||||
static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
||||
{
|
||||
return unpack<double>(a, val, len);
|
||||
return unpack_helper<double>(a, val, len);
|
||||
}
|
||||
|
||||
static int unpack_float(grib_accessor* a, float* val, size_t* len)
|
||||
{
|
||||
return unpack<float>(a, val, len);
|
||||
return unpack_helper<float>(a, val, len);
|
||||
}
|
||||
|
||||
static int unpack_double_element(grib_accessor* a, size_t idx, double* val)
|
||||
|
|
|
@ -499,7 +499,7 @@ cleanup:
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
static int unpack(grib_accessor* a, T* val, size_t* len)
|
||||
static int unpack_helper(grib_accessor* a, T* val, size_t* len)
|
||||
{
|
||||
static_assert(std::is_floating_point<T>::value, "Requires floating point numbers");
|
||||
grib_accessor_data_ccsds_packing* self = (grib_accessor_data_ccsds_packing*)a;
|
||||
|
@ -639,12 +639,12 @@ cleanup:
|
|||
|
||||
static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
||||
{
|
||||
return unpack<double>(a, val, len);
|
||||
return unpack_helper<double>(a, val, len);
|
||||
}
|
||||
|
||||
static int unpack_float(grib_accessor* a, float* val, size_t* len)
|
||||
{
|
||||
return unpack<float>(a, val, len);
|
||||
return unpack_helper<float>(a, val, len);
|
||||
}
|
||||
|
||||
static int unpack_double_element(grib_accessor* a, size_t idx, double* val)
|
||||
|
|
|
@ -673,7 +673,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
|||
|
||||
|
||||
template <typename T>
|
||||
static int unpack(grib_accessor* a, T* val, size_t* len)
|
||||
static int unpack_helper(grib_accessor* a, T* val, size_t* len)
|
||||
{
|
||||
static_assert(std::is_floating_point<T>::value, "Requires floating point numbers");
|
||||
grib_accessor_data_complex_packing* self = (grib_accessor_data_complex_packing*)a;
|
||||
|
@ -897,7 +897,7 @@ static int unpack(grib_accessor* a, T* val, size_t* len)
|
|||
|
||||
static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
||||
{
|
||||
return unpack<double>(a, val, len);
|
||||
return unpack_helper<double>(a, val, len);
|
||||
}
|
||||
|
||||
static int unpack_float(grib_accessor* a, float* val, size_t* len)
|
||||
|
@ -905,7 +905,7 @@ static int unpack_float(grib_accessor* a, float* val, size_t* len)
|
|||
// TODO(maee): See ECC-1579
|
||||
// Investigate why results are not bit-identical
|
||||
|
||||
// return unpack<float>(a, val, len);
|
||||
// return unpack_helper<float>(a, val, len);
|
||||
|
||||
int err = 0;
|
||||
size_t i = 0;
|
||||
|
@ -914,7 +914,7 @@ static int unpack_float(grib_accessor* a, float* val, size_t* len)
|
|||
val8 = (double*)grib_context_malloc(a->context, size*(sizeof(double)));
|
||||
if (!val8) return GRIB_OUT_OF_MEMORY;
|
||||
|
||||
err = unpack<double>(a, val8, len);
|
||||
err = unpack_helper<double>(a, val8, len);
|
||||
if (err) {
|
||||
grib_context_free(a->context,val8);
|
||||
return err;
|
||||
|
|
|
@ -192,7 +192,7 @@ static int value_count(grib_accessor* a, long* numberOfSecondOrderPackedValues)
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
static int unpack(grib_accessor* a, T* values, size_t* len)
|
||||
static int unpack_helper(grib_accessor* a, T* values, size_t* len)
|
||||
{
|
||||
static_assert(std::is_floating_point<T>::value, "Requires floating point numbers");
|
||||
grib_accessor_data_g1second_order_general_packing* self = (grib_accessor_data_g1second_order_general_packing*)a;
|
||||
|
@ -298,12 +298,12 @@ static int unpack(grib_accessor* a, T* values, size_t* len)
|
|||
|
||||
static int unpack_float(grib_accessor* a, float* values, size_t* len)
|
||||
{
|
||||
return unpack<float>(a, values, len);
|
||||
return unpack_helper<float>(a, values, len);
|
||||
}
|
||||
|
||||
static int unpack_double(grib_accessor* a, double* values, size_t* len)
|
||||
{
|
||||
return unpack<double>(a, values, len);
|
||||
return unpack_helper<double>(a, values, len);
|
||||
}
|
||||
|
||||
static int pack_double(grib_accessor* a, const double* cval, size_t* len)
|
||||
|
|
|
@ -254,7 +254,7 @@ static int value_count(grib_accessor* a, long* count)
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
static int unpack(grib_accessor* a, T* values, size_t* len)
|
||||
static int unpack_helper(grib_accessor* a, T* values, size_t* len)
|
||||
{
|
||||
grib_accessor_data_g1second_order_row_by_row_packing* self = (grib_accessor_data_g1second_order_row_by_row_packing*)a;
|
||||
grib_handle* gh = grib_handle_of_accessor(a);
|
||||
|
@ -423,12 +423,12 @@ static int unpack(grib_accessor* a, T* values, size_t* len)
|
|||
|
||||
static int unpack_float(grib_accessor* a, float* values, size_t* len)
|
||||
{
|
||||
return unpack<float>(a, values, len);
|
||||
return unpack_helper<float>(a, values, len);
|
||||
}
|
||||
|
||||
static int unpack_double(grib_accessor* a, double* values, size_t* len)
|
||||
{
|
||||
return unpack<double>(a, values, len);
|
||||
return unpack_helper<double>(a, values, len);
|
||||
}
|
||||
|
||||
static int pack_double(grib_accessor* a, const double* cval, size_t* len)
|
||||
|
|
|
@ -509,7 +509,7 @@ static int post_process(grib_context* c, long* vals, long len, long order, long
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
static int unpack(grib_accessor* a, T* val, const size_t* len)
|
||||
static int unpack_helper(grib_accessor* a, T* val, const size_t* len)
|
||||
{
|
||||
static_assert(std::is_floating_point<T>::value, "Requires floating points numbers");
|
||||
grib_accessor_data_g22order_packing* self = reinterpret_cast<grib_accessor_data_g22order_packing*>(a);
|
||||
|
@ -1854,12 +1854,12 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
|||
|
||||
static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
||||
{
|
||||
return unpack<double>(a, val, len);
|
||||
return unpack_helper<double>(a, val, len);
|
||||
}
|
||||
|
||||
static int unpack_float(grib_accessor* a, float* val, size_t* len)
|
||||
{
|
||||
return unpack<float>(a, val, len);
|
||||
return unpack_helper<float>(a, val, len);
|
||||
}
|
||||
|
||||
static int unpack_double_element(grib_accessor* a, size_t idx, double* val)
|
||||
|
|
|
@ -282,7 +282,7 @@ static int unpack_double_element_set(grib_accessor* a, const size_t* index_array
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
static int unpack(grib_accessor* a, T* val, size_t* len)
|
||||
static int unpack_helper(grib_accessor* a, T* val, size_t* len)
|
||||
{
|
||||
static_assert(std::is_floating_point<T>::value, "Requires floating point numbers");
|
||||
|
||||
|
@ -421,12 +421,12 @@ static int unpack(grib_accessor* a, T* val, size_t* len)
|
|||
|
||||
static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
||||
{
|
||||
return unpack<double>(a, val, len);
|
||||
return unpack_helper<double>(a, val, len);
|
||||
}
|
||||
|
||||
static int unpack_float(grib_accessor* a, float* val, size_t* len)
|
||||
{
|
||||
return unpack<float>(a, val, len);
|
||||
return unpack_helper<float>(a, val, len);
|
||||
}
|
||||
|
||||
static int _unpack_double(grib_accessor* a, double* val, size_t* len, unsigned char* buf, long pos, size_t n_vals)
|
||||
|
|
|
@ -309,7 +309,7 @@ static int unpack_long(grib_accessor* a, long* v, size_t* len)
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
static int unpack(grib_accessor* a, T* v, size_t* len)
|
||||
static int unpack_helper(grib_accessor* a, T* v, size_t* len)
|
||||
{
|
||||
static_assert(std::is_floating_point<T>::value, "Requires floating point numbers");
|
||||
int type = GRIB_TYPE_UNDEFINED;
|
||||
|
@ -346,12 +346,12 @@ static int unpack(grib_accessor* a, T* v, size_t* len)
|
|||
|
||||
static int unpack_double(grib_accessor* a, double* v, size_t* len)
|
||||
{
|
||||
return unpack<double>(a, v, len);
|
||||
return unpack_helper<double>(a, v, len);
|
||||
}
|
||||
|
||||
static int unpack_float(grib_accessor* a, float* v, size_t* len)
|
||||
{
|
||||
return unpack<float>(a, v, len);
|
||||
return unpack_helper<float>(a, v, len);
|
||||
}
|
||||
|
||||
static int unpack_string(grib_accessor* a, char* v, size_t* len)
|
||||
|
|
|
@ -128,7 +128,7 @@ static void init(grib_accessor* a, const long len, grib_arguments* arg)
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
static int unpack(grib_accessor* a, T* val, size_t* len)
|
||||
static int unpack_helper(grib_accessor* a, T* val, size_t* len)
|
||||
{
|
||||
static_assert(std::is_floating_point<T>::value, "Requires floating point numbers");
|
||||
unsigned long rlen = 0;
|
||||
|
@ -158,12 +158,12 @@ static int unpack(grib_accessor* a, T* val, size_t* len)
|
|||
|
||||
static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
||||
{
|
||||
return unpack<double>(a, val, len);
|
||||
return unpack_helper<double>(a, val, len);
|
||||
}
|
||||
|
||||
static int unpack_float(grib_accessor* a, float* val, size_t* len)
|
||||
{
|
||||
return unpack<float>(a, val, len);
|
||||
return unpack_helper<float>(a, val, len);
|
||||
}
|
||||
|
||||
static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
||||
|
|
|
@ -178,7 +178,7 @@ static int pack_double(grib_accessor* a, const double* val, size_t* len)
|
|||
}
|
||||
|
||||
template <typename T>
|
||||
static int unpack(grib_accessor* a, T* val, size_t* len)
|
||||
static int unpack_helper(grib_accessor* a, T* val, size_t* len)
|
||||
{
|
||||
static_assert(std::is_floating_point<T>::value, "Requires floating point numbers");
|
||||
long rlen = 0;
|
||||
|
@ -206,12 +206,12 @@ static int unpack(grib_accessor* a, T* val, size_t* len)
|
|||
|
||||
static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
||||
{
|
||||
return unpack<double>(a, val, len);
|
||||
return unpack_helper<double>(a, val, len);
|
||||
}
|
||||
|
||||
static int unpack_float(grib_accessor* a, float* val, size_t* len)
|
||||
{
|
||||
return unpack<float>(a, val, len);
|
||||
return unpack_helper<float>(a, val, len);
|
||||
}
|
||||
|
||||
static void update_size(grib_accessor* a, size_t s)
|
||||
|
|
Loading…
Reference in New Issue