Results 1 to 3 of 3

Thread: Possible Specification Ambiguity - Host Side Vector Types

  1. #1
    Junior Member
    Join Date
    Dec 2008
    Location
    Toronto, Ontario, Canada
    Posts
    19

    Possible Specification Ambiguity - Host Side Vector Types

    Device-side vector types can be accessed like struct types. e.g. float2 T.x, T.y.

    However, the spec is silent (or I don't see where it is mentioned) on how this maps to the host-side types e.g. cl_float2 (is it a struct? array?). The nvidia implementation I have has defined this as an array type... but I don't see in the spec how I should know which values have been stored where... does T.x correspond to host T[0]? T[1]?

    If this is in the spec and I didn't see it, please point out where.

    Thanks!
    OpenCL standards committee member and consultant

    http://www.ajguillon.com

  2. #2
    Senior Member
    Join Date
    Sep 2002
    Location
    Santa Clara
    Posts
    105

    Re: Possible Specification Ambiguity - Host Side Vector Types

    The spec does not describe the host-side types. There are only described in the cl_platform.h header file.

  3. #3
    Junior Member
    Join Date
    Dec 2008
    Location
    Toronto, Ontario, Canada
    Posts
    19

    Re: Possible Specification Ambiguity - Host Side Vector Types

    Thank you for your response.

    This is a rather dangerous omission on the part of the spec, and hopefully it can be corrected within the specification itself. The spec should say something about how the host-side types are accessed... I don't care about how they are implemented, but I should know what the actual mapping is. For instance, the spec should say something like "the host accesses vector types with indexing..." with a nice table that shows "x is mapped to index 0, y is mapped to index 1", etc.

    It's rather unfortunate that a cl_float2 for instance can't be represented as a struct on the host side, I find it easier to work with .xy addressing than [0,1].
    OpenCL standards committee member and consultant

    http://www.ajguillon.com

Similar Threads

  1. Replies: 1
    Last Post: 10-01-2009, 05:04 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
  •