PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

Free OpenACC Webinar

shared memory - double precision C1060

 
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: Wed Oct 20, 2010 7:26 am    Post subject: shared memory - double precision C1060 Reply with quote

Hi,
CUDA C introduced a way to avoid bank conflict with double precision data.

Code:
__shared__ int shared_low[32];
__shared__ int shared_hi[32];

using the following functions
Code:
__double2loint()
__double2hiint()
__hiloint2double()


Is there a better way in CUDA Fortran, and/or do these functions implemented in CUDA Fortran?
If possible, could someone provide me a sample code.

Thanks
Tuan
Back to top
View user's profile
mkcolg



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

PostPosted: Wed Oct 20, 2010 10:40 am    Post subject: Reply with quote

Hi Tuan,

CUDA Fortran doesn't support these functions but the simple way to avoid bank conflicts is to pad your shared arrays. In other words, use an array size of 33 instead of 32 or 17 instead of 16.

- 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