Cuda thread linear indexing -
I need to index my thread in such a way that I'm sure 32 of them are taunts of the same, That is, the linear index follows how warps internally is created. In other words, there are linear indexes that are used to create Warpace C such as Fortune. To illustrate this, consider a block of size 2x5 thread, I can make a linear indicator that happens after the FORTRAN or C Convention:
0, 1, 2, 3, 4 5, 6, 7, 8, 9 versus
0, 2, 4, 6, 8, 1, 3, 5, 7, 9 For a large array, I have to make sure That my first 32 threads are in the same warp. What is the correct way to generate a linear index?
Your thread has been set in 32 groups. Threads fall from 0 to 31 in the first tranche, 32-63 on the second and so on. If threads 32%! = 0 , the warp is full of "shadow" threads (so you have to make this thread a mechanism to access the wrong memory position, usually a if statement).
You are not able to change this order, so the first 32 threads will always be in the same warp. Despite being in the first taana, it does not guarantee that this warp will be executed in the first place, SM. Will tell about the time of war at your facility.
Answer:
Threads were classified as viruses in the order of X, Y, Z. Therefore, in a 16x16 threadbob the first 32 thread thread will have threads in the following order:
Warp: thread ID (x, y, z)
0: 0, 0,0 1: 1,0,0 2: 2,0,0 3: 3 , 0,0 ... 15: 15,0,0 16: 0,1, 17: 1,1,0, 18: 2,1,0, 19: 3,1 ... 31: 15, 1,0
Comments
Post a Comment