[Beignet] [PATCH 4/9] runtime: initialize the memory content to 0.
xionghu.luo at intel.com
xionghu.luo at intel.com
Thu Nov 12 00:41:50 PST 2015
From: Luo Xionghu <xionghu.luo at intel.com>
Signed-off-by: Luo Xionghu <xionghu.luo at intel.com>
---
src/cl_api.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/cl_api.c b/src/cl_api.c
index ddd39cf..9eb4ffd 100644
--- a/src/cl_api.c
+++ b/src/cl_api.c
@@ -56,6 +56,7 @@ typedef intptr_t cl_device_partition_property;
do { \
if (param_value && param_value_size < sizeof(TYPE)*ELT) \
return CL_INVALID_VALUE; \
+ memset(param_value, 0, param_value_size); \
if (param_value) { \
memcpy(param_value, (VAL), sizeof(TYPE)*ELT); \
} \
--
1.9.1
More information about the Beignet
mailing list