Signed-off-by: Ruiling Song <[email protected]>
---
backend/src/libocl/tmpl/ocl_math.tmpl.cl | 2 ++
1 file changed, 2 insertions(+)
diff --git a/backend/src/libocl/tmpl/ocl_math.tmpl.cl
b/backend/src/libocl/tmpl/ocl_math.tmpl.cl
index 3ec9af6..d857890 100644
--- a/backend/src/libocl/tmpl/ocl_math.tmpl.cl
+++ b/backend/src/libocl/tmpl/ocl_math.tmpl.cl
@@ -3262,6 +3262,8 @@ OVERLOADABLE float fract(float x, private float *p) {
BODY; }
int n,hx,hy,hz,ix,iy,sx,i,sy; \
uint q,sxy; \
Zero[0] = 0.0;Zero[1] = -0.0; \
+ if (x == 0.0f) { x = 0.0f; }; \
+ if (y == 0.0f) { y = 0.0f; }\
GEN_OCL_GET_FLOAT_WORD(hx,x);GEN_OCL_GET_FLOAT_WORD(hy,y); \
sxy = (hx ^ hy) & 0x80000000;sx = hx&0x80000000;sy = hy&0x80000000; \
hx ^=sx; hy &= 0x7fffffff; \
--
1.7.10.4
_______________________________________________
Beignet mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/beignet