[Beignet] [PATCH] no "div by zero" in smoothstep test case
Homer Hsing
homer.xing at intel.com
Sun Aug 11 22:51:26 PDT 2013
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
More information about the Beignet
mailing list