PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

About thread ids

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Programming and Compiling
View previous topic :: View next topic  
Author Message
fernando@info.unlp.edu.ar



Joined: 18 Oct 2012
Posts: 2

PostPosted: Thu Oct 18, 2012 5:16 am    Post subject: About thread ids Reply with quote

Hi,

I'm reading "CUDA Fortran Programming Guide and Reference Release 2012", which in Chaper 2, Section Thread Blocks states:

Quote:

For a one-dimensional thread block, the thread index is equal to the thread ID. For a two-dimensional thread
block of size (Dx,Dy), the thread ID is equal to (x+Dx(y-1)). For a three-dimensional thread block of size
(Dx,Dy,Dz), the thread ID is (x+Dx(y-1)+Dy(z-1)).

and I think something is wrong specifically with three-dimensional thread blocks, since in a block of size 2x2x2 threads (1, 2, 1) and (1, 1, 2) would both have id 2...

Or I'm misunderstanding something... please tell me about.
Thanks in advance,

Fernando.
Back to top
View user's profile
brentl



Joined: 20 Jul 2004
Posts: 108

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

The entire paragraph is confusing and potentially misleading. I think we'll just remove it. There really is no notion of a thread ID that the user has access to without computing it themselves.

The equation is question looks like it is missing parenthesis, should be
x + Dx((y-1)+Dy(z-1))
Back to top
View user's profile
fernando@info.unlp.edu.ar



Joined: 18 Oct 2012
Posts: 2

PostPosted: Wed Oct 24, 2012 11:55 am    Post subject: Reply with quote

Thank you for replying.

Actually, I've posted this issue as well as other/s, including typos to the e-mail address which appears in the document as the "Technical support" e-mail, and all of them have been included in TPR 18977 (which I cannot see online, I don't know if such TPRs are available online).

About
Quote:

I think we'll just remove it. There really is no notion of a thread ID that the user has access to without computing it themselves.

I agree on removing "ID", but I think it is useful to maintain the idea of "thread index", since it could be used for computing thread-specific code. Just my idea, though.

Thank you again,

Fernando.
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
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