summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuo Yejun <yejun.guo@intel.com>2014-11-03 10:41:30 +0800
committerZhigang Gong <zhigang.gong@intel.com>2014-12-02 17:16:30 +0800
commit3db0329853f97d6cd06a82d3277b6294065c6c51 (patch)
tree232c8ddb5e3707590452e7ed588b2a106295b706
parent032b45dc2a49f005338ac0bb09bd1800f8da2e42 (diff)
clean code, the logic is already at the beginning of function
Signed-off-by: Guo Yejun <yejun.guo@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
-rw-r--r--src/cl_mem.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/cl_mem.c b/src/cl_mem.c
index 1f1b6682..916e909a 100644
--- a/src/cl_mem.c
+++ b/src/cl_mem.c
@@ -377,22 +377,6 @@ cl_mem_new_buffer(cl_context ctx,
goto error;
}
- /* CL_MEM_ALLOC_HOST_PTR and CL_MEM_USE_HOST_PTR
- are mutually exclusive. */
- if (UNLIKELY(flags & CL_MEM_ALLOC_HOST_PTR &&
- flags & CL_MEM_USE_HOST_PTR)) {
- err = CL_INVALID_HOST_PTR;
- goto error;
- }
-
- /* CL_MEM_COPY_HOST_PTR and CL_MEM_USE_HOST_PTR
- are mutually exclusive. */
- if (UNLIKELY(flags & CL_MEM_COPY_HOST_PTR &&
- flags & CL_MEM_USE_HOST_PTR)) {
- err = CL_INVALID_HOST_PTR;
- goto error;
- }
-
if ((err = cl_get_device_info(ctx->device,
CL_DEVICE_MAX_MEM_ALLOC_SIZE,
sizeof(max_mem_size),