Results 1 to 5 of 5

Thread: float VS floatN

  1. #1
    Junior Member
    Join Date
    Oct 2011
    Posts
    7

    float VS floatN

    Hi there,

    Is there any advantage when using floatN instead float?

    for example

    Code :
    float3 position;

    and

    Code :
    float posX, posY, posZ;

    Thank you.

  2. #2

    Re: float VS floatN

    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!

  3. #3
    Junior Member
    Join Date
    Oct 2011
    Posts
    7

    Re: float VS floatN

    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.

  4. #4

    Re: float VS floatN

    Hi

    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!
    David

  5. #5
    Junior Member
    Join Date
    Oct 2011
    Posts
    7

    Re: float VS floatN

    Hi Photovore,

    Thank you once again for your help.

Similar Threads

  1. atom_add with float
    By dweo in forum OpenCL
    Replies: 3
    Last Post: 05-01-2010, 05:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •