pass device function as an argument to global kernel

Hi,
Is it possible that I pass a device function as an argument to a global kernel so that it can be invoked inside the kernel?

attributes(global) subroutine my_kernel(func_name)
 

end subroutine
attributes(device) function do_st() result(res)
  integer :: res


end

then

call my_kernel<<<diimGrid, dimBlock>>>(do_st)

Thanks,

Tuan

Hi Tuan,

No. True function calling isn’t supported yet. All device routines need to be in-lined at compile time.

Go Ducks!
Mat