Move the memory allocate size check to the callee.
authorYang Rong <rong.r.yang@intel.com>
Tue, 7 Jan 2014 03:30:54 +0000 (11:30 +0800)
committerZhigang Gong <zhigang.gong@intel.com>
Wed, 8 Jan 2014 05:23:26 +0000 (13:23 +0800)
commit2a2dda732feec8eb9ad1d757146b32bef19c17de
tree1ae4099e623df42c4a9f0eb16d56e6698cfbbda0
parentffebe3b5272b7216a8f7666786d82b6c22aa6f81
Move the memory allocate size check to the callee.

Because image's alignment, the alloc size may exceed the CL_DEVICE_MAX_MEM_ALLOC_SIZE if the
image's size is calculate from it. So move the size check from cl_mem_allocate to the callee, and
slightly enlarge the limit size when check in allocate image.

Signed-off-by: Yang Rong <rong.r.yang@intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
src/cl_gt_device.h
src/cl_mem.c