aboutsummaryrefslogtreecommitdiffstats
path: root/compute_ref.c
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@st.com>2011-07-19 16:33:25 +0200
committerChristophe Lyon <christophe.lyon@st.com>2011-07-19 16:33:25 +0200
commite65c946839e5359c78710ecaf39956ede90d5cd3 (patch)
treed2666335a779bd6545044de75b88a7a9a3dd3319 /compute_ref.c
parent74dd60f36c906ab718429d0d0e7c98670ad120f6 (diff)
downloadplatform_external_arm-neon-tests-e65c946839e5359c78710ecaf39956ede90d5cd3.tar.gz
platform_external_arm-neon-tests-e65c946839e5359c78710ecaf39956ede90d5cd3.tar.bz2
platform_external_arm-neon-tests-e65c946839e5359c78710ecaf39956ede90d5cd3.zip
Merge from SVN #538
[CL] force FP output with 2 digits for the exponent when compiled with MSVC
Diffstat (limited to 'compute_ref.c')
-rw-r--r--compute_ref.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/compute_ref.c b/compute_ref.c
index def1203..81842bb 100644
--- a/compute_ref.c
+++ b/compute_ref.c
@@ -186,6 +186,13 @@ extern void exec_dspfns(void); /* DSP FNS (non-NEON/ITU) intrinsics */
int main (void)
{
+#if defined(_MSC_VER)
+ /* When compiled with MSVC, force output of FP numbers with only 2
+ * digits for the exponent, for easier comparison of the results
+ * with GCC. */
+ _set_output_format(_TWO_DIGIT_EXPONENT);
+#endif
+
log_file = fopen (LOGFILE, "w");
if (log_file == NULL) {
fprintf (stderr, "Error opening log file "LOGFILE"\n");