summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/H5config.h.in6
-rw-r--r--test/dtypes.c24
2 files changed, 11 insertions, 19 deletions
diff --git a/src/H5config.h.in b/src/H5config.h.in
index f478dc7..7ed02b0 100644
--- a/src/H5config.h.in
+++ b/src/H5config.h.in
@@ -505,10 +505,14 @@
floating-point values. */
#undef SW_ULONG_TO_FP_BOTTOM_BIT_WORKS
-/* Define if your system can accurately convert unsigned long long values to
+/* Define if your system can roundup accurately convert unsigned long long values to
floating-point values. */
#undef FP_TO_ULLONG_BOTTOM_BIT_WORKS
+/* Define if the maximal number is right on your system convert unsigned long long values to
+ floating-point values. */
+#undef FP_TO_ULLONG_RIGHT_MAXIMUM
+
/* Define if your system supports pthread_attr_setscope(&attribute,
PTHREAD_SCOPE_SYSTEM) call. */
#undef SYSTEM_SCOPE_THREADS
diff --git a/test/dtypes.c b/test/dtypes.c
index 4310cb9..99731ae 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -4530,20 +4530,6 @@ test_conv_int_float(const char *name, hid_t src, hid_t dst)
} /* end if */
#endif /* end H5_ULONG_FP_BOTTOM_BIT_WORKS */
-/* For PGI compiler on Linux, during conversion from 'float' or 'double' to
- * 'unsigned long long', round-up happens when the fraction of float-point
- * value is greater than 0.5. So we allow the converted value to be off by 1.
- */
-#ifndef H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS
- if((src_type==FLT_FLOAT || src_type==FLT_DOUBLE) && dst_type==INT_ULLONG) {
- unsigned long_long tmp_s, tmp_h;
- HDmemcpy(&tmp_s,&buf[j*dst_size],sizeof(unsigned long_long));
- HDmemcpy(&tmp_h,&hw[0],sizeof(unsigned long_long));
- if((tmp_s+1)==tmp_h)
- continue; /*no error*/
- }
-#endif /*end H5_FP_TO_ULLONG_BOTTOM_BIT_WORKS*/
-
/* Print errors */
if (0==fails_this_test++)
H5_FAILED();
@@ -5678,9 +5664,11 @@ run_float_int_conv(const char *name)
nerrors += test_conv_int_float(name, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG);
nerrors += test_conv_int_float(name, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG);
+
+#ifdef H5_FP_TO_ULLONG_RIGHT_MAXIMUM
nerrors += test_conv_int_float(name, H5T_NATIVE_FLOAT, H5T_NATIVE_ULLONG);
nerrors += test_conv_int_float(name, H5T_NATIVE_DOUBLE, H5T_NATIVE_ULLONG);
-#ifdef LATER
+#else /*H5_FP_TO_ULLONG_RIGHT_MAXIMUM*/
{
char str[256]; /*hello string */
@@ -5688,15 +5676,15 @@ run_float_int_conv(const char *name)
name, "float", "unsigned long long");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to conversion being under construction.");
+ HDputs(" Test skipped due to hardware conversion error.");
sprintf(str, "Testing random %s %s -> %s conversions",
name, "double", "unsigned long long");
printf("%-70s", str);
SKIPPED();
- HDputs(" Test skipped due to conversion being under construction.");
+ HDputs(" Test skipped due to hardware conversion error.");
}
-#endif /* LATER */
+#endif /*H5_FP_TO_ULLONG_RIGHT_MAXIMUM*/
#endif
return nerrors;