[Beignet] [PATCH] GBE/libocl: fix a regression after libocl change.

He Junyan junyan.he at inbox.com
Mon Sep 15 20:14:27 PDT 2014


LGTM, thanks

On 二, 2014-09-16 at 09:57 +0800, Zhigang Gong wrote:
> Ping for review.
> 
> On Fri, Sep 12, 2014 at 05:38:06PM +0800, Zhigang Gong wrote:
> > Signed-off-by: Zhigang Gong <zhigang.gong at intel.com>
> > ---
> >  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;
> > -- 
> > 1.8.3.2
> > 
> > _______________________________________________
> > Beignet mailing list
> > Beignet at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/beignet
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet





More information about the Beignet mailing list