PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

pass device function as an argument to global kernel

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming
View previous topic :: View next topic  
Author Message
Tuan



Joined: 11 Jun 2009
Posts: 233

PostPosted: Sun Jan 09, 2011 10:22 pm    Post subject: pass device function as an argument to global kernel Reply with quote

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?

Code:
attributes(global) subroutine my_kernel(func_name)
 

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


end
then
Code:
call my_kernel<<<diimGrid, dimBlock>>>(do_st)


Thanks,

Tuan
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 6218
Location: The Portland Group Inc.

PostPosted: Mon Jan 10, 2011 2:49 pm    Post subject: Reply with quote

Hi Tuan,

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

Go Ducks!
Mat
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Accelerator Programming All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group