In this PR I propose the way how to avoid double dereference in Kernel code inside function __work_group_reduce_kernel .
Double dereference has place here in Kernel's code in cases when we pass into this function simple pointer : we pass it by reference.
In this PR I propose the way how to avoid double dereference in Kernel code inside function
__work_group_reduce_kernel
. Double dereference has place here in Kernel's code in cases when we pass into this function simplepointer
: we pass it by reference.This problem also demonstrated in example, prepared by @julianmi : https://godbolt.org/z/rP7WbW94o