diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2005-08-29 15:21:58 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2005-08-29 15:21:58 (GMT) |
commit | bd4312d0497592a665a25415ec2f9d3db9d9f6b2 (patch) | |
tree | 4c9e7590f44a1382ed651756835391245103efa6 /src/H5T.c | |
parent | 636b5829a9c5c8908f4eefa71f7b653f4f1697ea (diff) | |
download | hdf5-bd4312d0497592a665a25415ec2f9d3db9d9f6b2.zip hdf5-bd4312d0497592a665a25415ec2f9d3db9d9f6b2.tar.gz hdf5-bd4312d0497592a665a25415ec2f9d3db9d9f6b2.tar.bz2 |
[svn-r11311] Purpose: New features.
Description: Added 2 new configure options, --enable-exception and --enable-accuracy.
--enable-exception lets the library check whether user's exception handling
functions are present during compiler data conversions and use them if they are.
When it's disabled, this step is skipped to improve conversion speed. This
step isn't implemented yet for soft conversions because there would be little
gain in speed.
--enable-accuracy guarantees data accuracy during data conversions. It means
the library will choose compiler conversions only if the accurate data is
secured. Otherwise, the library will go for the library's own conversions. If
this option is disabled, the library uses compiler conversions in favor of
their speed as long as they work even if data can be incorrect.
Platforms tested: h5committest and fuss. Some systems may fail after this
checkin.
Diffstat (limited to 'src/H5T.c')
-rw-r--r-- | src/H5T.c | 104 |
1 files changed, 52 insertions, 52 deletions
@@ -1001,16 +1001,16 @@ H5T_init_interface(void) */ /* floating point */ -#if H5_CONVERT_DENORMAL_FLOAT +#if FP_FP status |= H5T_register(H5T_PERS_HARD, "flt_dbl", native_float, native_double, H5T_conv_float_double, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "dbl_flt", native_double, native_float, H5T_conv_double_float, H5AC_dxpl_id); -#if H5_SIZEOF_LONG_DOUBLE !=0 +#endif /*FP_FP*/ +#if FP_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "flt_ldbl", native_float, native_ldouble, H5T_conv_float_ldouble, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "dbl_ldbl", native_double, native_ldouble, H5T_conv_double_ldouble, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "ldbl_flt", native_ldouble, native_float, H5T_conv_ldouble_float, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "ldbl_dbl", native_ldouble, native_double, H5T_conv_ldouble_double, H5AC_dxpl_id); -#endif -#endif /*H5_CONVERT_DENORMAL_FLOAT*/ +#endif /*FP_LDOUBLE*/ /* from long_long */ status |= H5T_register(H5T_PERS_HARD, "llong_ullong", native_llong, native_ullong, H5T_conv_llong_ullong, H5AC_dxpl_id); @@ -1115,149 +1115,149 @@ H5T_init_interface(void) /* From char to floats */ status |= H5T_register(H5T_PERS_HARD, "schar_flt", native_schar, native_float, H5T_conv_schar_float, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "schar_dbl", native_schar, native_double, H5T_conv_schar_double, H5AC_dxpl_id); -#if H5_SW_INTEGER_TO_LDOUBLE_WORKS +#if INTEGER_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "schar_ldbl", native_schar, native_ldouble, H5T_conv_schar_ldouble, H5AC_dxpl_id); -#endif /* H5_SW_INTEGER_TO_LDOUBLE_WORKS */ +#endif /* INTEGER_LDOUBLE */ /* 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); -#if H5_SW_INTEGER_TO_LDOUBLE_WORKS +#if INTEGER_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "uchar_ldbl", native_uchar, native_ldouble, H5T_conv_uchar_ldouble, H5AC_dxpl_id); -#endif /*H5_SW_INTEGER_TO_LDOUBLE_WORKS*/ +#endif /* INTEGER_LDOUBLE */ /* 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); -#if H5_SW_INTEGER_TO_LDOUBLE_WORKS +#if INTEGER_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "short_ldbl", native_short, native_ldouble, H5T_conv_short_ldouble, H5AC_dxpl_id); -#endif /*H5_SW_INTEGER_TO_LDOUBLE_WORKS*/ +#endif /* INTEGER_LDOUBLE */ /* 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); -#if H5_SW_INTEGER_TO_LDOUBLE_WORKS +#if INTEGER_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "ushort_ldbl", native_ushort, native_ldouble, H5T_conv_ushort_ldouble, H5AC_dxpl_id); -#endif /*H5_SW_INTEGER_TO_LDOUBLE_WORKS*/ +#endif /* INTEGER_LDOUBLE */ /* 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); -#if H5_SW_INTEGER_TO_LDOUBLE_WORKS +#if INTEGER_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "int_ldbl", native_int, native_ldouble, H5T_conv_int_ldouble, H5AC_dxpl_id); -#endif /*H5_SW_INTEGER_TO_LDOUBLE_WORKS*/ +#endif /* INTEGER_LDOUBLE */ /* 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); -#if H5_SW_INTEGER_TO_LDOUBLE_WORKS +#if INTEGER_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "uint_ldbl", native_uint, native_ldouble, H5T_conv_uint_ldouble, H5AC_dxpl_id); -#endif /*H5_SW_INTEGER_TO_LDOUBLE_WORKS*/ +#endif /* INTEGER_LDOUBLE */ /* 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); -#if H5_SW_INTEGER_TO_LDOUBLE_WORKS +#if INTEGER_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "long_ldbl", native_long, native_ldouble, H5T_conv_long_ldouble, H5AC_dxpl_id); -#endif /*H5_SW_INTEGER_TO_LDOUBLE_WORKS*/ +#endif /* INTEGER_LDOUBLE */ /* From unsigned long to floats */ -#if H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS +#if ULONG_FP 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); -#endif /* H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS */ -#if H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS && H5_SW_INTEGER_TO_LDOUBLE_WORKS +#endif /* ULONG_FP */ +#if ULONG_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "ulong_ldbl", native_ulong, native_ldouble, H5T_conv_ulong_ldouble, H5AC_dxpl_id); -#endif /* H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS && H5_SW_INTEGER_TO_LDOUBLE_WORKS */ +#endif /* ULONG_LDOUBLE */ /* 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); -#if H5_SW_INTEGER_TO_LDOUBLE_WORKS +#if INTEGER_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "llong_ldbl", native_llong, native_ldouble, H5T_conv_llong_ldouble, H5AC_dxpl_id); -#endif /* H5_SW_INTEGER_TO_LDOUBLE_WORKS */ +#endif /* INTEGER_LDOUBLE */ /* From unsigned long long to floats */ -#if H5_ULLONG_TO_FP_CAST_WORKS && H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS +#if ULLONG_FP 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); -#if H5_ULLONG_TO_LDOUBLE_PRECISION_WORKS +#endif /* ULLONG_FP */ +#if ULLONG_LDOUBLE status |= H5T_register(H5T_PERS_HARD, "ullong_ldbl", native_ullong, native_ldouble, H5T_conv_ullong_ldouble, H5AC_dxpl_id); -#endif /* H5_ULLONG_TO_LDOUBLE_PRECISION_WORKS */ -#endif /* H5_ULLONG_TO_FP_CAST_WORKS && H5_SW_ULONG_TO_FP_BOTTOM_BIT_WORKS */ +#endif /* ULLONG_LDOUBLE */ /* From floats to char */ status |= H5T_register(H5T_PERS_HARD, "flt_schar", native_float, native_schar, H5T_conv_float_schar, H5AC_dxpl_id); status |= H5T_register(H5T_PERS_HARD, "dbl_schar", native_double, native_schar, H5T_conv_double_schar, H5AC_dxpl_id); -#if H5_SW_LDOUBLE_TO_INTEGER_WORKS +#if LDOUBLE_INTEGER status |= H5T_register(H5T_PERS_HARD, "ldbl_schar", native_ldouble, native_schar, H5T_conv_ldouble_schar, H5AC_dxpl_id); -#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */ +#endif /* LDOUBLE_INTEGER */ /* 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); -#if H5_SW_LDOUBLE_TO_INTEGER_WORKS +#if LDOUBLE_INTEGER status |= H5T_register(H5T_PERS_HARD, "ldbl_uchar", native_ldouble, native_uchar, H5T_conv_ldouble_uchar, H5AC_dxpl_id); -#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */ +#endif /* LDOUBLE_INTEGER */ /* 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); -#if H5_SW_LDOUBLE_TO_INTEGER_WORKS +#if LDOUBLE_INTEGER status |= H5T_register(H5T_PERS_HARD, "ldbl_short", native_ldouble, native_short, H5T_conv_ldouble_short, H5AC_dxpl_id); -#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */ +#endif /* LDOUBLE_INTEGER */ /* 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); -#if H5_SW_LDOUBLE_TO_INTEGER_WORKS +#if LDOUBLE_INTEGER status |= H5T_register(H5T_PERS_HARD, "ldbl_ushort", native_ldouble, native_ushort, H5T_conv_ldouble_ushort, H5AC_dxpl_id); -#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */ +#endif /* LDOUBLE_INTEGER */ /* 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); -#if H5_SW_LDOUBLE_TO_INTEGER_WORKS +#if LDOUBLE_INTEGER status |= H5T_register(H5T_PERS_HARD, "ldbl_int", native_ldouble, native_int, H5T_conv_ldouble_int, H5AC_dxpl_id); -#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */ +#endif /* LDOUBLE_INTEGER */ /* 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); -#if H5_SW_LDOUBLE_TO_INTEGER_WORKS && H5_CV_LDOUBLE_TO_UINT_WORKS +#if LDOUBLE_UINT status |= H5T_register(H5T_PERS_HARD, "ldbl_uint", native_ldouble, native_uint, H5T_conv_ldouble_uint, H5AC_dxpl_id); -#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS && H5_CV_LDOUBLE_TO_UINT_WORKS */ +#endif /* LDOUBLE_UINT */ 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); -#if H5_SW_LDOUBLE_TO_INTEGER_WORKS +#if LDOUBLE_INTEGER status |= H5T_register(H5T_PERS_HARD, "ldbl_long", native_ldouble, native_long, H5T_conv_ldouble_long, H5AC_dxpl_id); -#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */ +#endif /* LDOUBLE_INTEGER */ /* 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); -#if H5_SW_LDOUBLE_TO_INTEGER_WORKS +#if LDOUBLE_INTEGER status |= H5T_register(H5T_PERS_HARD, "ldbl_ulong", native_ldouble, native_ulong, H5T_conv_ldouble_ulong, H5AC_dxpl_id); -#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */ +#endif /* LDOUBLE_INTEGER */ /* From floats to long long */ -#ifndef H5_HW_FP_TO_LLONG_NOT_WORKS +#if FP_LLONG 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); -#if H5_SW_LDOUBLE_TO_INTEGER_WORKS +#endif /* FP_LLONG */ +#if LDOUBLE_LLONG status |= H5T_register(H5T_PERS_HARD, "ldbl_llong", native_ldouble, native_llong, H5T_conv_ldouble_llong, H5AC_dxpl_id); -#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */ -#endif /* !H5_HW_FP_TO_LLONG_NOT_WORKS */ +#endif /* LDOUBLE_LLONG */ /* From floats to unsigned long long */ -#if H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS && H5_FP_TO_ULLONG_RIGHT_MAXIMUM +#if FP_ULLONG 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); -#if H5_SW_LDOUBLE_TO_INTEGER_WORKS +#endif /* FP_ULLONG */ +#if LDOUBLE_ULLONG status |= H5T_register(H5T_PERS_HARD, "ldbl_ullong", native_ldouble, native_ullong, H5T_conv_ldouble_ullong, H5AC_dxpl_id); -#endif /* H5_SW_LDOUBLE_TO_INTEGER_WORKS */ -#endif /* H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS && H5_FP_TO_ULLONG_RIGHT_MAXIMUM */ +#endif /* LDOUBLE_ULLONG */ /* * The special no-op conversion is the fastest, so we list it last. The |