diff options
author | Junyan He <junyan.he@linux.intel.com> | 2015-01-21 15:05:29 +0800 |
---|---|---|
committer | Zhigang Gong <zhigang.gong@intel.com> | 2015-01-26 08:17:05 +0800 |
commit | b3eaa3af242d2359ff4d961196cfa910271d45dd (patch) | |
tree | 6780f4863168bf09ca039f660a521e522e36ef0a | |
parent | 4eb4477ffc7e1eefe577350602facd9aaab09374 (diff) |
Fix bug for bitcast test case because of long type.
ulong and uint64_t have different size on i386 and
i386_64, which cause the test case failure.
Signed-off-by: Junyan He <junyan.he@linux.intel.com>
Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
-rw-r--r-- | utests/compiler_long_bitcast.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/utests/compiler_long_bitcast.cpp b/utests/compiler_long_bitcast.cpp index 5bd962de..112363a7 100644 --- a/utests/compiler_long_bitcast.cpp +++ b/utests/compiler_long_bitcast.cpp @@ -43,7 +43,7 @@ void compiler_bitcast_long_to_char8(void) { const size_t n = 64; const int v = 8; - ulong src[n]; + uint64_t src[n]; char *dst = (char *)src; // Setup kernel and buffers @@ -92,7 +92,7 @@ void compiler_bitcast_int2_to_long(void) locals[0] = 16; for (int32_t i = 0; i < (int32_t) n*v; ++i) { - src[i] = (char)rand(); + src[i] = (int)rand(); } OCL_MAP_BUFFER(0); @@ -115,7 +115,7 @@ void compiler_bitcast_long_to_int2(void) { const size_t n = 64; const int v = 2; - ulong src[n]; + uint64_t src[n]; uint32_t *dst = (uint32_t *)src; // Setup kernel and buffers @@ -164,7 +164,7 @@ void compiler_bitcast_short4_to_long(void) locals[0] = 16; for (int32_t i = 0; i < (int32_t) n*v; ++i) { - src[i] = (char)rand(); + src[i] = (short)rand(); } OCL_MAP_BUFFER(0); @@ -187,7 +187,7 @@ void compiler_bitcast_long_to_short4(void) { const size_t n = 64; const int v = 4; - ulong src[n]; + uint64_t src[n]; uint16_t *dst = (uint16_t *)src; // Setup kernel and buffers |