[Beignet] [PATCH] utest: fix i386 system long ctz fail.

Pan, Xiuli xiuli.pan at intel.com
Tue Jan 3 08:43:31 UTC 2017


LGTM.

-----Original Message-----
From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of Yang Rong
Sent: Tuesday, January 3, 2017 6:14 PM
To: beignet at lists.freedesktop.org
Cc: Yang, Rong R <rong.r.yang at intel.com>
Subject: [Beignet] [PATCH] utest: fix i386 system long ctz fail.

Use 1ll as uint64_t.

Signed-off-by: Yang Rong <rong.r.yang at intel.com>
---
 utests/compiler_ctz.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/utests/compiler_ctz.cpp b/utests/compiler_ctz.cpp index 88f2109..d84fdad 100644
--- a/utests/compiler_ctz.cpp
+++ b/utests/compiler_ctz.cpp
@@ -19,7 +19,7 @@ void test(const char *kernel_name)
 
   OCL_MAP_BUFFER(0);
   for (uint32_t i = 0; i < n; ++i) {
-      ((U*)buf_data[0])[i] = 1l << i;
+      ((U*)buf_data[0])[i] = 1ll << i;
       if(i == sizeof(U)*8)
         ((U*)buf_data[0])[i] = 0;
   }
--
2.1.4

_______________________________________________
Beignet mailing list
Beignet at lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/beignet


More information about the Beignet mailing list