Results 1 to 2 of 2

Thread: Spec confusion regarding convert_ functions

  1. #1
    Newbie
    Join Date
    Sep 2013
    Posts
    1

    Exclamation Spec confusion regarding convert_ functions

    Refer OpenCL Spec 1.2

    Section 6.2.3
    Explicit conversions may be performed using the
    convert_destType(sourceType)
    suite of functions. These provide a full set of type conversions between supported types (see
    sections 6.1.1, 6.1.2 and 6.1.3) except for the following types: bool, half, size_t,
    ptrdiff_t, intptr_t, uintptr_t, and void

    Section 6.2.3.1
    Conversions are available for the following scalar types: char, uchar, short, ushort,
    int, uint, long, ulong, float, and built-in vector types derived therefrom.

    There are datatypes like
    double,
    image2d_t
    image3d_t
    image2d_array_t
    image1d_t
    image1d_buffer_t
    image1d_array_t
    sampler_t
    event_t
    Which are covered in section 6.2.3, but not in 6.2.3.1. What is expected of these datatypes?

  2. #2
    Senior Member
    Join Date
    Oct 2012
    Posts
    102
    double is handled like float.

    The other data types (image, sampler, event) are neither scalar types nor vector types, so section 6.2.3.1 does not apply to them.
    They can't be cast to another type. They are simply considered opaque types.

Posting Permissions

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