Results 1 to 2 of 2

Thread: ClanLib 2.3.0 Standard Datatypes

  1. #1
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default ClanLib 2.3.0 Standard Datatypes

    I recently changed the standard ClanLib datatypes to use the OpenCL ones (to avoid namespace confliction)

    It's very nice, there are some very useful additions (In API/Core/System/cl_platform.h)

    However, there is something that is bugging me:

    The change to use the following (instead of cl_int8 etc)

    Code:
    typedef signed   __int8         cl_char;
    typedef unsigned __int8         cl_uchar;
    typedef signed   __int16        cl_short;
    typedef unsigned __int16        cl_ushort;
    typedef signed   __int32        cl_int;
    typedef unsigned __int32        cl_uint;
    typedef signed   __int64        cl_long;
    typedef unsigned __int64        cl_ulong;
    Since we can no longer use cl_int8 etc (because OpenCL redefined it)

    I do not like using cl_long, cl_int. It is not intuitive.

    So I was thinking of creating alias's.

    My suggestion is: (for a 32 bit int)
    typedef signed __int32 cl_byte32;
    typedef unsigned __int32 cl_ubyte32;

    But since cl_int8 is "cl_int CL_ALIGNED(32) s[8]"

    Maybe the user may think cl_byte is also aligned

    I want cl_byte8, cl_byte16, cl_byte32, cl_byte64

    What do other developers think?

  2. #2
    ClanLib Developer
    Join Date
    May 2007
    Posts
    1,824

    Default

    Discussed on IRC ( irc.freenode.net #clanlib )

    We now have cl_byte8, cl_byte16, cl_byte32, cl_byte64

Bookmarks

Bookmarks

Posting Permissions

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