PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

Using atomic memory functions
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
mkcolg



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

PostPosted: Tue Jul 10, 2012 3:07 pm    Post subject: Reply with quote

Hi Crip_crop,

Sorry but it looks like we have some miscommunication here. Since you were originally working the "int2 intrinsic", I assumed you were asking about integer not floating point atomics. This is my fault for which I apologise.

While NVIDIA did add a few 64-bit integer atomic routines, no such atomic routines exist for 64-bit floating point nor do I believe NVIDIA has plans to add them. Hence, that puts us back to your original question, for which I don't have an answer.

- Mat
Back to top
View user's profile
brentl



Joined: 20 Jul 2004
Posts: 132

PostPosted: Fri Oct 12, 2012 8:57 am    Post subject: Reply with quote

Double precision (real*8) atomic adds were implemented in CUDA Fortran starting in release 12.8.
Back to top
View user's profile
crip_crop



Joined: 28 Jul 2010
Posts: 68

PostPosted: Tue Oct 23, 2012 5:35 am    Post subject: Reply with quote

Hi Brentl,

I've only just seen your post. I can't seem to find any documentation about it. I'm a bit skeptical because as far as I'm aware C for CUDA haven't yet included a double precision atomicadd function and CUDA Fortran usually has the same functionality.

Could you point me in the right direction please? That would be much appreciated.

Cheers,
Crip_crop
Back to top
View user's profile
brentl



Joined: 20 Jul 2004
Posts: 132

PostPosted: Tue Oct 23, 2012 11:01 am    Post subject: Reply with quote

It's just another overloaded atomic add function

module atomictests
contains
attributes(global) subroutine testatomicdadd( a )
real*8, device :: a
real*8 r
r = dble(threadIdx%x)
istat = atomicadd(a, r)
return
end subroutine testatomicdadd
end module atomictests
Back to top
View user's profile
crip_crop



Joined: 28 Jul 2010
Posts: 68

PostPosted: Wed Oct 24, 2012 4:28 am    Post subject: Reply with quote

Wowzers this is exciting news for me. You have no idea how much I desperately need this functionality...now I just need to get my hands on v12.8.

Cheers Brentl, I shall report back once I've tested it.

Crip_crop
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling All times are GMT - 7 Hours
Goto page Previous  1, 2, 3, 4, 5  Next
Page 3 of 5

 
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