PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

division in CUDA Fortran

 
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 Nov 28, 2010 10:32 pm    Post subject: division in CUDA Fortran Reply with quote

I experience slow performance when using division operator in the kernel. May I ask how CUDA Fortran map a division to the native code, as in CUDA C there are different ways to do division (which work differently for integer, FP32, FP64...).

Thanks,
Tuan
Back to top
View user's profile
mkcolg



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

PostPosted: Mon Nov 29, 2010 5:05 pm    Post subject: Reply with quote

Hi Tuan,

By default, we use the more precise but slower "fdiv" function to perform divides. For the faster but less precise divide operator ("/") use "-Mcuda=fastmath".

Hope this helps,
Mat
Back to top
View user's profile
Tuan



Joined: 11 Jun 2009
Posts: 233

PostPosted: Sat Dec 04, 2010 12:49 am    Post subject: Reply with quote

Thanks, 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