float VS floatN

Hi there,

Is there any advantage when using floatN instead float?

for example

float3 position;


float posX, posY, posZ;

Thank you.

I had my code running, using floats, on my laptop (with nVidia gpu).

Moved it to the Big Machine, which has an AMD 5870.

Vectorized it to use float4s to make the best use of the hardware (wuz not easy).

It doubled my throughput – not quadrupled – but I’m glad I did it.

This may not be necessary with the new AMD 7970 coming out.

I haven’t checked to make sure, but I don’t think I got any speedup on the nV gpu.

I think it did help with the cpu, though; at least doubling the throughput (Intel Xeon) (I split the task between the CPU cores and the GPU cores to achieve best performance).

There’s a few related observations for you!

Hi Photovore,

Thank you for telling me your experience with floatN.

I think I’ve to move to floatN just like you did.

Thank you.


Just to add a little bit here . . .

I failed to notice that you were thinking of using floatN to handle X,Y,Z . . .

I use it to do the same identical calculation, on four different pixels, in parallel. Your usage is different, and closer to what GPUs were designed for in the first place, I think.

Therefore, you may achieve a better performance increase, through vectorizing, than I did. OR, worse! Who knows? But, I think that it’s worth the effort; even if it gains you nothing in terms of performance you will certainly gain in terms of education. And you will carry that knowledge forward.

Good luck!

Hi Photovore,

Thank you once again for your help.