aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGil Pitney <gil.pitney@linaro.org>2015-04-29 16:55:55 +0000
committerGil Pitney <gil.pitney@linaro.org>2015-04-29 16:55:55 +0000
commit7dd00e516e90d5ad84aa6ebedf7fc2bfea25247f (patch)
tree733ef242e3cca9d00279b3e451629b9b86e6e0ce /include
parent6e94d7f24bf1d4c15fc21003289ad968a240d8b3 (diff)
Added printf builtin for v1.2
This adds an OpenCL C file taken from pocl, with some minor tweaks. Per the Khronos v1.2 test_printf test case, this enables all of the 57 sub tests to pass, with two exceptions: *** Testing printf for vector *** 0)testing printf("%2.2v4hlf",(1.0f,2.0f,3.0f,4.0f)) *** FAILED *** 4)testing printf("%v2ld",(12345678,98765432)) *** FAILED *** Some debugging indicates a possible issue involving va_args and floating point types, which becomes apparent when passing vectors of floats to a variadic function. Signed-off-by: Gil Pitney <gil.pitney@linaro.org>
Diffstat (limited to 'include')
-rw-r--r--include/cpu.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/cpu.h b/include/cpu.h
index 1e8380f..0f74f1f 100644
--- a/include/cpu.h
+++ b/include/cpu.h
@@ -267,7 +267,8 @@ TERNARY_VEC_DECL(uint, uint, mad_sat)
TERNARY_VEC_DECL(long, long, mad_sat)
TERNARY_VEC_DECL(ulong, ulong, mad_sat)
-int printf(__constant char* _format, ...);
+int _cl_printf(__constant char* restrict _format, ...);
+#define printf _cl_printf
void *memcpy(void *dst, const void * src, uint size);
_CLC_DECL size_t get_local_id (uint dim);