cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

riza_guntur
Journeyman III

Confuse about LDS sample

Up until now I still don't get it.

Does instance() work like usual without conflicting with instanceInGroup()?

If we have streams bigger than GROUP_SIZE, will it have different lds? Or can't access other lds?

Why Stream of type VectorType/float4 can read from array of ScalarType/float?

What is the range of instanceInGroup().x there? Is it the same of GROUP_SIZE?

How do I know my thread is in different group from other threads? 

{{{{{{{{{{{{{{{

What it means:

//Reading from last Thread



item = 4 * (GROUP_SIZE - 1 - instanceInGroup().x )+ 0;

How come it reads from last thread?

If instanceInGroup().x returns 0 to 63 then 4*(64-1- anywhere from 0 to 63) + 0 = reverse.... really?

}}}}}}}}}}}}}}

 

The shared VectorType lds[256]; is used only in offset 0 right? If so, the algorithm can work with some modification and run with only 64 lds elements right?

So the algorithm means reverse summing column of a and b then put in c... If my thoughts are correct...

More:

Can I build 2d/3d LDS? How big its maximum?

In lds sample, one group is one row right?

Can I specify 2d group in 3d stream?

Sorry for redundant questions.



0 Likes
5 Replies
riza_guntur
Journeyman III

And how to create 2d or 3d lds?

0 Likes

I think stream computing user guide section 2.17 would have answer for your most of questions.

0 Likes

Originally posted by: gaurav.garg I think stream computing user guide section 2.17 would have answer for your most of questions.

Okay, some not mentioned there:

1. How do I know my thread is in different group from other threads? 

2. About group size, if I specify 3D group, how do I access it in 1D LDS? Is it using offset?

3. About group itself, is it created from position 0,0,0?

0 Likes

How do I know my thread is in different group from other threads?


if (int)(instance() / GROUP_SIZE) is same for two threads, they are in the same group.

 

About group size, if I specify 3D group, how do I access it in 1D LDS? Is it using offset?


2D, 3D group sizes are not yet supported.

 

About group itself, is it created from position 0,0,0?


First group would have threads from thread id 0-GROUP_SIZE-1 and then second from GROUP_SIZE to 2*GROUP_SIZE - 1 and so on.

0 Likes

Thank you, that's what I'm looking for.

Now I can create another function for ANN for dimensions < 1025 that use CS with less kernel call.

0 Likes