[Beignet] [Patch V2] Runtime: Use cl_ulong as CL_DEVICE_MAX_MEM_ALLOC_SIZE's return type.
Yang Rong
rong.r.yang at intel.com
Thu Dec 15 06:47:31 UTC 2016
From: Meng Mengmeng <mengmeng.meng at intel.com>
Also memset the param_value to avoid garbage when param_value_size >
filed sz.
Signed-off-by: Yang Rong <rong.r.yang at intel.com>
---
src/cl_device_id.h | 2 +-
src/cl_mem.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/cl_device_id.h b/src/cl_device_id.h
index 69aeeac..58d1d76 100644
--- a/src/cl_device_id.h
+++ b/src/cl_device_id.h
@@ -54,7 +54,7 @@ struct _cl_device_id {
cl_uint native_vector_width_half;
cl_uint max_clock_frequency;
cl_uint address_bits;
- size_t max_mem_alloc_size;
+ cl_ulong max_mem_alloc_size;
cl_device_svm_capabilities svm_capabilities;
cl_uint preferred_platform_atomic_alignment;
cl_uint preferred_global_atomic_alignment;
diff --git a/src/cl_mem.c b/src/cl_mem.c
index afce315..4707f48 100644
--- a/src/cl_mem.c
+++ b/src/cl_mem.c
@@ -141,6 +141,7 @@ cl_get_mem_object_info(cl_mem mem,
break;
case CL_MEM_USES_SVM_POINTER:
*((cl_uint *)param_value) = mem->is_svm;
+ break;
}
return CL_SUCCESS;
--
2.1.4
More information about the Beignet
mailing list