diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Gprivate.h | 1 | ||||
-rw-r--r-- | src/H5I.c | 8 | ||||
-rw-r--r-- | src/H5Iprivate.h | 1 | ||||
-rw-r--r-- | src/H5T.c | 80 | ||||
-rw-r--r-- | src/H5Tbit.c | 2 | ||||
-rw-r--r-- | src/H5Tconv.c | 1303 | ||||
-rw-r--r-- | src/H5Tpkg.h | 200 |
7 files changed, 1592 insertions, 3 deletions
diff --git a/src/H5Gprivate.h b/src/H5Gprivate.h index 2bf2c3f..b2bff6c 100644 --- a/src/H5Gprivate.h +++ b/src/H5Gprivate.h @@ -38,6 +38,7 @@ #include "H5private.h" /* Generic Functions */ #include "H5Bprivate.h" /* B-trees */ #include "H5Fprivate.h" /* File access */ +#include "H5Gprivate.h" /* Group */ #include "H5RSprivate.h" /* Reference-counted strings */ /* @@ -117,7 +117,6 @@ H5FL_DEFINE_STATIC(H5I_id_info_t); /*--------------------- Local function prototypes ---------------------------*/ static herr_t H5I_init_interface(void); static H5I_id_info_t *H5I_find_id(hid_t id); -static hid_t H5I_get_file_id(hid_t obj_id); #ifdef H5I_DEBUG_OUTPUT static herr_t H5I_debug(H5I_type_t grp); #endif /* H5I_DEBUG_OUTPUT */ @@ -843,7 +842,7 @@ done: * *------------------------------------------------------------------------- */ -static hid_t +hid_t H5I_get_file_id(hid_t obj_id) { H5G_entry_t *ent; @@ -1176,8 +1175,11 @@ H5I_find_id(hid_t id) /* Check arguments */ grp = H5I_GRP(id); - if (grp <= H5I_BADID || grp >= H5I_NGROUPS) + + if (grp <= H5I_BADID || grp >= H5I_NGROUPS) { HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "invalid group number"); + } + grp_ptr = H5I_id_group_list_g[grp]; if (grp_ptr == NULL || grp_ptr->count <= 0) HGOTO_ERROR(H5E_ATOM, H5E_BADGROUP, NULL, "invalid group"); diff --git a/src/H5Iprivate.h b/src/H5Iprivate.h index 79819a5..42369e3 100644 --- a/src/H5Iprivate.h +++ b/src/H5Iprivate.h @@ -67,6 +67,7 @@ H5_DLL hid_t H5I_register(H5I_type_t grp, void *object); H5_DLL void *H5I_object(hid_t id); H5_DLL void *H5I_object_verify(hid_t id, H5I_type_t id_type); H5_DLL H5I_type_t H5I_get_type(hid_t id); +H5_DLL hid_t H5I_get_file_id(hid_t obj_id); H5_DLL void *H5I_remove(hid_t id); H5_DLL void *H5I_search(H5I_type_t grp, H5I_search_func_t func, void *key); H5_DLL int H5I_inc_ref(hid_t id); @@ -906,6 +906,86 @@ H5T_init_interface(void) status |= H5T_register(H5T_PERS_HARD, "schar_uchar", native_schar, native_uchar, H5T_conv_schar_uchar, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "uchar_schar", native_uchar, native_schar, H5T_conv_uchar_schar, H5AC_dxpl_id); + /* From char to floats */ + status |= H5T_register(H5T_PERS_HARD, "char_flt", native_schar, native_float, H5T_conv_char_float, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "char_dbl", native_schar, native_double, H5T_conv_char_double, H5AC_dxpl_id); + + /* From unsigned char to floats */ + status |= H5T_register(H5T_PERS_HARD, "uchar_flt", native_uchar, native_float, H5T_conv_uchar_float, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "uchar_dbl", native_uchar, native_double, H5T_conv_uchar_double, H5AC_dxpl_id); + + /* From short to floats */ + status |= H5T_register(H5T_PERS_HARD, "short_flt", native_short, native_float, H5T_conv_short_float, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "short_dbl", native_short, native_double, H5T_conv_short_double, H5AC_dxpl_id); + + /* From unsigned short to floats */ + status |= H5T_register(H5T_PERS_HARD, "ushort_flt", native_ushort, native_float, H5T_conv_ushort_float, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "ushort_dbl", native_ushort, native_double, H5T_conv_ushort_double, H5AC_dxpl_id); + + /* From int to floats */ + status |= H5T_register(H5T_PERS_HARD, "int_flt", native_int, native_float, H5T_conv_int_float, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "int_dbl", native_int, native_double, H5T_conv_int_double, H5AC_dxpl_id); + + /* From unsigned int to floats */ + status |= H5T_register(H5T_PERS_HARD, "uint_flt", native_uint, native_float, H5T_conv_uint_float, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "uint_dbl", native_uint, native_double, H5T_conv_uint_double, H5AC_dxpl_id); + + /* From long to floats */ + status |= H5T_register(H5T_PERS_HARD, "long_flt", native_long, native_float, H5T_conv_long_float, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "long_dbl", native_long, native_double, H5T_conv_long_double, H5AC_dxpl_id); + + /* From unsigned long to floats */ + status |= H5T_register(H5T_PERS_HARD, "ulong_flt", native_ulong, native_float, H5T_conv_ulong_float, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "ulong_dbl", native_ulong, native_double, H5T_conv_ulong_double, H5AC_dxpl_id); + + /* From long long to floats */ + status |= H5T_register(H5T_PERS_HARD, "llong_flt", native_llong, native_float, H5T_conv_llong_float, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "llong_dbl", native_llong, native_double, H5T_conv_llong_double, H5AC_dxpl_id); + + /* From unsigned long long to floats */ + status |= H5T_register(H5T_PERS_HARD, "ullong_flt", native_ullong, native_float, H5T_conv_ullong_float, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "ullong_dbl", native_ullong, native_double, H5T_conv_ullong_double, H5AC_dxpl_id); + + /* From floats to char */ + status |= H5T_register(H5T_PERS_HARD, "flt_char", native_float, native_schar, H5T_conv_float_char, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "dbl_char", native_double, native_schar, H5T_conv_double_char, H5AC_dxpl_id); + + /* From floats to unsigned char */ + status |= H5T_register(H5T_PERS_HARD, "flt_uchar", native_float, native_uchar, H5T_conv_float_uchar, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "dbl_uchar", native_double, native_uchar, H5T_conv_double_uchar, H5AC_dxpl_id); + + /* From floats to short */ + status |= H5T_register(H5T_PERS_HARD, "flt_short", native_float, native_short, H5T_conv_float_short, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "dbl_short", native_double, native_short, H5T_conv_double_short, H5AC_dxpl_id); + + /* From floats to unsigned short */ + status |= H5T_register(H5T_PERS_HARD, "flt_ushort", native_float, native_ushort, H5T_conv_float_ushort, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "dbl_ushort", native_double, native_ushort, H5T_conv_double_ushort, H5AC_dxpl_id); + + /* From floats to int */ + status |= H5T_register(H5T_PERS_HARD, "flt_int", native_float, native_int, H5T_conv_float_int, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "dbl_int", native_double, native_int, H5T_conv_double_int, H5AC_dxpl_id); + + /* From floats to unsigned int */ + status |= H5T_register(H5T_PERS_HARD, "flt_uint", native_float, native_uint, H5T_conv_float_uint, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "dbl_uint", native_double, native_uint, H5T_conv_double_uint, H5AC_dxpl_id); + + /* From floats to long */ + status |= H5T_register(H5T_PERS_HARD, "flt_long", native_float, native_long, H5T_conv_float_long, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "dbl_long", native_double, native_long, H5T_conv_double_long, H5AC_dxpl_id); + + /* From floats to unsigned long */ + status |= H5T_register(H5T_PERS_HARD, "flt_ulong", native_float, native_ulong, H5T_conv_float_ulong, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "dbl_ulong", native_double, native_ulong, H5T_conv_double_ulong, H5AC_dxpl_id); + + /* From floats to long long */ + status |= H5T_register(H5T_PERS_HARD, "flt_llong", native_float, native_llong, H5T_conv_float_llong, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "dbl_llong", native_double, native_llong, H5T_conv_double_llong, H5AC_dxpl_id); + + /* From floats to unsigned long long */ + status |= H5T_register(H5T_PERS_HARD, "flt_ullong", native_float, native_ullong, H5T_conv_float_ullong, H5AC_dxpl_id); + status |= H5T_register(H5T_PERS_HARD, "dbl_ullong", native_double, native_ullong, H5T_conv_double_ullong, H5AC_dxpl_id); + /* * The special no-op conversion is the fastest, so we list it last. The * data types we use are not important as long as the source and diff --git a/src/H5Tbit.c b/src/H5Tbit.c index f2ad5f1..73576c3 100644 --- a/src/H5Tbit.c +++ b/src/H5Tbit.c @@ -183,12 +183,14 @@ H5T_bit_get_d (uint8_t *buf, size_t offset, size_t size) hsize_t val=0; size_t i, hs; hsize_t ret_value; /* Return value */ + void *pt; FUNC_ENTER_NOAPI(H5T_bit_get_d, 0); assert (8*sizeof(val)>=size); H5T_bit_copy ((uint8_t*)&val, 0, buf, offset, size); + switch (((H5T_t*)(H5I_object(H5T_NATIVE_INT_g)))->u.atomic.order) { case H5T_ORDER_LE: break; diff --git a/src/H5Tconv.c b/src/H5Tconv.c index 4950371..7d2fb41 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -51,6 +51,12 @@ typedef struct H5T_conv_hw_t { hsize_t d_aligned; /*number destination elements aligned*/ } H5T_conv_hw_t; +typedef enum dtype_t { + INT_CHAR, INT_UCHAR, INT_SHORT, INT_USHORT, INT_INT, INT_UINT, + INT_LONG, INT_ULONG, INT_LLONG, INT_ULLONG, FLT_FLOAT, FLT_DOUBLE, + FLT_LDOUBLE, OTHER +} dtype_t; + /* Interface initialization */ static int interface_initialize_g = 0; #define INTERFACE_INIT NULL @@ -129,6 +135,14 @@ H5FL_BLK_DEFINE_STATIC(array_seq); * least as large as the destination. Overflows can occur when * the destination is narrower than the source. * + * xF: integers to float-point values where the desination is + * at least as wide as the source. This case cannot generate + * overflows. + * + * Fx: float-point values to integer where the source is + * at least as wide as the destination. Overflow can occure + * when the source magnitude is too large for the destination. + * * The macros take a subset of these arguments in the order listed here: * * CDATA: A pointer to the H5T_cdata_t structure that was passed to the @@ -304,6 +318,14 @@ H5FL_BLK_DEFINE_STATIC(array_seq); H5T_CONV(H5T_CONV_Xx, double, STYPE, DTYPE, ST, DT, D_MIN, D_MAX) \ } +#define H5T_CONV_xF(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ + H5T_CONV(H5T_CONV_xX, double, STYPE, DTYPE, ST, DT, D_MIN, D_MAX) \ +} + +#define H5T_CONV_Fx(STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ + H5T_CONV(H5T_CONV_Xx, double, STYPE, DTYPE, ST, DT, D_MIN, D_MAX) \ +} + /* The main part of every integer hardware conversion macro */ #define H5T_CONV(GUTS,ATYPE,STYPE,DTYPE,ST,DT,D_MIN,D_MAX) { \ size_t elmtno; /*element number */ \ @@ -6666,6 +6688,1287 @@ done: /*------------------------------------------------------------------------- + * Function: H5T_conv_char_float + * + * Purpose: Convert native char to native float using hardware. + * This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_char_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_char_float, FAIL); + + H5T_CONV_xF(SCHAR, FLOAT, char, float, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_char_double + * + * Purpose: Convert native char to native double using hardware. + * This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_char_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_char_double, FAIL); + + H5T_CONV_xF(SCHAR, DOUBLE, char, double, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_uchar_float + * + * Purpose: Convert native unsigned char to native float using hardware. + * This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_uchar_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_uchar_float, FAIL); + + H5T_CONV_xF(UCHAR, FLOAT, unsigned char, float, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_uchar_double + * + * Purpose: Convert native unsigned char to native double using hardware. + * This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_uchar_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_uchar_double, FAIL); + + H5T_CONV_xF(UCHAR, DOUBLE, unsigned char, double, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_short_float + * + * Purpose: Convert native short to native float using hardware. + * This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_short_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_short_float, FAIL); + + H5T_CONV_xF(SHORT, FLOAT, short, float, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_short_double + * + * Purpose: Convert native short to native double using hardware. + * This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_short_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_short_double, FAIL); + + H5T_CONV_xF(SHORT, DOUBLE, short, double, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ushort_float + * + * Purpose: Convert native unsigned short to native float using hardware. + * This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ushort_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_ushort_float, FAIL); + + H5T_CONV_xF(USHORT, FLOAT, unsigned short, float, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ushort_double + * + * Purpose: Convert native unsigned short to native double using hardware. + * This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ushort_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_ushort_double, FAIL); + + H5T_CONV_xF(USHORT, DOUBLE, unsigned short, double, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_int_float + * + * Purpose: Convert native integer to native float using hardware. + * This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_int_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_int_float, FAIL); + + H5T_CONV_xF(INT, FLOAT, int, float, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_int_double + * + * Purpose: Convert native integer to native double using hardware. + * This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_int_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_int_double, FAIL); + + H5T_CONV_xF(INT, DOUBLE, int, double, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_uint_float + * + * Purpose: Convert native unsigned integer to native float using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_uint_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_uint_float, FAIL); + + H5T_CONV_xF(UINT, FLOAT, unsigned int, float, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_uint_double + * + * Purpose: Convert native unsigned integer to native double using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_uint_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_uint_double, FAIL); + + H5T_CONV_xF(UINT, DOUBLE, unsigned int, double, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_long_float + * + * Purpose: Convert native long to native float using hardware. + * This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_long_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_long_float, FAIL); + + H5T_CONV_xF(LONG, FLOAT, long, float, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_long_double + * + * Purpose: Convert native long to native double using hardware. + * This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_long_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_long_double, FAIL); + + H5T_CONV_xF(LLONG, DOUBLE, long, double, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ulong_float + * + * Purpose: Convert native native long to native float using hardware. + * This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ulong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_ulong_float, FAIL); + + H5T_CONV_xF(ULONG, FLOAT, unsigned long, float, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ulong_double + * + * Purpose: Convert native native long to native double using hardware. + * This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ulong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_ulong_double, FAIL); + + H5T_CONV_xF(ULONG, DOUBLE, unsigned long, double, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_llong_float + * + * Purpose: Convert native long long to native float using hardware. + * This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_llong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_llong_float, FAIL); + + H5T_CONV_xF(LLONG, FLOAT, long_long, float, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_llong_double + * + * Purpose: Convert native long long to native double using hardware. + * This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_llong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_llong_double, FAIL); + + H5T_CONV_xF(LLONG, DOUBLE, long_long, double, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ullong_float + * + * Purpose: Convert native unsigned long long to native float using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ullong_float (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_ullong_float, FAIL); + + H5T_CONV_xF(ULLONG, FLOAT, unsigned long_long, float, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_ullong_double + * + * Purpose: Convert native unsigned long long to native double using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_ullong_double (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_ullong_double, FAIL); + + H5T_CONV_xF(ULLONG, DOUBLE, unsigned long_long, double, -, -); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_float_char + * + * Purpose: Convert native float to native char using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_float_char (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_float_char, FAIL); + + H5T_CONV_Fx(FLOAT, SCHAR, float, char, CHAR_MIN, CHAR_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_float_uchar + * + * Purpose: Convert native float to native unsigned char using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_float_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_float_uchar, FAIL); + + H5T_CONV_Fx(FLOAT, UCHAR, float, unsigned char, 0, UCHAR_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_double_char + * + * Purpose: Convert native float to native char using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_double_char (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_double_char, FAIL); + + H5T_CONV_Fx(DOUBLE, SCHAR, double, char, CHAR_MIN, CHAR_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_double_uchar + * + * Purpose: Convert native float to native unsigned char using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_double_uchar (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_double_uchar, FAIL); + + H5T_CONV_Fx(DOUBLE, UCHAR, double, unsigned char, 0, UCHAR_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_float_short + * + * Purpose: Convert native float to native short using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_float_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_float_short, FAIL); + + H5T_CONV_Fx(FLOAT, SHORT, float, short, SHRT_MIN, SHRT_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_float_ushort + * + * Purpose: Convert native float to native unsigned short using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_float_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_float_ushort, FAIL); + + H5T_CONV_Fx(FLOAT, USHORT, float, unsigned short, 0, USHRT_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_double_short + * + * Purpose: Convert native float to native short using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_double_short (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_double_short, FAIL); + + H5T_CONV_Fx(DOUBLE, SHORT, double, short, SHRT_MIN, SHRT_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_double_ushort + * + * Purpose: Convert native float to native unsigned short using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_double_ushort (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_double_ushort, FAIL); + + H5T_CONV_Fx(DOUBLE, USHORT, double, unsigned short, 0, USHRT_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_float_int + * + * Purpose: Convert native float to native int using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_float_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_float_int, FAIL); + + H5T_CONV_Fx(FLOAT, INT, float, int, INT_MIN, INT_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_float_uint + * + * Purpose: Convert native float to native unsigned int using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_float_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_float_uint, FAIL); + + H5T_CONV_Fx(FLOAT, UINT, float, unsigned int, 0, UINT_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_double_int + * + * Purpose: Convert native float to native int using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_double_int (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_double_int, FAIL); + + H5T_CONV_Fx(DOUBLE, INT, double, int, INT_MIN, INT_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_double_uint + * + * Purpose: Convert native float to native unsigned int using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_double_uint (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_double_uint, FAIL); + + H5T_CONV_Fx(DOUBLE, UINT, double, unsigned int, 0, UINT_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_float_long + * + * Purpose: Convert native float to native long using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_float_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_float_long, FAIL); + + H5T_CONV_Fx(FLOAT, LONG, float, long, LONG_MIN, LONG_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_float_ulong + * + * Purpose: Convert native float to native unsigned long using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_float_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_float_ulong, FAIL); + + H5T_CONV_Fx(FLOAT, ULONG, float, unsigned long, 0, ULONG_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_double_long + * + * Purpose: Convert native float to native long using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_double_long (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_double_long, FAIL); + + H5T_CONV_Fx(DOUBLE, LONG, double, long, LONG_MIN, LONG_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_double_ulong + * + * Purpose: Convert native float to native unsigned long using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_double_ulong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_double_ulong, FAIL); + + H5T_CONV_Fx(DOUBLE, ULONG, double, unsigned long, 0, ULONG_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_float_llong + * + * Purpose: Convert native float to native long long using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_float_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_float_llong, FAIL); + + H5T_CONV_Fx(FLOAT, LLONG, float, long_long, (-LLONG_MAX-1LL), LLONG_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_float_ullong + * + * Purpose: Convert native float to native unsigned long long using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_float_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_float_ullong, FAIL); + + H5T_CONV_Fx(FLOAT, ULLONG, float, unsigned long_long, 0, ULLONG_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_double_llong + * + * Purpose: Convert native float to native long long using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_double_llong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_double_llong, FAIL); + + H5T_CONV_Fx(DOUBLE, LLONG, double, long_long, (-LLONG_MAX-1LL), LLONG_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- + * Function: H5T_conv_double_ullong + * + * Purpose: Convert native float to native unsigned long long using + * hardware. This is a fast special case. + * + * Return: Non-negative on success/Negative on failure + * + * Programmer: Raymond Lu + * Friday, November 7, 2003 + * + * Modifications: + * + *------------------------------------------------------------------------- + */ +herr_t +H5T_conv_double_ullong (hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, + hsize_t nelmts, size_t buf_stride, + size_t UNUSED bkg_stride, void *buf, void UNUSED *bkg, + hid_t UNUSED dxpl_id) +{ + herr_t ret_value=SUCCEED; /* Return value */ + + FUNC_ENTER_NOAPI(H5T_conv_double_ulong, FAIL); + + H5T_CONV_Fx(DOUBLE, ULLONG, double, unsigned long_long, 0, ULLONG_MAX); + +done: + FUNC_LEAVE_NOAPI(ret_value); +} + + +/*------------------------------------------------------------------------- * Function: H5T_conv_i32le_f64le * * Purpose: Converts 4-byte little-endian integers (signed or unsigned) diff --git a/src/H5Tpkg.h b/src/H5Tpkg.h index 01465ef..9058d90 100644 --- a/src/H5Tpkg.h +++ b/src/H5Tpkg.h @@ -843,6 +843,206 @@ H5_DLL herr_t H5T_conv_double_float(hid_t src_id, hid_t dst_id, size_t buf_stride, size_t bkg_stride, void *buf, void *bkg, hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_char_float(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_char_double(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_uchar_float(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_uchar_double(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_short_float(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_short_double(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_ushort_float(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_ushort_double(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_int_float(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_int_double(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_uint_float(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_uint_double(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_long_float(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_long_double(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_ulong_float(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_ulong_double(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_llong_float(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_llong_double(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_ullong_float(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_ullong_double(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_float_char(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_float_uchar(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_float_short(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_float_ushort(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_float_int(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_float_uint(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_float_long(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_float_ulong(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_float_llong(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_float_ullong(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_double_char(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_double_uchar(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_double_short(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_double_ushort(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_double_int(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_double_uint(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_double_long(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_double_ulong(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_double_llong(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); +H5_DLL herr_t H5T_conv_double_ullong(hid_t src_id, hid_t dst_id, + H5T_cdata_t *cdata, hsize_t nelmts, + size_t buf_stride, size_t bkg_stride, + void *buf, void *bkg, + hid_t dset_xfer_plist); H5_DLL herr_t H5T_conv_i32le_f64le(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, hsize_t nelmts, size_t buf_stride, size_t bkg_stride, |