Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
12 years ago

floating-point computation capability

Hi there,

I've read the OpenCL v1.0 specification and Altera's OpenCL programming guide. I just want to make it clear that:

Altera OpenCL supports for single precision floating point computation in both scalar and vector(packed) format. But the vector data format doesn't support the double precision floating point numbers.

Am I correct?

Thanks in advance.

7 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Support for double precision is limited but this is independent of scalar versus vector support. The double precision floating point operators and math functions are not fully conformant with the 1.0 OpenCL spec but you can still use them.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Support for double precision is limited but this is independent of scalar versus vector support. The double precision floating point operators and math functions are not fully conformant with the 1.0 OpenCL spec but you can still use them.

    --- Quote End ---

    So, do we currently support for double precision floating point format in vector operations? Since the programming guide doesn't specifically point out AOC supports it or not.. (or perhaps I overlooked the spot) so I got confused a little bit.

    thank u.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Please see Appendix B of the programming guide (http://www.altera.com/literature/hb/opencl-sdk/aocl_programming_guide.pdf) for details on floating point (and double precision) support and conformance.

    --- Quote End ---

    Thank you. I've read this before posting questions.

    In table 6, in the scalar data types, it says AOC supports for the double precision FP format. In the vector data types, it only say it starts to support for, for instance, ucharn, where n equals to 3. So to my understanding, I think it means AOC conform with the v1.0 specification's supports to double FP in the built-in vector types, which means AOC currently doesn't support double FP in built-in vector types.

    Am I correct? Thanks.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    Double precision floating point vector types should be supported. You could try writing a quick kernel to validate this.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Double precision floating point vector types should be supported. You could try writing a quick kernel to validate this.

    --- Quote End ---

    Thank you for your reply.

    The board is not arrived yet, that's why I asked question here... May I ask, are you an Altera technical for OpenCL or a developer? I really appreciate an accurate answer for my question.

    Thanks.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    --- Quote Start ---

    Double precision floating point vector types should be supported. You could try writing a quick kernel to validate this.

    --- Quote End ---

    Never mind. I will find it out and post the results here. Thanks for the suggestion.