Results 1 to 3 of 3

Thread: high precision

  1. #1
    Junior Member
    Join Date
    Jun 2011
    Posts
    13

    high precision

    Hi,

    How we can get a high precision in opencl, I am doing some mathmatic computation and using pow function, but at some ponit it round the value to zero, while on CPU it give a very small value but not zero "and this is what I want".

  2. #2
    Senior Member
    Join Date
    Aug 2011
    Posts
    271

    Re: high precision

    Quote Originally Posted by howaidi
    Hi,

    How we can get a high precision in opencl, I am doing some mathmatic computation and using pow function, but at some ponit it round the value to zero, while on CPU it give a very small value but not zero "and this is what I want".
    If they're not adequate you probably have to code your own, source isn't too hard to find. e.g. see cephes http://www.netlib.org/cephes/ or source to any of the free libm implementations.

  3. #3
    Senior Member
    Join Date
    May 2010
    Location
    Toronto, Canada
    Posts
    845

    Re: high precision

    I am doing some mathmatic computation and using pow function, but at some ponit it round the value to zero, while on CPU it give a very small value but not zero "and this is what I want"
    OpenCL is actually pretty strict when it comes to the precision of its math operations. Is it possible that your computation is producing a denormalized float and your GPU doesn't support them? See what you get from clGetDeviceInfo(..., CL_DEVICE_SINGLE_FP_CONFIG, ...).
    Disclaimer: Employee of Qualcomm Canada. Any opinions expressed here are personal and do not necessarily reflect the views of my employer. LinkedIn profile.

Similar Threads

  1. pow precision
    By yoavhacohen in forum OpenCL
    Replies: 2
    Last Post: 02-03-2012, 02:34 AM
  2. Fix for high CPU in tiger example of reference impl
    By erikhansen in forum OpenVG and VGU
    Replies: 0
    Last Post: 11-22-2009, 02:42 AM

Posting Permissions

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