From 394d5d42aae84ab09cd125e55a82809630caf60d Mon Sep 17 00:00:00 2001 From: Yi Sun Date: Wed, 5 Mar 2014 13:59:26 +0800 Subject: [PATCH] Move the defination union SF to header file utest_helper.hpp Signed-off-by: Yi Sun Reviewed-by: "Song, Ruiling" --- utests/utest_helper.cpp | 14 -------------- utests/utest_helper.hpp | 15 +++++++++++++++ 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/utests/utest_helper.cpp b/utests/utest_helper.cpp index 91633f0..162c47b 100644 --- a/utests/utest_helper.cpp +++ b/utests/utest_helper.cpp @@ -648,20 +648,6 @@ int cl_check_image(const int *img, int w, int h, const char *bmp) return (float(discrepancy) / float(n) > max_error_ratio) ? 0 : 1; } -typedef struct -{ - unsigned int mantissa:23; - unsigned int exponent:8; - unsigned int sign:1; -} FLOAT; - -typedef union -{ - float f; - unsigned int i; - FLOAT spliter; -} SF; - const float cl_FLT_ULP(float float_number) { SF floatBin, ulpBin, ulpBinBase; diff --git a/utests/utest_helper.hpp b/utests/utest_helper.hpp index 0937bf2..0ebad7b 100644 --- a/utests/utest_helper.hpp +++ b/utests/utest_helper.hpp @@ -184,6 +184,21 @@ enum { BIN = 2 }; +/* The SF is float type spliter*/ +typedef struct +{ + unsigned int mantissa:23; + unsigned int exponent:8; + unsigned int sign:1; +} FLOAT; + +typedef union +{ + float f; + unsigned int i; + FLOAT spliter; +} SF; + /* Init OpenCL */ extern int cl_ocl_init(void); -- 2.7.4