From 6b7648768be9b0bb4a3090b0a590311f09d57824 Mon Sep 17 00:00:00 2001 From: Zhigang Gong Date: Fri, 12 Sep 2014 17:38:06 +0800 Subject: [PATCH] GBE/libocl: fix a regression after libocl change. Signed-off-by: Zhigang Gong Reviewed-by: He Junyan --- backend/src/libocl/tmpl/ocl_math.tmpl.cl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/src/libocl/tmpl/ocl_math.tmpl.cl b/backend/src/libocl/tmpl/ocl_math.tmpl.cl index c397ca2..f61d107 100644 --- a/backend/src/libocl/tmpl/ocl_math.tmpl.cl +++ b/backend/src/libocl/tmpl/ocl_math.tmpl.cl @@ -3204,9 +3204,6 @@ OVERLOADABLE float pown(float x, int n) { } OVERLOADABLE float rootn(float x, int n) { - if (__ocl_math_fastpath_flag) - return __gen_ocl_internal_fastpath_rootn(x, n); - float ax,re; int sign = 0; if( n == 0 )return NAN; @@ -3233,7 +3230,10 @@ OVERLOADABLE float rootn(float x, int n) { ax = __gen_ocl_fabs(x); if(x <0.0f && (n&1)) sign = 1; - re = __gen_ocl_internal_pow(ax,1.f/n); + if (__ocl_math_fastpath_flag) + re = __gen_ocl_pow(ax, 1.f/n); + else + re = __gen_ocl_internal_pow(ax,1.f/n); if(sign) re = -re; return re; -- 2.7.4