[Beignet] [PATCH] no "div by zero" in smoothstep test case

Zhigang Gong zhigang.gong at linux.intel.com
Sun Aug 11 23:59:44 PDT 2013


LGTM, pushed, thanks.

On Mon, Aug 12, 2013 at 01:51:26PM +0800, Homer Hsing wrote:
> 
> Signed-off-by: Homer Hsing <homer.xing at intel.com>
> ---
>  utests/compiler_smoothstep.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/utests/compiler_smoothstep.cpp b/utests/compiler_smoothstep.cpp
> index 760063b..363ea7e 100644
> --- a/utests/compiler_smoothstep.cpp
> +++ b/utests/compiler_smoothstep.cpp
> @@ -34,7 +34,7 @@ void compiler_smoothstep(void)
>    OCL_MAP_BUFFER(2);
>    for (int i = 0; i < n; ++i) {
>      float a = 0.1f * (rand() & 15) - 0.75f;
> -    float b = a + 0.1f * (rand() & 15);
> +    float b = a + 0.1f * (rand() & 15) + 0.1f;
>      float c = 0.1f * (rand() & 15) - 0.75f;
>      src1[i] = ((float*)buf_data[0])[i] = a;
>      src2[i] = ((float*)buf_data[1])[i] = b;
> -- 
> 1.8.1.2
> 
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list