Signed-off-by: Yi Sun <yi.sun@intel.com>
Reviewed-by: "Song, Ruiling" <ruiling.song@intel.com>
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;
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);