summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunyan He <junyan.he@linux.intel.com>2015-01-21 15:05:29 +0800
committerZhigang Gong <zhigang.gong@intel.com>2015-01-22 07:25:51 +0800
commit4d39af0f127f72e52e83b0b9f266c51db8875e51 (patch)
treef9f9a6feab51de225109e18017766fc9ffd8b6ea
parent539727527faa121da59767145c5c704defa00958 (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.cpp10
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