Results 1 to 2 of 2

Thread: OpenCL specification questions

  1. #1
    Junior Member
    Join Date
    Jul 2011

    OpenCL specification questions

    page 160
    half a;
    half a[100];
    half *p;
    a = *p; <- not allowed. must use vload_half function
    Isn't it should be like this?
    Code :
    half a;
    half b[100];
    half *p = b;
    a = *p; <- not allowed. must use vload_half function

    page 214
    M_2_SQRTPI_F - Value of 2 / ??
    M_SQRT2_F - Value of ?2
    M_SQRT1_2_F - Value of 1 / ?2
    I think this was made by some well-fed family man Because it is unlogical and should be M_1_SQRT2_F in last one.

    page 216
    gentype sub_sat (gentype x, gentype y) Returns x - y and saturates the result.
    Do you think it is so detailed description? What "saturates" means???

  2. #2
    Senior Member
    Join Date
    May 2010
    Toronto, Canada

    Re: OpenCL specification questions

    Thanks for pointing these out. I have created to track the two typos.

    As for the term "saturation", it means that if the result is out of range, it will be clamped to the maximum or minimum representable value. For example:

    Code :
    uchar a = 128;
    uchar b = a + a; // <-- b will be equal to 0 because (128+128)%256 == 0
    uchar c = sat_add(a,a); // <-- c will be equal to 255
    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. OpenCL 1.2 Specification broken?
    By jlcercos in forum OpenCL
    Replies: 1
    Last Post: 12-27-2012, 08:58 AM
  2. Specification 1.33 Questions
    By phil_ps in forum OpenCL
    Replies: 2
    Last Post: 05-07-2009, 05:44 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
Proudly hosted by Digital Ocean