Fix incompatiable pointer type warning for device_execution test
There are multiple incompatiable pointer types warnings when compiling the device_execution test with clang. There was an upstream llvm patch that will turn these warnings into an error https://github.com/llvm/llvm-project/pull/157364.
To not encounter this issue in the future, fix these warnings by changing the parameter types.
warning: incompatible pointer types passing '__global ulong (*)[512]' (aka '__global unsigned long (*)[512]') to parameter of type 'const __generic ulong *' (aka 'const __generic unsigned long *') [-Wincompatible-pointer-types]
37 | void (^checkBlock) (void) = ^{ check_res(tid, &value, res); };
| ^~~~~~
note: passing argument to parameter 'value' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
10 | void (^kernelBlock)(void) = ^{ block_fn(len, val); };
| ^~~
note: passing argument to parameter 'val' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
10 | void (^kernelBlock)(void) = ^{ block_fn(len, val); };
| ^~~
note: passing argument to parameter 'val' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
10 | void (^kernelBlock)(void) = ^{ block_fn(len, val); };
| ^~~
note: passing argument to parameter 'val' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
10 | void (^kernelBlock)(void) = ^{ block_fn(len, val); };
| ^~~
note: passing argument to parameter 'val' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
10 | void (^kernelBlock)(void) = ^{ block_fn(len, val); };
| ^~~
note: passing argument to parameter 'val' here
--
warning: incompatible pointer types passing '__global int *const __private' to parameter of type '__global atomic_uint *' (aka '__global _Atomic(unsigned int) *') [-Wincompatible-pointer-types]
10 | void (^kernelBlock)(void) = ^{ block_fn(len, val); };
| ^~~
note: passing argument to parameter 'val' here
Hi @bashbaug,
This is my first PR here so I am not sure who to add as a reviewer but I see that you are a frequent reviewer. Can you help to review or address this issue?
@bashbaug @paulfradgley any ideas who can help review this one? Thanks
@bashbaug @vangthao95 : Are we now good to merge this patch?
I added focused review. I hope we can land this soon.
Merging as discussed over email.