[Beignet] [PATCH 5/5] Update the printf test case.
junyan.he at inbox.com
junyan.he at inbox.com
Tue Jun 17 23:42:36 PDT 2014
From: Junyan He <junyan.he at linux.intel.com>
Signed-off-by: Junyan He <junyan.he at linux.intel.com>
---
kernels/test_printf.cl | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/kernels/test_printf.cl b/kernels/test_printf.cl
index 3f4c98d..1629b37 100644
--- a/kernels/test_printf.cl
+++ b/kernels/test_printf.cl
@@ -4,10 +4,29 @@ test_printf(void)
int x = (int)get_global_id(0);
int y = (int)get_global_id(1);
int z = (int)get_global_id(2);
+ uint a = 'x';
+ float f = 5.0;
+
+ if (x == 0 && y == 0 && z == 0) {
+ printf("--- Welcome to the printf test ---\n");
+
+ printf("### output a char is %c\n", a);
+ }
if (x % 15 == 0)
if (y % 3 == 0)
if (z % 7 == 0)
printf("######## global_id(x, y, z) = (%d, %d, %d), global_size(d0, d1, d3) = (%d, %d, %d)\n",
x, y, z, get_global_size(0), get_global_size(1), get_global_size(2));
+
+ if (x == 1)
+ if (y == 0)
+ if (z % 2 == 0)
+ printf("#### output a float is %f\n", f);
+ else
+ printf("#### output a float to int is %d\n", f);
+
+ if (x == 0 && y == 0 && z == 0) {
+ printf("--- End to the printf test ---\n");
+ }
}
--
1.8.3.2
More information about the Beignet
mailing list