diff options
author | Zhigang Gong <zhigang.gong@intel.com> | 2014-12-24 08:54:59 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2015-01-04 16:54:45 +0800 |
commit | 4b65235bb7db3df2d1491f1de962d5a92414685b (patch) | |
tree | 796bb52067f8148023217581d7ab3a357055831c /utests/sub_buffer.cpp | |
parent | c7245460c9bf1f316cee9e90dada02471c32fda8 (diff) | |
download | beignet-4b65235bb7db3df2d1491f1de962d5a92414685b.tar.gz |
utests: reduce test count.
No need to iterate so many times.
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
Tested-by: "Meng, Mengmeng" <mengmeng.meng@intel.com>
Diffstat (limited to 'utests/sub_buffer.cpp')
-rw-r--r-- | utests/sub_buffer.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/utests/sub_buffer.cpp b/utests/sub_buffer.cpp index d32fd653..62280344 100644 --- a/utests/sub_buffer.cpp +++ b/utests/sub_buffer.cpp @@ -15,6 +15,7 @@ void sub_buffer_check(void) error = clGetDeviceInfo(device, CL_DEVICE_MEM_BASE_ADDR_ALIGN, sizeof(address_align ), &address_align, NULL ); OCL_ASSERT(error == CL_SUCCESS); + max_alloc_size /= 8; main_buf_content = (char *)malloc(sizeof(char) * max_alloc_size); for (cl_ulong i = 0; i < max_alloc_size; i++) { @@ -25,8 +26,8 @@ void sub_buffer_check(void) OCL_ASSERT(error == CL_SUCCESS); /* Test read sub buffer. */ - for (cl_ulong sz = 64; sz < max_alloc_size; sz*=4) { - for (cl_ulong off = 0; off < max_alloc_size; off += 1234) { + for (cl_ulong sz = max_alloc_size / 4; sz <= max_alloc_size; sz += max_alloc_size / 4) { + for (cl_ulong off = 0; off < max_alloc_size; off += 1234 + max_alloc_size / 3) { cl_buffer_region region; region.origin = off; region.size = sz; @@ -71,8 +72,8 @@ void sub_buffer_check(void) } - for (cl_ulong sz = 64; sz < max_alloc_size; sz*=4) { - for (cl_ulong off = 0; off < max_alloc_size; off += 1234) { + for (cl_ulong sz = max_alloc_size / 4; sz <= max_alloc_size; sz += max_alloc_size / 4) { + for (cl_ulong off = 0; off < max_alloc_size; off += 1234 + max_alloc_size / 3) { cl_buffer_region region; region.origin = off; region.size = sz; |