The patch looks good to me. Thanks! Ruiling -----Original Message----- From: Beignet [mailto:[email protected]] On Behalf Of Yang Rong Sent: Monday, August 04, 2014 3:04 PM To: [email protected] Cc: Yang, Rong R Subject: [Beignet] [PATCH] Fix a utest compiler_async_stride_copy typo.
And need to convert to char when compare. Signed-off-by: Yang Rong <[email protected]> --- utests/compiler_async_stride_copy.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/utests/compiler_async_stride_copy.cpp b/utests/compiler_async_stride_copy.cpp index 132f917..2e9eaeb 100644 --- a/utests/compiler_async_stride_copy.cpp +++ b/utests/compiler_async_stride_copy.cpp @@ -19,7 +19,7 @@ static void compiler_async_stride_copy(void) OCL_MAP_BUFFER(1); for (uint32_t i = 0; i < n * copiesPerWorkItem * 4 * stride; ++i) - ((char*)buf_data[1])[i] = rand() && 0xff; + ((char*)buf_data[1])[i] = rand() & 0xff; OCL_UNMAP_BUFFER(1); // Run the kernel @@ -33,10 +33,10 @@ static void compiler_async_stride_copy(void) char *dst = (char*)buf_data[0]; char *src = (char*)buf_data[1]; for (uint32_t i = 0; i < n * copiesPerWorkItem; i += stride * 4) { - OCL_ASSERT(dst[i + 0] == src[i + 0] + 3); - OCL_ASSERT(dst[i + 1] == src[i + 1] + 3); - OCL_ASSERT(dst[i + 2] == src[i + 2] + 3); - OCL_ASSERT(dst[i + 3] == src[i + 3] + 3); + OCL_ASSERT(dst[i + 0] == (char)(src[i + 0] + 3)); + OCL_ASSERT(dst[i + 1] == (char)(src[i + 1] + 3)); + OCL_ASSERT(dst[i + 2] == (char)(src[i + 2] + 3)); + OCL_ASSERT(dst[i + 3] == (char)(src[i + 3] + 3)); } OCL_UNMAP_BUFFER(0); OCL_UNMAP_BUFFER(1); -- 1.8.3.2 _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet _______________________________________________ Beignet mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/beignet
