[Pkg-opencl-devel] [beignet] 24/66: Imported Debian patch 0.1+git20130521+a7ea35c-1~prerename

Andreas Beckmann anbe at moszumanska.debian.org
Fri Oct 31 07:27:04 UTC 2014


This is an automated email from the git hooks/post-receive script.

anbe pushed a commit to branch master
in repository beignet.

commit 6fb54b78eb4c232a53c8dafd0c0472d92efd2646
Merge: 8bf3bb0 e85d978
Author: Simon Richter <sjr at debian.org>
Date:   Tue May 21 09:17:45 2013 +0200

    Imported Debian patch 0.1+git20130521+a7ea35c-1~prerename

 .gitignore                                         |    5 +-
 backend/src/.gitignore                             |    3 +
 backend/src/CMakeLists.txt                         |    5 +
 backend/src/backend/context.cpp                    |   24 +-
 backend/src/backend/context.hpp                    |    3 +
 backend/src/backend/gen/gen_mesa_disasm.c          |    3 +-
 backend/src/backend/gen_context.cpp                |   78 +-
 backend/src/backend/gen_context.hpp                |    3 +-
 backend/src/backend/gen_defs.hpp                   |    2 -
 backend/src/backend/gen_encoder.cpp                |   68 +-
 backend/src/backend/gen_encoder.hpp                |   10 +-
 .../src/backend/gen_insn_gen7_schedule_info.hxx    |    3 +-
 backend/src/backend/gen_insn_scheduling.cpp        |    2 +-
 backend/src/backend/gen_insn_selection.cpp         |   98 +-
 backend/src/backend/gen_insn_selection.hxx         |    3 +-
 backend/src/backend/program.cpp                    |   51 +-
 backend/src/backend/program.h                      |   37 +-
 backend/src/backend/program.hpp                    |   26 +-
 backend/src/ir/function.cpp                        |    2 +
 backend/src/ir/function.hpp                        |   26 +
 backend/src/ir/image.cpp                           |  108 ++
 backend/src/ir/image.hpp                           |   71 ++
 backend/src/ir/instruction.cpp                     |   45 +-
 backend/src/ir/instruction.hpp                     |   45 +-
 backend/src/ir/instruction.hxx                     |    2 +-
 backend/src/ir/sampler.cpp                         |   78 ++
 backend/src/ir/sampler.hpp                         |   78 ++
 backend/src/ir/unit.hpp                            |   22 +-
 backend/src/llvm/llvm_gen_backend.cpp              |  551 +++++------
 backend/src/llvm/llvm_gen_backend.hpp              |   30 +-
 backend/src/llvm/llvm_gen_ocl_function.hxx         |    4 +
 backend/src/llvm/llvm_scalarize.cpp                |  836 ++++++++++++++++
 backend/src/llvm/llvm_to_gen.cpp                   |    1 +
 backend/src/ocl_common_defines.h                   |    9 +-
 backend/src/ocl_stdlib.h                           |  400 +++++++-
 backend/src/sys/alloc.hpp                          |    1 +
 debian/beignet-dev.install                         |    2 -
 debian/beignet0.0.1.install                        |    6 +-
 debian/changelog                                   |    7 +
 debian/control                                     |    4 +-
 debian/intel.icd                                   |    2 +-
 ...0001-Generate-all-supported-as_-functions.patch |   54 +-
 .../0002-Define-all-convert_-functions.patch       |   29 +-
 ...3-Add-long-and-ulong-types-to-conversions.patch |  143 +--
 .../0004-Add-vector-argument-test-case.patch       |   74 ++
 ...-Make-libgbm-optional-without-EGL-support.patch |   45 -
 .../0005-Add-more-get-image-info-functions.patch   |  203 ++++
 .../0005-Define-clamp-value-lower-upper.patch      |  131 ---
 ...Add-clGetDeviceInfo-.-CL_BUILT_IN_KERNELS.patch |   58 --
 ...nt-get_image_size-cases-to-other-informat.patch |  180 ++++
 ...ge-clang-system-call-to-libclang-api-call.patch |  261 +++++
 .../0007-Correct-type-of-device-properties.patch   |   34 -
 debian/patches/0008-Update-gitignore-files.patch   |   65 --
 ...the-sampler-implementation-to-comply-with.patch |  418 --------
 ...0-CL-Support-kernel-side-defined-samplers.patch |  378 -------
 ...ts-Add-one-test-cases-for-sampler-support.patch |  150 ---
 .../0012-GBE-remove-sampler-address-space.patch    |   74 --
 ...lar-register-support-in-loadImmInstructio.patch |   41 -
 ...rate-all-samplers-allocation-at-compile-t.patch |  407 --------
 ...me-Optimize-Sample-TypedWrite-instruction.patch | 1027 --------------------
 debian/patches/const64                             |   24 -
 debian/patches/{verbose => debug}                  |   10 +-
 debian/patches/{respect-flags => flags}            |   16 +-
 debian/patches/khronos                             |   38 +-
 debian/patches/missing-header                      |   16 -
 debian/patches/private                             |   35 +
 debian/patches/series                              |   24 +-
 debian/patches/soname                              |   33 -
 include/CL/cl.hpp                                  |  104 +-
 include/CMakeLists.txt                             |    2 +
 kernels/compiler_julia.cl                          |    2 -
 kernels/compiler_julia_no_break.cl                 |    2 -
 kernels/compiler_math.cl                           |   46 +-
 kernels/compiler_math_2op.cl                       |   19 +
 kernels/compiler_math_3op.cl                       |    9 +
 kernels/compiler_menger_sponge.cl                  |    2 -
 kernels/compiler_menger_sponge_no_shadow.cl        |    2 -
 kernels/compiler_nautilus.cl                       |    4 +-
 kernels/test_copy_image1.cl                        |   33 +
 kernels/test_fill_image0.cl                        |    2 +-
 kernels/test_get_image_size.cl                     |    9 +
 src/.gitignore                                     |    2 +
 src/CMakeLists.txt                                 |   10 +-
 src/cl_api.c                                       |  270 ++++-
 src/cl_command_queue.c                             |   41 +-
 src/cl_command_queue.h                             |    3 +
 src/cl_command_queue_gen7.c                        |    4 +
 src/cl_device_id.c                                 |    1 +
 src/cl_device_id.h                                 |    6 +-
 src/cl_driver.h                                    |   29 +-
 src/cl_driver_defs.c                               |    3 +-
 src/cl_gt_device.h                                 |    1 +
 src/cl_kernel.c                                    |   52 +-
 src/cl_kernel.h                                    |    4 +
 src/cl_mem.c                                       |   25 +-
 src/cl_mem.h                                       |    9 +-
 src/cl_mem_gl.c                                    |    4 +-
 src/cl_sampler.c                                   |   47 +
 src/cl_sampler.h                                   |    5 +
 src/cl_utils.h                                     |    9 +
 src/intel/intel_driver.c                           |   43 +-
 src/intel/intel_gpgpu.c                            |   73 +-
 utests/.gitignore                                  |   13 +
 utests/CMakeLists.txt                              |    2 +
 ...ovforphi_undef.cpp => compiler_copy_image1.cpp} |   50 +-
 utests/compiler_fill_image0.cpp                    |    7 +-
 ...fill_image0.cpp => compiler_get_image_size.cpp} |   24 +-
 utests/compiler_math.cpp                           |   88 +-
 utests/compiler_math_2op.cpp                       |   80 ++
 utests/compiler_math_3op.cpp                       |   64 ++
 utests/compiler_movforphi_undef.cpp                |    4 +-
 utests/utest_helper.hpp                            |   11 +
 112 files changed, 4184 insertions(+), 3758 deletions(-)

diff --cc debian/beignet-dev.install
index 7009503,0000000..2d6b6d3
mode 100644,000000..100644
--- a/debian/beignet-dev.install
+++ b/debian/beignet-dev.install
@@@ -1,3 -1,0 +1,1 @@@
- usr/lib/libcl.so		/usr/lib
- usr/lib/libgbe.so		/usr/lib
 +usr/include/CL/cl_intel.h	/usr/include/CL
diff --cc debian/beignet0.0.1.install
index 3fbe284,0000000..52a6e7f
mode 100644,000000..100644
--- a/debian/beignet0.0.1.install
+++ b/debian/beignet0.0.1.install
@@@ -1,3 -1,0 +1,3 @@@
- debian/intel.icd        /etc/OpenCL/vendors
- usr/lib/libcl.so.*	/usr/lib
- usr/lib/libgbe.so.*	/usr/lib
++debian/intel.icd		/etc/OpenCL/vendors
++usr/lib/beignet/libcl.so	/usr/lib/beignet
++usr/lib/beignet/libgbe.so	/usr/lib/beignet
diff --cc debian/changelog
index 0c025f5,0000000..7631d36
mode 100644,000000..100644
--- a/debian/changelog
+++ b/debian/changelog
@@@ -1,87 -1,0 +1,94 @@@
++beignet (0.1+git20130521+a7ea35c-1~prerename) experimental; urgency=low
++
++  * New upstream release
++  * Move libraries to /usr/lib/beignet (should not be used directly)
++
++ -- Simon Richter <sjr at debian.org>  Tue, 21 May 2013 09:17:45 +0200
++
 +beignet (0.1+git20130514+19e9c58-1) experimental; urgency=low
 +
 +  * New upstream release
 +  * Added a number of tentative patches
 +
 + -- Simon Richter <sjr at debian.org>  Tue, 14 May 2013 20:04:29 +0200
 +
 +beignet (0.1+git20130502+63e60ed-1) experimental; urgency=low
 +
 +  * New upstream release
 +
 + -- Simon Richter <sjr at debian.org>  Mon, 06 May 2013 06:30:32 +0200
 +
 +beignet (0.1+git20130426+0c8f6fe-1) experimental; urgency=low
 +
 +  * New upstream release
 +
 + -- Simon Richter <sjr at debian.org>  Fri, 26 Apr 2013 14:42:21 +0200
 +
 +beignet (0.1+git20130422+003fac5-2) experimental; urgency=low
 +
 +  * Add patch for select()
 +  * Add patch for fmin() / fmax()
 +
 + -- Simon Richter <sjr at debian.org>  Mon, 22 Apr 2013 18:26:01 +0200
 +
 +beignet (0.1+git20130422+003fac5-1) experimental; urgency=low
 +
 +  * New upstream release
 +
 + -- Simon Richter <sjr at debian.org>  Mon, 22 Apr 2013 15:10:54 +0200
 +
 +beignet (0.1+git20130419+9c11c18-1) experimental; urgency=low
 +
 +  * Add more functionality patches
 +  * New upstream release
 +
 + -- Simon Richter <sjr at debian.org>  Fri, 19 Apr 2013 14:14:39 +0200
 +
 +beignet (0.1+git20130418+0546d2e-2) experimental; urgency=low
 +
 +  * Add functionality patches
 +  * Use clang 3.0 command line syntax
 +
 + -- Simon Richter <sjr at debian.org>  Fri, 19 Apr 2013 09:53:23 +0200
 +
 +beignet (0.1+git20130418+0546d2e-1) experimental; urgency=low
 +
 +  * New upstream release
 +
 + -- Simon Richter <sjr at debian.org>  Thu, 18 Apr 2013 11:51:37 +0200
 +
 +beignet (0.1-1) unstable; urgency=low
 +
 +  * New upstream release
 +
 + -- Simon Richter <sjr at debian.org>  Tue, 16 Apr 2013 17:16:18 +0200
 +
 +beignet (0.0.0+git2013.04.11+e6b503e-1) unstable; urgency=low
 +
 +  * New upstream release
 +
 + -- Simon Richter <sjr at debian.org>  Mon, 15 Apr 2013 18:22:45 +0200
 +
 +beignet (0.0.0+git2013.04.01+d1b234c-4) unstable; urgency=low
 +
 +  * Build fix for kfreebsd-*
 +
 + -- Simon Richter <sjr at debian.org>  Fri, 12 Apr 2013 11:22:36 +0200
 +
 +beignet (0.0.0+git2013.04.01+d1b234c-3) unstable; urgency=low
 +
 +  * Adjust Build-Depends, Architecture list
 +
 + -- Simon Richter <sjr at debian.org>  Fri, 12 Apr 2013 10:32:36 +0200
 +
 +beignet (0.0.0+git2013.04.01+d1b234c-2) unstable; urgency=low
 +
 +  * Add patch to support size queries in device info
 +
 + -- Simon Richter <sjr at debian.org>  Thu, 11 Apr 2013 14:00:59 +0200
 +
 +beignet (0.0.0+git2013.04.01+d1b234c-1) unstable; urgency=low
 +
 +  * Initial release.
 +
 + -- Simon Richter <sjr at debian.org>  Tue, 09 Apr 2013 17:14:00 +0200
diff --cc debian/control
index c3c69b7,0000000..903a36b
mode 100644,000000..100644
--- a/debian/control
+++ b/debian/control
@@@ -1,32 -1,0 +1,32 @@@
 +Source: beignet
 +Priority: extra
 +Maintainer: Simon Richter <sjr at debian.org>
- Build-Depends: debhelper (>= 9), cmake, pkg-config, ocl-icd-dev, ocl-icd-opencl-dev, libdrm-dev, libxfixes-dev, libxext-dev, llvm-3.2-dev | llvm-dev (>= 1:3.2)
++Build-Depends: debhelper (>= 9), cmake, pkg-config, ocl-icd-dev, ocl-icd-opencl-dev, libdrm-dev, libxfixes-dev, libxext-dev, llvm-dev (>= 1:3.2), libclang-dev (>= 1:3.2)
 +Build-Conflicts: libegl1-mesa-dev (<< 9), libgbm-dev
 +Standards-Version: 3.9.4
 +Section: libs
 +Homepage: http://cgit.freedesktop.org/beignet/
 +
 +Package: beignet-dev
 +Section: libdevel
 +Architecture: i386 amd64 kfreebsd-i386 kfreebsd-amd64
 +Depends: beignet0.0.1 (= ${binary:Version}), ${misc:Depends}
 +Description: Intel OpenCL library
 + OpenCL (Open Computing Language) is a multivendor open standard for
 + general-purpose parallel programming of heterogeneous systems that include
 + CPUs, GPUs and other processors.
 + .
 + This package contains the development files for directly linking against
 + the Intel implementation.
 +
 +Package: beignet0.0.1
 +Section: libs
 +Architecture: i386 amd64 kfreebsd-i386 kfreebsd-amd64
- Depends: ${shlibs:Depends}, ${misc:Depends}, clang (>= 1:3.1)
++Depends: ${shlibs:Depends}, ${misc:Depends}
 +Provides: opencl-icd
 +Description: Intel OpenCL library
 + OpenCL (Open Computing Language) is a multivendor open standard for
 + general-purpose parallel programming of heterogeneous systems that include
 + CPUs, GPUs and other processors.
 + .
 + This package contains the shared library for the Intel implementation.
diff --cc debian/intel.icd
index c2ca3f6,0000000..ca4d72f
mode 100644,000000..100644
--- a/debian/intel.icd
+++ b/debian/intel.icd
@@@ -1,1 -1,0 +1,1 @@@
- /usr/lib/libcl.so.0
++/usr/lib/beignet/libcl.so
diff --cc debian/patches/0001-Generate-all-supported-as_-functions.patch
index 86ad1e7,0000000..5520e63
mode 100644,000000..100644
--- a/debian/patches/0001-Generate-all-supported-as_-functions.patch
+++ b/debian/patches/0001-Generate-all-supported-as_-functions.patch
@@@ -1,1283 -1,0 +1,1287 @@@
- From 5cee017bb0148bd253ba1b4b6f986f4e0571e3ac Mon Sep 17 00:00:00 2001
++From 67668ad9be1186f021a7ee2dd56d00297593b6d0 Mon Sep 17 00:00:00 2001
 +From: Simon Richter <Simon.Richter at hogyros.de>
- Date: Tue, 7 May 2013 15:41:45 +0200
- Subject: [PATCH 01/15] Generate all supported as_* functions
++Date: Mon, 13 May 2013 22:43:34 +0200
++Subject: [PATCH 1/7] Generate all supported as_* functions
 +To: beignet at lists.freedesktop.org
 +
 +This adds support for all type conversions currently possible.
 +
 +The conversion functions can be updated by invoking the
 +update_conversions.sh script.
 +---
 + backend/src/gen_conversions.sh    |   89 +++
 + backend/src/ocl_stdlib.h          | 1138 ++++++++++++++++++++++++++++++++++++-
 + backend/src/update_conversions.sh |   11 +
 + 3 files changed, 1231 insertions(+), 7 deletions(-)
 + create mode 100755 backend/src/gen_conversions.sh
 + create mode 100755 backend/src/update_conversions.sh
 +
- Index: beignet-0.1+git20130514+19e9c58/backend/src/gen_conversions.sh
- ===================================================================
- --- /dev/null	1970-01-01 00:00:00.000000000 +0000
- +++ beignet-0.1+git20130514+19e9c58/backend/src/gen_conversions.sh	2013-05-14 20:08:14.714024732 +0200
++diff --git a/backend/src/gen_conversions.sh b/backend/src/gen_conversions.sh
++new file mode 100755
++index 0000000..50a3668
++--- /dev/null
+++++ b/backend/src/gen_conversions.sh
 +@@ -0,0 +1,89 @@
 ++#! /bin/sh -e
 ++
 ++# Supported base types and their lengths
 ++TYPES="int:4 uint:4 short:2 ushort:2 char:1 uchar:1 float:4"
 ++
 ++# Supported vector lengths
 ++VECTOR_LENGTHS="1 2 3 4 8 16"
 ++
 ++## No user serviceable parts below here
 ++
 ++# Generate list of union sizes
 ++for type in $TYPES; do
 ++        size=`IFS=:; set -- dummy $type; echo $3`
 ++        for vector_length in $VECTOR_LENGTHS; do
 ++                union_sizes="$union_sizes `expr $vector_length \* $size`"
 ++        done
 ++done
 ++union_sizes="`echo $union_sizes | tr ' ' '\n' | sort -n | uniq`"
 ++
 ++# For each union size
 ++for union_size in $union_sizes; do
 ++
 ++        # Define an union that contains all vector types that have the same size as the union
 ++        unionname="union _type_cast_${union_size}_b"
 ++        echo "$unionname {"
 ++        for type in $TYPES; do
 ++                basetype=`IFS=:; set -- dummy $type; echo $2`
 ++                basesize=`IFS=:; set -- dummy $type; echo $3`
 ++                for vector_length in $VECTOR_LENGTHS; do
 ++                        vector_size_in_union="`expr $vector_length \* $basesize`"
 ++                        if test $union_size -ne $vector_size_in_union; then
 ++                                continue
 ++                        fi
 ++                        if test $vector_length -eq 1; then
 ++                                vectortype=$basetype
 ++                        else
 ++                                vectortype=$basetype$vector_length
 ++                        fi
 ++                        echo "  $vectortype _$vectortype;"
 ++                done
 ++                
 ++        done
 ++        echo "};"
 ++        echo
 ++
 ++        # For each tuple of vector types that has the same size as the current union size,
 ++        # define an as_* function that converts types without changing binary representation.
 ++        for ftype in $TYPES; do
 ++                fbasetype=`IFS=:; set -- dummy $ftype; echo $2`
 ++                fbasesize=`IFS=:; set -- dummy $ftype; echo $3`
 ++                for fvector_length in $VECTOR_LENGTHS; do
 ++                        fvector_size_in_union="`expr $fvector_length \* $fbasesize`"
 ++                        if test $union_size -ne $fvector_size_in_union; then
 ++                                continue
 ++                        fi
 ++                        if test $fvector_length -eq 1; then
 ++                                fvectortype=$fbasetype
 ++                        else
 ++                                fvectortype=$fbasetype$fvector_length
 ++                        fi
 ++                        for ttype in $TYPES; do
 ++                                tbasetype=`IFS=:; set -- dummy $ttype; echo $2`
 ++                                tbasesize=`IFS=:; set -- dummy $ttype; echo $3`
 ++                                if test $fbasetype = $tbasetype; then
 ++                                        continue
 ++                                fi
 ++                                for tvector_length in $VECTOR_LENGTHS; do
 ++                                        tvector_size_in_union="`expr $tvector_length \* $tbasesize`"
 ++                                        if test $union_size -ne $tvector_size_in_union; then
 ++                                                continue
 ++                                        fi
 ++                                        if test $tvector_length -eq 1; then
 ++                                                tvectortype=$tbasetype
 ++                                        else
 ++                                                tvectortype=$tbasetype$tvector_length
 ++                                        fi
 ++                                        echo "INLINE OVERLOADABLE $tvectortype as_$tvectortype($fvectortype v) {"
 ++                                        echo "  $unionname u;"
 ++                                        echo "  u._$fvectortype = v;"
 ++                                        echo "  return u._$tvectortype;"
 ++                                        echo "}"
 ++                                        echo
 ++                                done
 ++                        done
 ++                done
 ++                
 ++        done
 ++
 ++done
- Index: beignet-0.1+git20130514+19e9c58/backend/src/ocl_stdlib.h
- ===================================================================
- --- beignet-0.1+git20130514+19e9c58.orig/backend/src/ocl_stdlib.h	2013-05-08 11:55:52.000000000 +0200
- +++ beignet-0.1+git20130514+19e9c58/backend/src/ocl_stdlib.h	2013-05-14 20:08:14.718024731 +0200
- @@ -79,18 +79,1142 @@
++diff --git a/backend/src/ocl_stdlib.h b/backend/src/ocl_stdlib.h
++index 92f9ba9..a051803 100644
++--- a/backend/src/ocl_stdlib.h
+++++ b/backend/src/ocl_stdlib.h
++@@ -78,18 +78,1142 @@ struct _image3d_t;
 + typedef __texture struct _image3d_t* image3d_t;
-  typedef __sampler uint* sampler_t;
++ typedef uint sampler_t;
 + typedef size_t event_t;
 ++
 + /////////////////////////////////////////////////////////////////////////////
 + // OpenCL conversions & type casting
 + /////////////////////////////////////////////////////////////////////////////
 +-union type_cast_4_b {
 +-  float f;
 +-  uchar4 u4;
- -};
- -uchar4 INLINE_OVERLOADABLE as_uchar4(float f) {
- -    union type_cast_4_b u;
- -    u.f = f;
- -    return u.u4;
 ++
 ++// ##BEGIN_CONVERSIONS##
 ++union _type_cast_1_b {
 ++  char _char;
 ++  uchar _uchar;
 ++};
 ++
 ++INLINE OVERLOADABLE uchar as_uchar(char v) {
 ++  union _type_cast_1_b u;
 ++  u._char = v;
 ++  return u._uchar;
 ++}
 ++
 ++INLINE OVERLOADABLE char as_char(uchar v) {
 ++  union _type_cast_1_b u;
 ++  u._uchar = v;
 ++  return u._char;
 ++}
 ++
 ++union _type_cast_2_b {
 ++  short _short;
 ++  ushort _ushort;
 ++  char2 _char2;
 ++  uchar2 _uchar2;
- +};
++ };
++-uchar4 INLINE_OVERLOADABLE as_uchar4(float f) {
++-    union type_cast_4_b u;
++-    u.f = f;
++-    return u.u4;
 ++
 ++INLINE OVERLOADABLE ushort as_ushort(short v) {
 ++  union _type_cast_2_b u;
 ++  u._short = v;
 ++  return u._ushort;
 ++}
 ++
 ++INLINE OVERLOADABLE char2 as_char2(short v) {
 ++  union _type_cast_2_b u;
 ++  u._short = v;
 ++  return u._char2;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar2 as_uchar2(short v) {
 ++  union _type_cast_2_b u;
 ++  u._short = v;
 ++  return u._uchar2;
 ++}
 ++
 ++INLINE OVERLOADABLE short as_short(ushort v) {
 ++  union _type_cast_2_b u;
 ++  u._ushort = v;
 ++  return u._short;
 ++}
 ++
 ++INLINE OVERLOADABLE char2 as_char2(ushort v) {
 ++  union _type_cast_2_b u;
 ++  u._ushort = v;
 ++  return u._char2;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar2 as_uchar2(ushort v) {
 ++  union _type_cast_2_b u;
 ++  u._ushort = v;
 ++  return u._uchar2;
 ++}
 ++
 ++INLINE OVERLOADABLE short as_short(char2 v) {
 ++  union _type_cast_2_b u;
 ++  u._char2 = v;
 ++  return u._short;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort as_ushort(char2 v) {
 ++  union _type_cast_2_b u;
 ++  u._char2 = v;
 ++  return u._ushort;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar2 as_uchar2(char2 v) {
 ++  union _type_cast_2_b u;
 ++  u._char2 = v;
 ++  return u._uchar2;
 ++}
 ++
 ++INLINE OVERLOADABLE short as_short(uchar2 v) {
 ++  union _type_cast_2_b u;
 ++  u._uchar2 = v;
 ++  return u._short;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort as_ushort(uchar2 v) {
 ++  union _type_cast_2_b u;
 ++  u._uchar2 = v;
 ++  return u._ushort;
 ++}
 ++
 ++INLINE OVERLOADABLE char2 as_char2(uchar2 v) {
 ++  union _type_cast_2_b u;
 ++  u._uchar2 = v;
 ++  return u._char2;
 ++}
 ++
 ++union _type_cast_3_b {
 ++  char3 _char3;
 ++  uchar3 _uchar3;
 ++};
 ++
 ++INLINE OVERLOADABLE uchar3 as_uchar3(char3 v) {
 ++  union _type_cast_3_b u;
 ++  u._char3 = v;
 ++  return u._uchar3;
 ++}
 ++
 ++INLINE OVERLOADABLE char3 as_char3(uchar3 v) {
 ++  union _type_cast_3_b u;
 ++  u._uchar3 = v;
 ++  return u._char3;
 ++}
 ++
 ++union _type_cast_4_b {
 ++  int _int;
 ++  uint _uint;
 ++  short2 _short2;
 ++  ushort2 _ushort2;
 ++  char4 _char4;
 ++  uchar4 _uchar4;
 ++  float _float;
 ++};
 ++
 ++INLINE OVERLOADABLE uint as_uint(int v) {
 ++  union _type_cast_4_b u;
 ++  u._int = v;
 ++  return u._uint;
 ++}
 ++
 ++INLINE OVERLOADABLE short2 as_short2(int v) {
 ++  union _type_cast_4_b u;
 ++  u._int = v;
 ++  return u._short2;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort2 as_ushort2(int v) {
 ++  union _type_cast_4_b u;
 ++  u._int = v;
 ++  return u._ushort2;
 ++}
 ++
 ++INLINE OVERLOADABLE char4 as_char4(int v) {
 ++  union _type_cast_4_b u;
 ++  u._int = v;
 ++  return u._char4;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar4 as_uchar4(int v) {
 ++  union _type_cast_4_b u;
 ++  u._int = v;
 ++  return u._uchar4;
 ++}
 ++
 ++INLINE OVERLOADABLE float as_float(int v) {
 ++  union _type_cast_4_b u;
 ++  u._int = v;
 ++  return u._float;
 ++}
 ++
 ++INLINE OVERLOADABLE int as_int(uint v) {
 ++  union _type_cast_4_b u;
 ++  u._uint = v;
 ++  return u._int;
 ++}
 ++
 ++INLINE OVERLOADABLE short2 as_short2(uint v) {
 ++  union _type_cast_4_b u;
 ++  u._uint = v;
 ++  return u._short2;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort2 as_ushort2(uint v) {
 ++  union _type_cast_4_b u;
 ++  u._uint = v;
 ++  return u._ushort2;
 ++}
 ++
 ++INLINE OVERLOADABLE char4 as_char4(uint v) {
 ++  union _type_cast_4_b u;
 ++  u._uint = v;
 ++  return u._char4;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar4 as_uchar4(uint v) {
 ++  union _type_cast_4_b u;
 ++  u._uint = v;
 ++  return u._uchar4;
 ++}
 ++
 ++INLINE OVERLOADABLE float as_float(uint v) {
 ++  union _type_cast_4_b u;
 ++  u._uint = v;
 ++  return u._float;
 ++}
 ++
 ++INLINE OVERLOADABLE int as_int(short2 v) {
 ++  union _type_cast_4_b u;
 ++  u._short2 = v;
 ++  return u._int;
 ++}
 ++
 ++INLINE OVERLOADABLE uint as_uint(short2 v) {
 ++  union _type_cast_4_b u;
 ++  u._short2 = v;
 ++  return u._uint;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort2 as_ushort2(short2 v) {
 ++  union _type_cast_4_b u;
 ++  u._short2 = v;
 ++  return u._ushort2;
 ++}
 ++
 ++INLINE OVERLOADABLE char4 as_char4(short2 v) {
 ++  union _type_cast_4_b u;
 ++  u._short2 = v;
 ++  return u._char4;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar4 as_uchar4(short2 v) {
 ++  union _type_cast_4_b u;
 ++  u._short2 = v;
 ++  return u._uchar4;
 ++}
 ++
 ++INLINE OVERLOADABLE float as_float(short2 v) {
 ++  union _type_cast_4_b u;
 ++  u._short2 = v;
 ++  return u._float;
 ++}
 ++
 ++INLINE OVERLOADABLE int as_int(ushort2 v) {
 ++  union _type_cast_4_b u;
 ++  u._ushort2 = v;
 ++  return u._int;
 ++}
 ++
 ++INLINE OVERLOADABLE uint as_uint(ushort2 v) {
 ++  union _type_cast_4_b u;
 ++  u._ushort2 = v;
 ++  return u._uint;
 ++}
 ++
 ++INLINE OVERLOADABLE short2 as_short2(ushort2 v) {
 ++  union _type_cast_4_b u;
 ++  u._ushort2 = v;
 ++  return u._short2;
 ++}
 ++
 ++INLINE OVERLOADABLE char4 as_char4(ushort2 v) {
 ++  union _type_cast_4_b u;
 ++  u._ushort2 = v;
 ++  return u._char4;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar4 as_uchar4(ushort2 v) {
 ++  union _type_cast_4_b u;
 ++  u._ushort2 = v;
 ++  return u._uchar4;
 ++}
 ++
 ++INLINE OVERLOADABLE float as_float(ushort2 v) {
 ++  union _type_cast_4_b u;
 ++  u._ushort2 = v;
 ++  return u._float;
 ++}
 ++
 ++INLINE OVERLOADABLE int as_int(char4 v) {
 ++  union _type_cast_4_b u;
 ++  u._char4 = v;
 ++  return u._int;
 ++}
 ++
 ++INLINE OVERLOADABLE uint as_uint(char4 v) {
 ++  union _type_cast_4_b u;
 ++  u._char4 = v;
 ++  return u._uint;
 ++}
 ++
 ++INLINE OVERLOADABLE short2 as_short2(char4 v) {
 ++  union _type_cast_4_b u;
 ++  u._char4 = v;
 ++  return u._short2;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort2 as_ushort2(char4 v) {
 ++  union _type_cast_4_b u;
 ++  u._char4 = v;
 ++  return u._ushort2;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar4 as_uchar4(char4 v) {
 ++  union _type_cast_4_b u;
 ++  u._char4 = v;
 ++  return u._uchar4;
 ++}
 ++
 ++INLINE OVERLOADABLE float as_float(char4 v) {
 ++  union _type_cast_4_b u;
 ++  u._char4 = v;
 ++  return u._float;
 ++}
 ++
 ++INLINE OVERLOADABLE int as_int(uchar4 v) {
 ++  union _type_cast_4_b u;
 ++  u._uchar4 = v;
 ++  return u._int;
 ++}
 ++
 ++INLINE OVERLOADABLE uint as_uint(uchar4 v) {
 ++  union _type_cast_4_b u;
 ++  u._uchar4 = v;
 ++  return u._uint;
 ++}
 ++
 ++INLINE OVERLOADABLE short2 as_short2(uchar4 v) {
 ++  union _type_cast_4_b u;
 ++  u._uchar4 = v;
 ++  return u._short2;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort2 as_ushort2(uchar4 v) {
 ++  union _type_cast_4_b u;
 ++  u._uchar4 = v;
 ++  return u._ushort2;
 ++}
 ++
 ++INLINE OVERLOADABLE char4 as_char4(uchar4 v) {
 ++  union _type_cast_4_b u;
 ++  u._uchar4 = v;
 ++  return u._char4;
 ++}
 ++
 ++INLINE OVERLOADABLE float as_float(uchar4 v) {
 ++  union _type_cast_4_b u;
 ++  u._uchar4 = v;
 ++  return u._float;
 ++}
 ++
 ++INLINE OVERLOADABLE int as_int(float v) {
 ++  union _type_cast_4_b u;
 ++  u._float = v;
 ++  return u._int;
 ++}
 ++
 ++INLINE OVERLOADABLE uint as_uint(float v) {
 ++  union _type_cast_4_b u;
 ++  u._float = v;
 ++  return u._uint;
 ++}
 ++
 ++INLINE OVERLOADABLE short2 as_short2(float v) {
 ++  union _type_cast_4_b u;
 ++  u._float = v;
 ++  return u._short2;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort2 as_ushort2(float v) {
 ++  union _type_cast_4_b u;
 ++  u._float = v;
 ++  return u._ushort2;
 ++}
 ++
 ++INLINE OVERLOADABLE char4 as_char4(float v) {
 ++  union _type_cast_4_b u;
 ++  u._float = v;
 ++  return u._char4;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar4 as_uchar4(float v) {
 ++  union _type_cast_4_b u;
 ++  u._float = v;
 ++  return u._uchar4;
 ++}
 ++
 ++union _type_cast_6_b {
 ++  short3 _short3;
 ++  ushort3 _ushort3;
 ++};
 ++
 ++INLINE OVERLOADABLE ushort3 as_ushort3(short3 v) {
 ++  union _type_cast_6_b u;
 ++  u._short3 = v;
 ++  return u._ushort3;
 ++}
 ++
 ++INLINE OVERLOADABLE short3 as_short3(ushort3 v) {
 ++  union _type_cast_6_b u;
 ++  u._ushort3 = v;
 ++  return u._short3;
 ++}
 ++
 ++union _type_cast_8_b {
 ++  int2 _int2;
 ++  uint2 _uint2;
 ++  short4 _short4;
 ++  ushort4 _ushort4;
 ++  char8 _char8;
 ++  uchar8 _uchar8;
 ++  float2 _float2;
 ++};
 ++
 ++INLINE OVERLOADABLE uint2 as_uint2(int2 v) {
 ++  union _type_cast_8_b u;
 ++  u._int2 = v;
 ++  return u._uint2;
 ++}
 ++
 ++INLINE OVERLOADABLE short4 as_short4(int2 v) {
 ++  union _type_cast_8_b u;
 ++  u._int2 = v;
 ++  return u._short4;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort4 as_ushort4(int2 v) {
 ++  union _type_cast_8_b u;
 ++  u._int2 = v;
 ++  return u._ushort4;
 ++}
 ++
 ++INLINE OVERLOADABLE char8 as_char8(int2 v) {
 ++  union _type_cast_8_b u;
 ++  u._int2 = v;
 ++  return u._char8;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar8 as_uchar8(int2 v) {
 ++  union _type_cast_8_b u;
 ++  u._int2 = v;
 ++  return u._uchar8;
 ++}
 ++
 ++INLINE OVERLOADABLE float2 as_float2(int2 v) {
 ++  union _type_cast_8_b u;
 ++  u._int2 = v;
 ++  return u._float2;
 ++}
 ++
 ++INLINE OVERLOADABLE int2 as_int2(uint2 v) {
 ++  union _type_cast_8_b u;
 ++  u._uint2 = v;
 ++  return u._int2;
 ++}
 ++
 ++INLINE OVERLOADABLE short4 as_short4(uint2 v) {
 ++  union _type_cast_8_b u;
 ++  u._uint2 = v;
 ++  return u._short4;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort4 as_ushort4(uint2 v) {
 ++  union _type_cast_8_b u;
 ++  u._uint2 = v;
 ++  return u._ushort4;
 ++}
 ++
 ++INLINE OVERLOADABLE char8 as_char8(uint2 v) {
 ++  union _type_cast_8_b u;
 ++  u._uint2 = v;
 ++  return u._char8;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar8 as_uchar8(uint2 v) {
 ++  union _type_cast_8_b u;
 ++  u._uint2 = v;
 ++  return u._uchar8;
 ++}
 ++
 ++INLINE OVERLOADABLE float2 as_float2(uint2 v) {
 ++  union _type_cast_8_b u;
 ++  u._uint2 = v;
 ++  return u._float2;
 ++}
 ++
 ++INLINE OVERLOADABLE int2 as_int2(short4 v) {
 ++  union _type_cast_8_b u;
 ++  u._short4 = v;
 ++  return u._int2;
 ++}
 ++
 ++INLINE OVERLOADABLE uint2 as_uint2(short4 v) {
 ++  union _type_cast_8_b u;
 ++  u._short4 = v;
 ++  return u._uint2;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort4 as_ushort4(short4 v) {
 ++  union _type_cast_8_b u;
 ++  u._short4 = v;
 ++  return u._ushort4;
 ++}
 ++
 ++INLINE OVERLOADABLE char8 as_char8(short4 v) {
 ++  union _type_cast_8_b u;
 ++  u._short4 = v;
 ++  return u._char8;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar8 as_uchar8(short4 v) {
 ++  union _type_cast_8_b u;
 ++  u._short4 = v;
 ++  return u._uchar8;
 ++}
 ++
 ++INLINE OVERLOADABLE float2 as_float2(short4 v) {
 ++  union _type_cast_8_b u;
 ++  u._short4 = v;
 ++  return u._float2;
 ++}
 ++
 ++INLINE OVERLOADABLE int2 as_int2(ushort4 v) {
 ++  union _type_cast_8_b u;
 ++  u._ushort4 = v;
 ++  return u._int2;
 ++}
 ++
 ++INLINE OVERLOADABLE uint2 as_uint2(ushort4 v) {
 ++  union _type_cast_8_b u;
 ++  u._ushort4 = v;
 ++  return u._uint2;
 ++}
 ++
 ++INLINE OVERLOADABLE short4 as_short4(ushort4 v) {
 ++  union _type_cast_8_b u;
 ++  u._ushort4 = v;
 ++  return u._short4;
 ++}
 ++
 ++INLINE OVERLOADABLE char8 as_char8(ushort4 v) {
 ++  union _type_cast_8_b u;
 ++  u._ushort4 = v;
 ++  return u._char8;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar8 as_uchar8(ushort4 v) {
 ++  union _type_cast_8_b u;
 ++  u._ushort4 = v;
 ++  return u._uchar8;
 ++}
 ++
 ++INLINE OVERLOADABLE float2 as_float2(ushort4 v) {
 ++  union _type_cast_8_b u;
 ++  u._ushort4 = v;
 ++  return u._float2;
 ++}
 ++
 ++INLINE OVERLOADABLE int2 as_int2(char8 v) {
 ++  union _type_cast_8_b u;
 ++  u._char8 = v;
 ++  return u._int2;
 ++}
 ++
 ++INLINE OVERLOADABLE uint2 as_uint2(char8 v) {
 ++  union _type_cast_8_b u;
 ++  u._char8 = v;
 ++  return u._uint2;
 ++}
 ++
 ++INLINE OVERLOADABLE short4 as_short4(char8 v) {
 ++  union _type_cast_8_b u;
 ++  u._char8 = v;
 ++  return u._short4;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort4 as_ushort4(char8 v) {
 ++  union _type_cast_8_b u;
 ++  u._char8 = v;
 ++  return u._ushort4;
- +}
++ }
 ++
 ++INLINE OVERLOADABLE uchar8 as_uchar8(char8 v) {
 ++  union _type_cast_8_b u;
 ++  u._char8 = v;
 ++  return u._uchar8;
 ++}
 ++
 ++INLINE OVERLOADABLE float2 as_float2(char8 v) {
 ++  union _type_cast_8_b u;
 ++  u._char8 = v;
 ++  return u._float2;
 ++}
 ++
 ++INLINE OVERLOADABLE int2 as_int2(uchar8 v) {
 ++  union _type_cast_8_b u;
 ++  u._uchar8 = v;
 ++  return u._int2;
 ++}
 ++
 ++INLINE OVERLOADABLE uint2 as_uint2(uchar8 v) {
 ++  union _type_cast_8_b u;
 ++  u._uchar8 = v;
 ++  return u._uint2;
 ++}
 ++
 ++INLINE OVERLOADABLE short4 as_short4(uchar8 v) {
 ++  union _type_cast_8_b u;
 ++  u._uchar8 = v;
 ++  return u._short4;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort4 as_ushort4(uchar8 v) {
 ++  union _type_cast_8_b u;
 ++  u._uchar8 = v;
 ++  return u._ushort4;
 ++}
 ++
 ++INLINE OVERLOADABLE char8 as_char8(uchar8 v) {
 ++  union _type_cast_8_b u;
 ++  u._uchar8 = v;
 ++  return u._char8;
 ++}
 ++
 ++INLINE OVERLOADABLE float2 as_float2(uchar8 v) {
 ++  union _type_cast_8_b u;
 ++  u._uchar8 = v;
 ++  return u._float2;
 ++}
 ++
 ++INLINE OVERLOADABLE int2 as_int2(float2 v) {
 ++  union _type_cast_8_b u;
 ++  u._float2 = v;
 ++  return u._int2;
 ++}
 ++
 ++INLINE OVERLOADABLE uint2 as_uint2(float2 v) {
 ++  union _type_cast_8_b u;
 ++  u._float2 = v;
 ++  return u._uint2;
 ++}
 ++
 ++INLINE OVERLOADABLE short4 as_short4(float2 v) {
 ++  union _type_cast_8_b u;
 ++  u._float2 = v;
 ++  return u._short4;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort4 as_ushort4(float2 v) {
 ++  union _type_cast_8_b u;
 ++  u._float2 = v;
 ++  return u._ushort4;
 ++}
 ++
 ++INLINE OVERLOADABLE char8 as_char8(float2 v) {
 ++  union _type_cast_8_b u;
 ++  u._float2 = v;
 ++  return u._char8;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar8 as_uchar8(float2 v) {
 ++  union _type_cast_8_b u;
 ++  u._float2 = v;
 ++  return u._uchar8;
 ++}
 ++
 ++union _type_cast_12_b {
 ++  int3 _int3;
 ++  uint3 _uint3;
 ++  float3 _float3;
 ++};
 ++
 ++INLINE OVERLOADABLE uint3 as_uint3(int3 v) {
 ++  union _type_cast_12_b u;
 ++  u._int3 = v;
 ++  return u._uint3;
 ++}
 ++
 ++INLINE OVERLOADABLE float3 as_float3(int3 v) {
 ++  union _type_cast_12_b u;
 ++  u._int3 = v;
 ++  return u._float3;
 ++}
 ++
 ++INLINE OVERLOADABLE int3 as_int3(uint3 v) {
 ++  union _type_cast_12_b u;
 ++  u._uint3 = v;
 ++  return u._int3;
 ++}
 ++
 ++INLINE OVERLOADABLE float3 as_float3(uint3 v) {
 ++  union _type_cast_12_b u;
 ++  u._uint3 = v;
 ++  return u._float3;
 ++}
 ++
 ++INLINE OVERLOADABLE int3 as_int3(float3 v) {
 ++  union _type_cast_12_b u;
 ++  u._float3 = v;
 ++  return u._int3;
 ++}
 ++
 ++INLINE OVERLOADABLE uint3 as_uint3(float3 v) {
 ++  union _type_cast_12_b u;
 ++  u._float3 = v;
 ++  return u._uint3;
 ++}
 ++
 ++union _type_cast_16_b {
 ++  int4 _int4;
 ++  uint4 _uint4;
 ++  short8 _short8;
 ++  ushort8 _ushort8;
 ++  char16 _char16;
 ++  uchar16 _uchar16;
 ++  float4 _float4;
 ++};
 ++
 ++INLINE OVERLOADABLE uint4 as_uint4(int4 v) {
 ++  union _type_cast_16_b u;
 ++  u._int4 = v;
 ++  return u._uint4;
 ++}
 ++
 ++INLINE OVERLOADABLE short8 as_short8(int4 v) {
 ++  union _type_cast_16_b u;
 ++  u._int4 = v;
 ++  return u._short8;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort8 as_ushort8(int4 v) {
 ++  union _type_cast_16_b u;
 ++  u._int4 = v;
 ++  return u._ushort8;
 ++}
 ++
 ++INLINE OVERLOADABLE char16 as_char16(int4 v) {
 ++  union _type_cast_16_b u;
 ++  u._int4 = v;
 ++  return u._char16;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar16 as_uchar16(int4 v) {
 ++  union _type_cast_16_b u;
 ++  u._int4 = v;
 ++  return u._uchar16;
 ++}
 ++
 ++INLINE OVERLOADABLE float4 as_float4(int4 v) {
 ++  union _type_cast_16_b u;
 ++  u._int4 = v;
 ++  return u._float4;
 ++}
 ++
 ++INLINE OVERLOADABLE int4 as_int4(uint4 v) {
 ++  union _type_cast_16_b u;
 ++  u._uint4 = v;
 ++  return u._int4;
 ++}
 ++
 ++INLINE OVERLOADABLE short8 as_short8(uint4 v) {
 ++  union _type_cast_16_b u;
 ++  u._uint4 = v;
 ++  return u._short8;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort8 as_ushort8(uint4 v) {
 ++  union _type_cast_16_b u;
 ++  u._uint4 = v;
 ++  return u._ushort8;
 ++}
 ++
 ++INLINE OVERLOADABLE char16 as_char16(uint4 v) {
 ++  union _type_cast_16_b u;
 ++  u._uint4 = v;
 ++  return u._char16;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar16 as_uchar16(uint4 v) {
 ++  union _type_cast_16_b u;
 ++  u._uint4 = v;
 ++  return u._uchar16;
 ++}
 ++
 ++INLINE OVERLOADABLE float4 as_float4(uint4 v) {
 ++  union _type_cast_16_b u;
 ++  u._uint4 = v;
 ++  return u._float4;
 ++}
 ++
 ++INLINE OVERLOADABLE int4 as_int4(short8 v) {
 ++  union _type_cast_16_b u;
 ++  u._short8 = v;
 ++  return u._int4;
 ++}
 ++
 ++INLINE OVERLOADABLE uint4 as_uint4(short8 v) {
 ++  union _type_cast_16_b u;
 ++  u._short8 = v;
 ++  return u._uint4;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort8 as_ushort8(short8 v) {
 ++  union _type_cast_16_b u;
 ++  u._short8 = v;
 ++  return u._ushort8;
 ++}
 ++
 ++INLINE OVERLOADABLE char16 as_char16(short8 v) {
 ++  union _type_cast_16_b u;
 ++  u._short8 = v;
 ++  return u._char16;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar16 as_uchar16(short8 v) {
 ++  union _type_cast_16_b u;
 ++  u._short8 = v;
 ++  return u._uchar16;
 ++}
 ++
 ++INLINE OVERLOADABLE float4 as_float4(short8 v) {
 ++  union _type_cast_16_b u;
 ++  u._short8 = v;
 ++  return u._float4;
 ++}
 ++
 ++INLINE OVERLOADABLE int4 as_int4(ushort8 v) {
 ++  union _type_cast_16_b u;
 ++  u._ushort8 = v;
 ++  return u._int4;
 ++}
 ++
 ++INLINE OVERLOADABLE uint4 as_uint4(ushort8 v) {
 ++  union _type_cast_16_b u;
 ++  u._ushort8 = v;
 ++  return u._uint4;
 ++}
 ++
 ++INLINE OVERLOADABLE short8 as_short8(ushort8 v) {
 ++  union _type_cast_16_b u;
 ++  u._ushort8 = v;
 ++  return u._short8;
 ++}
 ++
 ++INLINE OVERLOADABLE char16 as_char16(ushort8 v) {
 ++  union _type_cast_16_b u;
 ++  u._ushort8 = v;
 ++  return u._char16;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar16 as_uchar16(ushort8 v) {
 ++  union _type_cast_16_b u;
 ++  u._ushort8 = v;
 ++  return u._uchar16;
 ++}
 ++
 ++INLINE OVERLOADABLE float4 as_float4(ushort8 v) {
 ++  union _type_cast_16_b u;
 ++  u._ushort8 = v;
 ++  return u._float4;
 ++}
 ++
 ++INLINE OVERLOADABLE int4 as_int4(char16 v) {
 ++  union _type_cast_16_b u;
 ++  u._char16 = v;
 ++  return u._int4;
 ++}
 ++
 ++INLINE OVERLOADABLE uint4 as_uint4(char16 v) {
 ++  union _type_cast_16_b u;
 ++  u._char16 = v;
 ++  return u._uint4;
 ++}
 ++
 ++INLINE OVERLOADABLE short8 as_short8(char16 v) {
 ++  union _type_cast_16_b u;
 ++  u._char16 = v;
 ++  return u._short8;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort8 as_ushort8(char16 v) {
 ++  union _type_cast_16_b u;
 ++  u._char16 = v;
 ++  return u._ushort8;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar16 as_uchar16(char16 v) {
 ++  union _type_cast_16_b u;
 ++  u._char16 = v;
 ++  return u._uchar16;
 ++}
 ++
 ++INLINE OVERLOADABLE float4 as_float4(char16 v) {
 ++  union _type_cast_16_b u;
 ++  u._char16 = v;
 ++  return u._float4;
 ++}
 ++
 ++INLINE OVERLOADABLE int4 as_int4(uchar16 v) {
 ++  union _type_cast_16_b u;
 ++  u._uchar16 = v;
 ++  return u._int4;
 ++}
 ++
 ++INLINE OVERLOADABLE uint4 as_uint4(uchar16 v) {
 ++  union _type_cast_16_b u;
 ++  u._uchar16 = v;
 ++  return u._uint4;
 ++}
 ++
 ++INLINE OVERLOADABLE short8 as_short8(uchar16 v) {
 ++  union _type_cast_16_b u;
 ++  u._uchar16 = v;
 ++  return u._short8;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort8 as_ushort8(uchar16 v) {
 ++  union _type_cast_16_b u;
 ++  u._uchar16 = v;
 ++  return u._ushort8;
 ++}
 ++
 ++INLINE OVERLOADABLE char16 as_char16(uchar16 v) {
 ++  union _type_cast_16_b u;
 ++  u._uchar16 = v;
 ++  return u._char16;
 ++}
 ++
 ++INLINE OVERLOADABLE float4 as_float4(uchar16 v) {
 ++  union _type_cast_16_b u;
 ++  u._uchar16 = v;
 ++  return u._float4;
 ++}
 ++
 ++INLINE OVERLOADABLE int4 as_int4(float4 v) {
 ++  union _type_cast_16_b u;
 ++  u._float4 = v;
 ++  return u._int4;
 ++}
 ++
 ++INLINE OVERLOADABLE uint4 as_uint4(float4 v) {
 ++  union _type_cast_16_b u;
 ++  u._float4 = v;
 ++  return u._uint4;
 ++}
 ++
 ++INLINE OVERLOADABLE short8 as_short8(float4 v) {
 ++  union _type_cast_16_b u;
 ++  u._float4 = v;
 ++  return u._short8;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort8 as_ushort8(float4 v) {
 ++  union _type_cast_16_b u;
 ++  u._float4 = v;
 ++  return u._ushort8;
 ++}
 ++
 ++INLINE OVERLOADABLE char16 as_char16(float4 v) {
 ++  union _type_cast_16_b u;
 ++  u._float4 = v;
 ++  return u._char16;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar16 as_uchar16(float4 v) {
 ++  union _type_cast_16_b u;
 ++  u._float4 = v;
 ++  return u._uchar16;
 ++}
 ++
 ++union _type_cast_32_b {
 ++  int8 _int8;
 ++  uint8 _uint8;
 ++  short16 _short16;
 ++  ushort16 _ushort16;
 ++  float8 _float8;
 ++};
 ++
 ++INLINE OVERLOADABLE uint8 as_uint8(int8 v) {
 ++  union _type_cast_32_b u;
 ++  u._int8 = v;
 ++  return u._uint8;
 ++}
 ++
 ++INLINE OVERLOADABLE short16 as_short16(int8 v) {
 ++  union _type_cast_32_b u;
 ++  u._int8 = v;
 ++  return u._short16;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort16 as_ushort16(int8 v) {
 ++  union _type_cast_32_b u;
 ++  u._int8 = v;
 ++  return u._ushort16;
 ++}
 ++
 ++INLINE OVERLOADABLE float8 as_float8(int8 v) {
 ++  union _type_cast_32_b u;
 ++  u._int8 = v;
 ++  return u._float8;
 ++}
 ++
 ++INLINE OVERLOADABLE int8 as_int8(uint8 v) {
 ++  union _type_cast_32_b u;
 ++  u._uint8 = v;
 ++  return u._int8;
 ++}
 ++
 ++INLINE OVERLOADABLE short16 as_short16(uint8 v) {
 ++  union _type_cast_32_b u;
 ++  u._uint8 = v;
 ++  return u._short16;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort16 as_ushort16(uint8 v) {
 ++  union _type_cast_32_b u;
 ++  u._uint8 = v;
 ++  return u._ushort16;
 ++}
 ++
 ++INLINE OVERLOADABLE float8 as_float8(uint8 v) {
 ++  union _type_cast_32_b u;
 ++  u._uint8 = v;
 ++  return u._float8;
 ++}
 ++
 ++INLINE OVERLOADABLE int8 as_int8(short16 v) {
 ++  union _type_cast_32_b u;
 ++  u._short16 = v;
 ++  return u._int8;
 ++}
 ++
 ++INLINE OVERLOADABLE uint8 as_uint8(short16 v) {
 ++  union _type_cast_32_b u;
 ++  u._short16 = v;
 ++  return u._uint8;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort16 as_ushort16(short16 v) {
 ++  union _type_cast_32_b u;
 ++  u._short16 = v;
 ++  return u._ushort16;
 ++}
 ++
 ++INLINE OVERLOADABLE float8 as_float8(short16 v) {
 ++  union _type_cast_32_b u;
 ++  u._short16 = v;
 ++  return u._float8;
 ++}
 ++
 ++INLINE OVERLOADABLE int8 as_int8(ushort16 v) {
 ++  union _type_cast_32_b u;
 ++  u._ushort16 = v;
 ++  return u._int8;
 ++}
 ++
 ++INLINE OVERLOADABLE uint8 as_uint8(ushort16 v) {
 ++  union _type_cast_32_b u;
 ++  u._ushort16 = v;
 ++  return u._uint8;
 ++}
 ++
 ++INLINE OVERLOADABLE short16 as_short16(ushort16 v) {
 ++  union _type_cast_32_b u;
 ++  u._ushort16 = v;
 ++  return u._short16;
 ++}
 ++
 ++INLINE OVERLOADABLE float8 as_float8(ushort16 v) {
 ++  union _type_cast_32_b u;
 ++  u._ushort16 = v;
 ++  return u._float8;
 ++}
 ++
 ++INLINE OVERLOADABLE int8 as_int8(float8 v) {
 ++  union _type_cast_32_b u;
 ++  u._float8 = v;
 ++  return u._int8;
 ++}
 ++
 ++INLINE OVERLOADABLE uint8 as_uint8(float8 v) {
 ++  union _type_cast_32_b u;
 ++  u._float8 = v;
 ++  return u._uint8;
 ++}
 ++
 ++INLINE OVERLOADABLE short16 as_short16(float8 v) {
 ++  union _type_cast_32_b u;
 ++  u._float8 = v;
 ++  return u._short16;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort16 as_ushort16(float8 v) {
 ++  union _type_cast_32_b u;
 ++  u._float8 = v;
 ++  return u._ushort16;
 ++}
 ++
 ++union _type_cast_64_b {
 ++  int16 _int16;
 ++  uint16 _uint16;
 ++  float16 _float16;
 ++};
 ++
 ++INLINE OVERLOADABLE uint16 as_uint16(int16 v) {
 ++  union _type_cast_64_b u;
 ++  u._int16 = v;
 ++  return u._uint16;
 ++}
 ++
 ++INLINE OVERLOADABLE float16 as_float16(int16 v) {
 ++  union _type_cast_64_b u;
 ++  u._int16 = v;
 ++  return u._float16;
 ++}
 ++
 ++INLINE OVERLOADABLE int16 as_int16(uint16 v) {
 ++  union _type_cast_64_b u;
 ++  u._uint16 = v;
 ++  return u._int16;
 ++}
 ++
 ++INLINE OVERLOADABLE float16 as_float16(uint16 v) {
 ++  union _type_cast_64_b u;
 ++  u._uint16 = v;
 ++  return u._float16;
 ++}
 ++
 ++INLINE OVERLOADABLE int16 as_int16(float16 v) {
 ++  union _type_cast_64_b u;
 ++  u._float16 = v;
 ++  return u._int16;
 ++}
 ++
 ++INLINE OVERLOADABLE uint16 as_uint16(float16 v) {
 ++  union _type_cast_64_b u;
 ++  u._float16 = v;
 ++  return u._uint16;
-  }
+++}
 ++
 ++// ##END_CONVERSIONS##
 ++
 + #define DEF(type, n, type2) type##n INLINE_OVERLOADABLE convert_##type##n(type2##n d) { \
 +     return (type##n)((type)(d.s0), (type)(d.s1), (type)(d.s2), (type)(d.s3)); \
 +  }
- Index: beignet-0.1+git20130514+19e9c58/backend/src/update_conversions.sh
- ===================================================================
- --- /dev/null	1970-01-01 00:00:00.000000000 +0000
- +++ beignet-0.1+git20130514+19e9c58/backend/src/update_conversions.sh	2013-05-14 20:08:14.718024731 +0200
++diff --git a/backend/src/update_conversions.sh b/backend/src/update_conversions.sh
++new file mode 100755
++index 0000000..bd9099f
++--- /dev/null
+++++ b/backend/src/update_conversions.sh
 +@@ -0,0 +1,11 @@
 ++#! /bin/sh -e
 ++
 ++STDLIB_HEADER=ocl_stdlib.h
 ++
 ++exec >$STDLIB_HEADER.tmp
 ++sed -n -e '1,/##BEGIN_CONVERSIONS##/p' $STDLIB_HEADER
 ++./gen_conversions.sh
 ++sed -n -e '/##END_CONVERSIONS##/,$p' $STDLIB_HEADER
 ++exec >&2
 ++
 ++mv $STDLIB_HEADER.tmp $STDLIB_HEADER
++-- 
++1.7.10.4
++
diff --cc debian/patches/0002-Define-all-convert_-functions.patch
index 06586ec,0000000..f47e282
mode 100644,000000..100644
--- a/debian/patches/0002-Define-all-convert_-functions.patch
+++ b/debian/patches/0002-Define-all-convert_-functions.patch
@@@ -1,946 -1,0 +1,949 @@@
- From b3a5ab4df6690230feae128a26d9fa7a4cefdd2b Mon Sep 17 00:00:00 2001
++From dd0b29265577ad8cf2cc4373bf73a6f549a8263d Mon Sep 17 00:00:00 2001
 +From: Simon Richter <Simon.Richter at hogyros.de>
- Date: Tue, 14 May 2013 16:45:46 +0200
- Subject: [PATCH 02/15] Define all convert_* functions.
++Date: Tue, 14 May 2013 17:04:56 +0200
++Subject: [PATCH 2/7] Define all convert_* functions.
 +To: beignet at lists.freedesktop.org
 +
 +These functions convert between vectors of the same length by casting each
 +member in turn.
 +---
 + backend/src/gen_conversions.sh |   49 +++
 + backend/src/ocl_stdlib.h       |  863 ++++++++++++++++++++++++++++++++++++++--
 + 2 files changed, 889 insertions(+), 23 deletions(-)
 +
- Index: beignet-0.1+git20130514+19e9c58/backend/src/gen_conversions.sh
- ===================================================================
- --- beignet-0.1+git20130514+19e9c58.orig/backend/src/gen_conversions.sh	2013-05-14 20:08:14.714024732 +0200
- +++ beignet-0.1+git20130514+19e9c58/backend/src/gen_conversions.sh	2013-05-14 20:08:21.594024425 +0200
- @@ -87,3 +87,52 @@
++diff --git a/backend/src/gen_conversions.sh b/backend/src/gen_conversions.sh
++index 50a3668..d0b1b58 100755
++--- a/backend/src/gen_conversions.sh
+++++ b/backend/src/gen_conversions.sh
++@@ -87,3 +87,52 @@ for union_size in $union_sizes; do
 +         done
 + 
 + done
 ++
 ++# For all vector lengths and types, generate conversion functions
 ++for vector_length in $VECTOR_LENGTHS; do
 ++        if test $vector_length -eq 1; then
 ++                continue;
 ++        fi
 ++        for ftype in $TYPES; do
 ++                fbasetype=`IFS=:; set -- dummy $ftype; echo $2`
 ++                for ttype in $TYPES; do
 ++                        tbasetype=`IFS=:; set -- dummy $ttype; echo $2`
 ++                        if test $fbasetype = $tbasetype; then
 ++                                continue
 ++                        fi
 ++                        fvectortype=$fbasetype$vector_length
 ++                        tvectortype=$tbasetype$vector_length
 ++                        construct="($tbasetype)(v.s0)"
 ++                        if test $vector_length -gt 1; then
 ++                                construct="$construct, ($tbasetype)(v.s1)"
 ++                        fi
 ++                        if test $vector_length -gt 2; then
 ++                                construct="$construct, ($tbasetype)(v.s2)"
 ++                        fi
 ++                        if test $vector_length -gt 3; then
 ++                                construct="$construct, ($tbasetype)(v.s3)"
 ++                        fi
 ++                        if test $vector_length -gt 4; then
 ++                                construct="$construct, ($tbasetype)(v.s4)"
 ++                                construct="$construct, ($tbasetype)(v.s5)"
 ++                                construct="$construct, ($tbasetype)(v.s6)"
 ++                                construct="$construct, ($tbasetype)(v.s7)"
 ++                        fi
 ++                        if test $vector_length -gt 8; then
 ++                                construct="$construct, ($tbasetype)(v.s8)"
 ++                                construct="$construct, ($tbasetype)(v.s9)"
 ++                                construct="$construct, ($tbasetype)(v.sA)"
 ++                                construct="$construct, ($tbasetype)(v.sB)"
 ++                                construct="$construct, ($tbasetype)(v.sC)"
 ++                                construct="$construct, ($tbasetype)(v.sD)"
 ++                                construct="$construct, ($tbasetype)(v.sE)"
 ++                                construct="$construct, ($tbasetype)(v.sF)"
 ++                        fi
 ++                        
 ++                        echo "INLINE OVERLOADABLE $tvectortype convert_$tvectortype($fvectortype v) {"
 ++                        echo "  return ($tvectortype)($construct);"
 ++                        echo "}"
 ++                        echo
 ++                done
 ++        done
 ++done
- Index: beignet-0.1+git20130514+19e9c58/backend/src/ocl_stdlib.h
- ===================================================================
- --- beignet-0.1+git20130514+19e9c58.orig/backend/src/ocl_stdlib.h	2013-05-14 20:08:14.718024731 +0200
- +++ beignet-0.1+git20130514+19e9c58/backend/src/ocl_stdlib.h	2013-05-14 20:08:21.598024425 +0200
- @@ -1213,31 +1213,848 @@
++diff --git a/backend/src/ocl_stdlib.h b/backend/src/ocl_stdlib.h
++index a051803..4e0459a 100644
++--- a/backend/src/ocl_stdlib.h
+++++ b/backend/src/ocl_stdlib.h
++@@ -1212,31 +1212,848 @@ INLINE OVERLOADABLE uint16 as_uint16(float16 v) {
 +   return u._uint16;
 + }
 + 
 ++INLINE OVERLOADABLE uint2 convert_uint2(int2 v) {
 ++  return (uint2)((uint)(v.s0), (uint)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE short2 convert_short2(int2 v) {
 ++  return (short2)((short)(v.s0), (short)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort2 convert_ushort2(int2 v) {
 ++  return (ushort2)((ushort)(v.s0), (ushort)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE char2 convert_char2(int2 v) {
 ++  return (char2)((char)(v.s0), (char)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar2 convert_uchar2(int2 v) {
 ++  return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE float2 convert_float2(int2 v) {
 ++  return (float2)((float)(v.s0), (float)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE int2 convert_int2(uint2 v) {
 ++  return (int2)((int)(v.s0), (int)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE short2 convert_short2(uint2 v) {
 ++  return (short2)((short)(v.s0), (short)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort2 convert_ushort2(uint2 v) {
 ++  return (ushort2)((ushort)(v.s0), (ushort)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE char2 convert_char2(uint2 v) {
 ++  return (char2)((char)(v.s0), (char)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar2 convert_uchar2(uint2 v) {
 ++  return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE float2 convert_float2(uint2 v) {
 ++  return (float2)((float)(v.s0), (float)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE int2 convert_int2(short2 v) {
 ++  return (int2)((int)(v.s0), (int)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE uint2 convert_uint2(short2 v) {
 ++  return (uint2)((uint)(v.s0), (uint)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort2 convert_ushort2(short2 v) {
 ++  return (ushort2)((ushort)(v.s0), (ushort)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE char2 convert_char2(short2 v) {
 ++  return (char2)((char)(v.s0), (char)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar2 convert_uchar2(short2 v) {
 ++  return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE float2 convert_float2(short2 v) {
 ++  return (float2)((float)(v.s0), (float)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE int2 convert_int2(ushort2 v) {
 ++  return (int2)((int)(v.s0), (int)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE uint2 convert_uint2(ushort2 v) {
 ++  return (uint2)((uint)(v.s0), (uint)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE short2 convert_short2(ushort2 v) {
 ++  return (short2)((short)(v.s0), (short)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE char2 convert_char2(ushort2 v) {
 ++  return (char2)((char)(v.s0), (char)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar2 convert_uchar2(ushort2 v) {
 ++  return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE float2 convert_float2(ushort2 v) {
 ++  return (float2)((float)(v.s0), (float)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE int2 convert_int2(char2 v) {
 ++  return (int2)((int)(v.s0), (int)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE uint2 convert_uint2(char2 v) {
 ++  return (uint2)((uint)(v.s0), (uint)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE short2 convert_short2(char2 v) {
 ++  return (short2)((short)(v.s0), (short)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort2 convert_ushort2(char2 v) {
 ++  return (ushort2)((ushort)(v.s0), (ushort)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar2 convert_uchar2(char2 v) {
 ++  return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE float2 convert_float2(char2 v) {
 ++  return (float2)((float)(v.s0), (float)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE int2 convert_int2(uchar2 v) {
 ++  return (int2)((int)(v.s0), (int)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE uint2 convert_uint2(uchar2 v) {
 ++  return (uint2)((uint)(v.s0), (uint)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE short2 convert_short2(uchar2 v) {
 ++  return (short2)((short)(v.s0), (short)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort2 convert_ushort2(uchar2 v) {
 ++  return (ushort2)((ushort)(v.s0), (ushort)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE char2 convert_char2(uchar2 v) {
 ++  return (char2)((char)(v.s0), (char)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE float2 convert_float2(uchar2 v) {
 ++  return (float2)((float)(v.s0), (float)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE int2 convert_int2(float2 v) {
 ++  return (int2)((int)(v.s0), (int)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE uint2 convert_uint2(float2 v) {
 ++  return (uint2)((uint)(v.s0), (uint)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE short2 convert_short2(float2 v) {
 ++  return (short2)((short)(v.s0), (short)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort2 convert_ushort2(float2 v) {
 ++  return (ushort2)((ushort)(v.s0), (ushort)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE char2 convert_char2(float2 v) {
 ++  return (char2)((char)(v.s0), (char)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar2 convert_uchar2(float2 v) {
 ++  return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE uint3 convert_uint3(int3 v) {
 ++  return (uint3)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE short3 convert_short3(int3 v) {
 ++  return (short3)((short)(v.s0), (short)(v.s1), (short)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort3 convert_ushort3(int3 v) {
 ++  return (ushort3)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE char3 convert_char3(int3 v) {
 ++  return (char3)((char)(v.s0), (char)(v.s1), (char)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar3 convert_uchar3(int3 v) {
 ++  return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE float3 convert_float3(int3 v) {
 ++  return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE int3 convert_int3(uint3 v) {
 ++  return (int3)((int)(v.s0), (int)(v.s1), (int)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE short3 convert_short3(uint3 v) {
 ++  return (short3)((short)(v.s0), (short)(v.s1), (short)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort3 convert_ushort3(uint3 v) {
 ++  return (ushort3)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE char3 convert_char3(uint3 v) {
 ++  return (char3)((char)(v.s0), (char)(v.s1), (char)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar3 convert_uchar3(uint3 v) {
 ++  return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE float3 convert_float3(uint3 v) {
 ++  return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE int3 convert_int3(short3 v) {
 ++  return (int3)((int)(v.s0), (int)(v.s1), (int)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE uint3 convert_uint3(short3 v) {
 ++  return (uint3)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort3 convert_ushort3(short3 v) {
 ++  return (ushort3)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE char3 convert_char3(short3 v) {
 ++  return (char3)((char)(v.s0), (char)(v.s1), (char)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar3 convert_uchar3(short3 v) {
 ++  return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE float3 convert_float3(short3 v) {
 ++  return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE int3 convert_int3(ushort3 v) {
 ++  return (int3)((int)(v.s0), (int)(v.s1), (int)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE uint3 convert_uint3(ushort3 v) {
 ++  return (uint3)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE short3 convert_short3(ushort3 v) {
 ++  return (short3)((short)(v.s0), (short)(v.s1), (short)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE char3 convert_char3(ushort3 v) {
 ++  return (char3)((char)(v.s0), (char)(v.s1), (char)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar3 convert_uchar3(ushort3 v) {
 ++  return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE float3 convert_float3(ushort3 v) {
 ++  return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE int3 convert_int3(char3 v) {
 ++  return (int3)((int)(v.s0), (int)(v.s1), (int)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE uint3 convert_uint3(char3 v) {
 ++  return (uint3)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE short3 convert_short3(char3 v) {
 ++  return (short3)((short)(v.s0), (short)(v.s1), (short)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort3 convert_ushort3(char3 v) {
 ++  return (ushort3)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar3 convert_uchar3(char3 v) {
 ++  return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE float3 convert_float3(char3 v) {
 ++  return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE int3 convert_int3(uchar3 v) {
 ++  return (int3)((int)(v.s0), (int)(v.s1), (int)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE uint3 convert_uint3(uchar3 v) {
 ++  return (uint3)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE short3 convert_short3(uchar3 v) {
 ++  return (short3)((short)(v.s0), (short)(v.s1), (short)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort3 convert_ushort3(uchar3 v) {
 ++  return (ushort3)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE char3 convert_char3(uchar3 v) {
 ++  return (char3)((char)(v.s0), (char)(v.s1), (char)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE float3 convert_float3(uchar3 v) {
 ++  return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE int3 convert_int3(float3 v) {
 ++  return (int3)((int)(v.s0), (int)(v.s1), (int)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE uint3 convert_uint3(float3 v) {
 ++  return (uint3)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE short3 convert_short3(float3 v) {
 ++  return (short3)((short)(v.s0), (short)(v.s1), (short)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort3 convert_ushort3(float3 v) {
 ++  return (ushort3)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE char3 convert_char3(float3 v) {
 ++  return (char3)((char)(v.s0), (char)(v.s1), (char)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar3 convert_uchar3(float3 v) {
 ++  return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE uint4 convert_uint4(int4 v) {
 ++  return (uint4)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE short4 convert_short4(int4 v) {
 ++  return (short4)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort4 convert_ushort4(int4 v) {
 ++  return (ushort4)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE char4 convert_char4(int4 v) {
 ++  return (char4)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar4 convert_uchar4(int4 v) {
 ++  return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE float4 convert_float4(int4 v) {
 ++  return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE int4 convert_int4(uint4 v) {
 ++  return (int4)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE short4 convert_short4(uint4 v) {
 ++  return (short4)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort4 convert_ushort4(uint4 v) {
 ++  return (ushort4)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE char4 convert_char4(uint4 v) {
 ++  return (char4)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar4 convert_uchar4(uint4 v) {
 ++  return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE float4 convert_float4(uint4 v) {
 ++  return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE int4 convert_int4(short4 v) {
 ++  return (int4)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE uint4 convert_uint4(short4 v) {
 ++  return (uint4)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort4 convert_ushort4(short4 v) {
 ++  return (ushort4)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE char4 convert_char4(short4 v) {
 ++  return (char4)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar4 convert_uchar4(short4 v) {
 ++  return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE float4 convert_float4(short4 v) {
 ++  return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE int4 convert_int4(ushort4 v) {
 ++  return (int4)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE uint4 convert_uint4(ushort4 v) {
 ++  return (uint4)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE short4 convert_short4(ushort4 v) {
 ++  return (short4)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE char4 convert_char4(ushort4 v) {
 ++  return (char4)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar4 convert_uchar4(ushort4 v) {
 ++  return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE float4 convert_float4(ushort4 v) {
 ++  return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE int4 convert_int4(char4 v) {
 ++  return (int4)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE uint4 convert_uint4(char4 v) {
 ++  return (uint4)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE short4 convert_short4(char4 v) {
 ++  return (short4)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort4 convert_ushort4(char4 v) {
 ++  return (ushort4)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar4 convert_uchar4(char4 v) {
 ++  return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE float4 convert_float4(char4 v) {
 ++  return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE int4 convert_int4(uchar4 v) {
 ++  return (int4)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE uint4 convert_uint4(uchar4 v) {
 ++  return (uint4)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE short4 convert_short4(uchar4 v) {
 ++  return (short4)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort4 convert_ushort4(uchar4 v) {
 ++  return (ushort4)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE char4 convert_char4(uchar4 v) {
 ++  return (char4)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE float4 convert_float4(uchar4 v) {
 ++  return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE int4 convert_int4(float4 v) {
 ++  return (int4)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE uint4 convert_uint4(float4 v) {
 ++  return (uint4)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE short4 convert_short4(float4 v) {
 ++  return (short4)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort4 convert_ushort4(float4 v) {
 ++  return (ushort4)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE char4 convert_char4(float4 v) {
 ++  return (char4)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar4 convert_uchar4(float4 v) {
 ++  return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE uint8 convert_uint8(int8 v) {
 ++  return (uint8)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE short8 convert_short8(int8 v) {
 ++  return (short8)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort8 convert_ushort8(int8 v) {
 ++  return (ushort8)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE char8 convert_char8(int8 v) {
 ++  return (char8)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar8 convert_uchar8(int8 v) {
 ++  return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE float8 convert_float8(int8 v) {
 ++  return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE int8 convert_int8(uint8 v) {
 ++  return (int8)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE short8 convert_short8(uint8 v) {
 ++  return (short8)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort8 convert_ushort8(uint8 v) {
 ++  return (ushort8)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE char8 convert_char8(uint8 v) {
 ++  return (char8)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar8 convert_uchar8(uint8 v) {
 ++  return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE float8 convert_float8(uint8 v) {
 ++  return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE int8 convert_int8(short8 v) {
 ++  return (int8)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE uint8 convert_uint8(short8 v) {
 ++  return (uint8)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort8 convert_ushort8(short8 v) {
 ++  return (ushort8)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE char8 convert_char8(short8 v) {
 ++  return (char8)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar8 convert_uchar8(short8 v) {
 ++  return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE float8 convert_float8(short8 v) {
 ++  return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE int8 convert_int8(ushort8 v) {
 ++  return (int8)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE uint8 convert_uint8(ushort8 v) {
 ++  return (uint8)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE short8 convert_short8(ushort8 v) {
 ++  return (short8)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE char8 convert_char8(ushort8 v) {
 ++  return (char8)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar8 convert_uchar8(ushort8 v) {
 ++  return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE float8 convert_float8(ushort8 v) {
 ++  return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE int8 convert_int8(char8 v) {
 ++  return (int8)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE uint8 convert_uint8(char8 v) {
 ++  return (uint8)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE short8 convert_short8(char8 v) {
 ++  return (short8)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort8 convert_ushort8(char8 v) {
 ++  return (ushort8)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar8 convert_uchar8(char8 v) {
 ++  return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE float8 convert_float8(char8 v) {
 ++  return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE int8 convert_int8(uchar8 v) {
 ++  return (int8)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE uint8 convert_uint8(uchar8 v) {
 ++  return (uint8)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE short8 convert_short8(uchar8 v) {
 ++  return (short8)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort8 convert_ushort8(uchar8 v) {
 ++  return (ushort8)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE char8 convert_char8(uchar8 v) {
 ++  return (char8)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE float8 convert_float8(uchar8 v) {
 ++  return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE int8 convert_int8(float8 v) {
 ++  return (int8)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE uint8 convert_uint8(float8 v) {
 ++  return (uint8)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE short8 convert_short8(float8 v) {
 ++  return (short8)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort8 convert_ushort8(float8 v) {
 ++  return (ushort8)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE char8 convert_char8(float8 v) {
 ++  return (char8)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar8 convert_uchar8(float8 v) {
 ++  return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE uint16 convert_uint16(int16 v) {
 ++  return (uint16)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7), (uint)(v.s8), (uint)(v.s9), (uint)(v.sA), (uint)(v.sB), (uint)(v.sC), (uint)(v.sD), (uint)(v.sE), (uint)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE short16 convert_short16(int16 v) {
 ++  return (short16)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7), (short)(v.s8), (short)(v.s9), (short)(v.sA), (short)(v.sB), (short)(v.sC), (short)(v.sD), (short)(v.sE), (short)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort16 convert_ushort16(int16 v) {
 ++  return (ushort16)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7), (ushort)(v.s8), (ushort)(v.s9), (ushort)(v.sA), (ushort)(v.sB), (ushort)(v.sC), (ushort)(v.sD), (ushort)(v.sE), (ushort)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE char16 convert_char16(int16 v) {
 ++  return (char16)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7), (char)(v.s8), (char)(v.s9), (char)(v.sA), (char)(v.sB), (char)(v.sC), (char)(v.sD), (char)(v.sE), (char)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar16 convert_uchar16(int16 v) {
 ++  return (uchar16)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7), (uchar)(v.s8), (uchar)(v.s9), (uchar)(v.sA), (uchar)(v.sB), (uchar)(v.sC), (uchar)(v.sD), (uchar)(v.sE), (uchar)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE float16 convert_float16(int16 v) {
 ++  return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE int16 convert_int16(uint16 v) {
 ++  return (int16)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7), (int)(v.s8), (int)(v.s9), (int)(v.sA), (int)(v.sB), (int)(v.sC), (int)(v.sD), (int)(v.sE), (int)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE short16 convert_short16(uint16 v) {
 ++  return (short16)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7), (short)(v.s8), (short)(v.s9), (short)(v.sA), (short)(v.sB), (short)(v.sC), (short)(v.sD), (short)(v.sE), (short)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort16 convert_ushort16(uint16 v) {
 ++  return (ushort16)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7), (ushort)(v.s8), (ushort)(v.s9), (ushort)(v.sA), (ushort)(v.sB), (ushort)(v.sC), (ushort)(v.sD), (ushort)(v.sE), (ushort)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE char16 convert_char16(uint16 v) {
 ++  return (char16)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7), (char)(v.s8), (char)(v.s9), (char)(v.sA), (char)(v.sB), (char)(v.sC), (char)(v.sD), (char)(v.sE), (char)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar16 convert_uchar16(uint16 v) {
 ++  return (uchar16)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7), (uchar)(v.s8), (uchar)(v.s9), (uchar)(v.sA), (uchar)(v.sB), (uchar)(v.sC), (uchar)(v.sD), (uchar)(v.sE), (uchar)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE float16 convert_float16(uint16 v) {
 ++  return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE int16 convert_int16(short16 v) {
 ++  return (int16)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7), (int)(v.s8), (int)(v.s9), (int)(v.sA), (int)(v.sB), (int)(v.sC), (int)(v.sD), (int)(v.sE), (int)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE uint16 convert_uint16(short16 v) {
 ++  return (uint16)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7), (uint)(v.s8), (uint)(v.s9), (uint)(v.sA), (uint)(v.sB), (uint)(v.sC), (uint)(v.sD), (uint)(v.sE), (uint)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort16 convert_ushort16(short16 v) {
 ++  return (ushort16)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7), (ushort)(v.s8), (ushort)(v.s9), (ushort)(v.sA), (ushort)(v.sB), (ushort)(v.sC), (ushort)(v.sD), (ushort)(v.sE), (ushort)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE char16 convert_char16(short16 v) {
 ++  return (char16)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7), (char)(v.s8), (char)(v.s9), (char)(v.sA), (char)(v.sB), (char)(v.sC), (char)(v.sD), (char)(v.sE), (char)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar16 convert_uchar16(short16 v) {
 ++  return (uchar16)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7), (uchar)(v.s8), (uchar)(v.s9), (uchar)(v.sA), (uchar)(v.sB), (uchar)(v.sC), (uchar)(v.sD), (uchar)(v.sE), (uchar)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE float16 convert_float16(short16 v) {
 ++  return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE int16 convert_int16(ushort16 v) {
 ++  return (int16)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7), (int)(v.s8), (int)(v.s9), (int)(v.sA), (int)(v.sB), (int)(v.sC), (int)(v.sD), (int)(v.sE), (int)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE uint16 convert_uint16(ushort16 v) {
 ++  return (uint16)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7), (uint)(v.s8), (uint)(v.s9), (uint)(v.sA), (uint)(v.sB), (uint)(v.sC), (uint)(v.sD), (uint)(v.sE), (uint)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE short16 convert_short16(ushort16 v) {
 ++  return (short16)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7), (short)(v.s8), (short)(v.s9), (short)(v.sA), (short)(v.sB), (short)(v.sC), (short)(v.sD), (short)(v.sE), (short)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE char16 convert_char16(ushort16 v) {
 ++  return (char16)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7), (char)(v.s8), (char)(v.s9), (char)(v.sA), (char)(v.sB), (char)(v.sC), (char)(v.sD), (char)(v.sE), (char)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar16 convert_uchar16(ushort16 v) {
 ++  return (uchar16)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7), (uchar)(v.s8), (uchar)(v.s9), (uchar)(v.sA), (uchar)(v.sB), (uchar)(v.sC), (uchar)(v.sD), (uchar)(v.sE), (uchar)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE float16 convert_float16(ushort16 v) {
 ++  return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE int16 convert_int16(char16 v) {
 ++  return (int16)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7), (int)(v.s8), (int)(v.s9), (int)(v.sA), (int)(v.sB), (int)(v.sC), (int)(v.sD), (int)(v.sE), (int)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE uint16 convert_uint16(char16 v) {
 ++  return (uint16)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7), (uint)(v.s8), (uint)(v.s9), (uint)(v.sA), (uint)(v.sB), (uint)(v.sC), (uint)(v.sD), (uint)(v.sE), (uint)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE short16 convert_short16(char16 v) {
 ++  return (short16)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7), (short)(v.s8), (short)(v.s9), (short)(v.sA), (short)(v.sB), (short)(v.sC), (short)(v.sD), (short)(v.sE), (short)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort16 convert_ushort16(char16 v) {
 ++  return (ushort16)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7), (ushort)(v.s8), (ushort)(v.s9), (ushort)(v.sA), (ushort)(v.sB), (ushort)(v.sC), (ushort)(v.sD), (ushort)(v.sE), (ushort)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar16 convert_uchar16(char16 v) {
 ++  return (uchar16)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7), (uchar)(v.s8), (uchar)(v.s9), (uchar)(v.sA), (uchar)(v.sB), (uchar)(v.sC), (uchar)(v.sD), (uchar)(v.sE), (uchar)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE float16 convert_float16(char16 v) {
 ++  return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE int16 convert_int16(uchar16 v) {
 ++  return (int16)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7), (int)(v.s8), (int)(v.s9), (int)(v.sA), (int)(v.sB), (int)(v.sC), (int)(v.sD), (int)(v.sE), (int)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE uint16 convert_uint16(uchar16 v) {
 ++  return (uint16)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7), (uint)(v.s8), (uint)(v.s9), (uint)(v.sA), (uint)(v.sB), (uint)(v.sC), (uint)(v.sD), (uint)(v.sE), (uint)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE short16 convert_short16(uchar16 v) {
 ++  return (short16)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7), (short)(v.s8), (short)(v.s9), (short)(v.sA), (short)(v.sB), (short)(v.sC), (short)(v.sD), (short)(v.sE), (short)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort16 convert_ushort16(uchar16 v) {
 ++  return (ushort16)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7), (ushort)(v.s8), (ushort)(v.s9), (ushort)(v.sA), (ushort)(v.sB), (ushort)(v.sC), (ushort)(v.sD), (ushort)(v.sE), (ushort)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE char16 convert_char16(uchar16 v) {
 ++  return (char16)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7), (char)(v.s8), (char)(v.s9), (char)(v.sA), (char)(v.sB), (char)(v.sC), (char)(v.sD), (char)(v.sE), (char)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE float16 convert_float16(uchar16 v) {
 ++  return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE int16 convert_int16(float16 v) {
 ++  return (int16)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7), (int)(v.s8), (int)(v.s9), (int)(v.sA), (int)(v.sB), (int)(v.sC), (int)(v.sD), (int)(v.sE), (int)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE uint16 convert_uint16(float16 v) {
 ++  return (uint16)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7), (uint)(v.s8), (uint)(v.s9), (uint)(v.sA), (uint)(v.sB), (uint)(v.sC), (uint)(v.sD), (uint)(v.sE), (uint)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE short16 convert_short16(float16 v) {
 ++  return (short16)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7), (short)(v.s8), (short)(v.s9), (short)(v.sA), (short)(v.sB), (short)(v.sC), (short)(v.sD), (short)(v.sE), (short)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort16 convert_ushort16(float16 v) {
 ++  return (ushort16)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7), (ushort)(v.s8), (ushort)(v.s9), (ushort)(v.sA), (ushort)(v.sB), (ushort)(v.sC), (ushort)(v.sD), (ushort)(v.sE), (ushort)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE char16 convert_char16(float16 v) {
 ++  return (char16)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7), (char)(v.s8), (char)(v.s9), (char)(v.sA), (char)(v.sB), (char)(v.sC), (char)(v.sD), (char)(v.sE), (char)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar16 convert_uchar16(float16 v) {
 ++  return (uchar16)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7), (uchar)(v.s8), (uchar)(v.s9), (uchar)(v.sA), (uchar)(v.sB), (uchar)(v.sC), (uchar)(v.sD), (uchar)(v.sE), (uchar)(v.sF));
 ++}
 ++
 + // ##END_CONVERSIONS##
 + 
 +-#define DEF(type, n, type2) type##n INLINE_OVERLOADABLE convert_##type##n(type2##n d) { \
 +-    return (type##n)((type)(d.s0), (type)(d.s1), (type)(d.s2), (type)(d.s3)); \
 +- }
 +-#define DEF2(type) DEF(type, 4, char); \
 +-                   DEF(type, 4, uchar); \
 +-                   DEF(type, 4, short); \
 +-                   DEF(type, 4, ushort); \
 +-                   DEF(type, 4, int); \
 +-                   DEF(type, 4, uint); \
 +-                   DEF(type, 4, long); \
 +-                   DEF(type, 4, ulong); \
 +-                   DEF(type, 4, float);
 +-DEF2(char);
 +-DEF2(uchar);
 +-DEF2(short);
 +-DEF2(ushort);
 +-DEF2(int);
 +-DEF2(uint);
 +-DEF2(long);
 +-DEF2(ulong);
 +-DEF2(float);
 +-#undef DEF2
 +-#undef DEF
 + /////////////////////////////////////////////////////////////////////////////
 + // OpenCL preprocessor directives & macros
 + /////////////////////////////////////////////////////////////////////////////
++-- 
++1.7.10.4
++
diff --cc debian/patches/0003-Add-long-and-ulong-types-to-conversions.patch
index 22a7945,0000000..c2253ee
mode 100644,000000..100644
--- a/debian/patches/0003-Add-long-and-ulong-types-to-conversions.patch
+++ b/debian/patches/0003-Add-long-and-ulong-types-to-conversions.patch
@@@ -1,1719 -1,0 +1,1722 @@@
- From a10c3357283b8e2714a41b2d31f0f9831073202a Mon Sep 17 00:00:00 2001
++From 809e0d28d8b628885d1024020b5f479154e2e915 Mon Sep 17 00:00:00 2001
 +From: Simon Richter <Simon.Richter at hogyros.de>
- Date: Tue, 14 May 2013 17:00:45 +0200
- Subject: [PATCH 03/15] Add long and ulong types to conversions.
++Date: Tue, 14 May 2013 17:04:57 +0200
++Subject: [PATCH 3/7] Add long and ulong types to conversions.
 +To: beignet at lists.freedesktop.org
 +
 +This enables as_* and convert_* for the long and ulong data types.
 +---
 + backend/src/gen_conversions.sh |    2 +-
 + backend/src/ocl_stdlib.h       | 1248 +++++++++++++++++++++++++++++++++++++++-
 + 2 files changed, 1234 insertions(+), 16 deletions(-)
 +
- Index: beignet-0.1+git20130514+19e9c58/backend/src/gen_conversions.sh
- ===================================================================
- --- beignet-0.1+git20130514+19e9c58.orig/backend/src/gen_conversions.sh	2013-05-14 20:08:21.594024425 +0200
- +++ beignet-0.1+git20130514+19e9c58/backend/src/gen_conversions.sh	2013-05-14 20:08:23.422024343 +0200
++diff --git a/backend/src/gen_conversions.sh b/backend/src/gen_conversions.sh
++index d0b1b58..083fc38 100755
++--- a/backend/src/gen_conversions.sh
+++++ b/backend/src/gen_conversions.sh
 +@@ -1,7 +1,7 @@
 + #! /bin/sh -e
 + 
 + # Supported base types and their lengths
 +-TYPES="int:4 uint:4 short:2 ushort:2 char:1 uchar:1 float:4"
 ++TYPES="long:8 ulong:8 int:4 uint:4 short:2 ushort:2 char:1 uchar:1 float:4"
 + 
 + # Supported vector lengths
 + VECTOR_LENGTHS="1 2 3 4 8 16"
- Index: beignet-0.1+git20130514+19e9c58/backend/src/ocl_stdlib.h
- ===================================================================
- --- beignet-0.1+git20130514+19e9c58.orig/backend/src/ocl_stdlib.h	2013-05-14 20:08:21.598024425 +0200
- +++ beignet-0.1+git20130514+19e9c58/backend/src/ocl_stdlib.h	2013-05-14 20:08:23.426024343 +0200
- @@ -478,6 +478,8 @@
++diff --git a/backend/src/ocl_stdlib.h b/backend/src/ocl_stdlib.h
++index 4e0459a..0d09aff 100644
++--- a/backend/src/ocl_stdlib.h
+++++ b/backend/src/ocl_stdlib.h
++@@ -477,6 +477,8 @@ INLINE OVERLOADABLE short3 as_short3(ushort3 v) {
 + }
 + 
 + union _type_cast_8_b {
 ++  long _long;
 ++  ulong _ulong;
 +   int2 _int2;
 +   uint2 _uint2;
 +   short4 _short4;
- @@ -487,6 +489,114 @@
++@@ -486,6 +488,114 @@ union _type_cast_8_b {
 +   float2 _float2;
 + };
 + 
 ++INLINE OVERLOADABLE ulong as_ulong(long v) {
 ++  union _type_cast_8_b u;
 ++  u._long = v;
 ++  return u._ulong;
 ++}
 ++
 ++INLINE OVERLOADABLE int2 as_int2(long v) {
 ++  union _type_cast_8_b u;
 ++  u._long = v;
 ++  return u._int2;
 ++}
 ++
 ++INLINE OVERLOADABLE uint2 as_uint2(long v) {
 ++  union _type_cast_8_b u;
 ++  u._long = v;
 ++  return u._uint2;
 ++}
 ++
 ++INLINE OVERLOADABLE short4 as_short4(long v) {
 ++  union _type_cast_8_b u;
 ++  u._long = v;
 ++  return u._short4;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort4 as_ushort4(long v) {
 ++  union _type_cast_8_b u;
 ++  u._long = v;
 ++  return u._ushort4;
 ++}
 ++
 ++INLINE OVERLOADABLE char8 as_char8(long v) {
 ++  union _type_cast_8_b u;
 ++  u._long = v;
 ++  return u._char8;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar8 as_uchar8(long v) {
 ++  union _type_cast_8_b u;
 ++  u._long = v;
 ++  return u._uchar8;
 ++}
 ++
 ++INLINE OVERLOADABLE float2 as_float2(long v) {
 ++  union _type_cast_8_b u;
 ++  u._long = v;
 ++  return u._float2;
 ++}
 ++
 ++INLINE OVERLOADABLE long as_long(ulong v) {
 ++  union _type_cast_8_b u;
 ++  u._ulong = v;
 ++  return u._long;
 ++}
 ++
 ++INLINE OVERLOADABLE int2 as_int2(ulong v) {
 ++  union _type_cast_8_b u;
 ++  u._ulong = v;
 ++  return u._int2;
 ++}
 ++
 ++INLINE OVERLOADABLE uint2 as_uint2(ulong v) {
 ++  union _type_cast_8_b u;
 ++  u._ulong = v;
 ++  return u._uint2;
 ++}
 ++
 ++INLINE OVERLOADABLE short4 as_short4(ulong v) {
 ++  union _type_cast_8_b u;
 ++  u._ulong = v;
 ++  return u._short4;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort4 as_ushort4(ulong v) {
 ++  union _type_cast_8_b u;
 ++  u._ulong = v;
 ++  return u._ushort4;
 ++}
 ++
 ++INLINE OVERLOADABLE char8 as_char8(ulong v) {
 ++  union _type_cast_8_b u;
 ++  u._ulong = v;
 ++  return u._char8;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar8 as_uchar8(ulong v) {
 ++  union _type_cast_8_b u;
 ++  u._ulong = v;
 ++  return u._uchar8;
 ++}
 ++
 ++INLINE OVERLOADABLE float2 as_float2(ulong v) {
 ++  union _type_cast_8_b u;
 ++  u._ulong = v;
 ++  return u._float2;
 ++}
 ++
 ++INLINE OVERLOADABLE long as_long(int2 v) {
 ++  union _type_cast_8_b u;
 ++  u._int2 = v;
 ++  return u._long;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong as_ulong(int2 v) {
 ++  union _type_cast_8_b u;
 ++  u._int2 = v;
 ++  return u._ulong;
 ++}
 ++
 + INLINE OVERLOADABLE uint2 as_uint2(int2 v) {
 +   union _type_cast_8_b u;
 +   u._int2 = v;
- @@ -523,6 +633,18 @@
++@@ -522,6 +632,18 @@ INLINE OVERLOADABLE float2 as_float2(int2 v) {
 +   return u._float2;
 + }
 + 
 ++INLINE OVERLOADABLE long as_long(uint2 v) {
 ++  union _type_cast_8_b u;
 ++  u._uint2 = v;
 ++  return u._long;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong as_ulong(uint2 v) {
 ++  union _type_cast_8_b u;
 ++  u._uint2 = v;
 ++  return u._ulong;
 ++}
 ++
 + INLINE OVERLOADABLE int2 as_int2(uint2 v) {
 +   union _type_cast_8_b u;
 +   u._uint2 = v;
- @@ -559,6 +681,18 @@
++@@ -558,6 +680,18 @@ INLINE OVERLOADABLE float2 as_float2(uint2 v) {
 +   return u._float2;
 + }
 + 
 ++INLINE OVERLOADABLE long as_long(short4 v) {
 ++  union _type_cast_8_b u;
 ++  u._short4 = v;
 ++  return u._long;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong as_ulong(short4 v) {
 ++  union _type_cast_8_b u;
 ++  u._short4 = v;
 ++  return u._ulong;
 ++}
 ++
 + INLINE OVERLOADABLE int2 as_int2(short4 v) {
 +   union _type_cast_8_b u;
 +   u._short4 = v;
- @@ -595,6 +729,18 @@
++@@ -594,6 +728,18 @@ INLINE OVERLOADABLE float2 as_float2(short4 v) {
 +   return u._float2;
 + }
 + 
 ++INLINE OVERLOADABLE long as_long(ushort4 v) {
 ++  union _type_cast_8_b u;
 ++  u._ushort4 = v;
 ++  return u._long;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong as_ulong(ushort4 v) {
 ++  union _type_cast_8_b u;
 ++  u._ushort4 = v;
 ++  return u._ulong;
 ++}
 ++
 + INLINE OVERLOADABLE int2 as_int2(ushort4 v) {
 +   union _type_cast_8_b u;
 +   u._ushort4 = v;
- @@ -631,6 +777,18 @@
++@@ -630,6 +776,18 @@ INLINE OVERLOADABLE float2 as_float2(ushort4 v) {
 +   return u._float2;
 + }
 + 
 ++INLINE OVERLOADABLE long as_long(char8 v) {
 ++  union _type_cast_8_b u;
 ++  u._char8 = v;
 ++  return u._long;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong as_ulong(char8 v) {
 ++  union _type_cast_8_b u;
 ++  u._char8 = v;
 ++  return u._ulong;
 ++}
 ++
 + INLINE OVERLOADABLE int2 as_int2(char8 v) {
 +   union _type_cast_8_b u;
 +   u._char8 = v;
- @@ -667,6 +825,18 @@
++@@ -666,6 +824,18 @@ INLINE OVERLOADABLE float2 as_float2(char8 v) {
 +   return u._float2;
 + }
 + 
 ++INLINE OVERLOADABLE long as_long(uchar8 v) {
 ++  union _type_cast_8_b u;
 ++  u._uchar8 = v;
 ++  return u._long;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong as_ulong(uchar8 v) {
 ++  union _type_cast_8_b u;
 ++  u._uchar8 = v;
 ++  return u._ulong;
 ++}
 ++
 + INLINE OVERLOADABLE int2 as_int2(uchar8 v) {
 +   union _type_cast_8_b u;
 +   u._uchar8 = v;
- @@ -703,6 +873,18 @@
++@@ -702,6 +872,18 @@ INLINE OVERLOADABLE float2 as_float2(uchar8 v) {
 +   return u._float2;
 + }
 + 
 ++INLINE OVERLOADABLE long as_long(float2 v) {
 ++  union _type_cast_8_b u;
 ++  u._float2 = v;
 ++  return u._long;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong as_ulong(float2 v) {
 ++  union _type_cast_8_b u;
 ++  u._float2 = v;
 ++  return u._ulong;
 ++}
 ++
 + INLINE OVERLOADABLE int2 as_int2(float2 v) {
 +   union _type_cast_8_b u;
 +   u._float2 = v;
- @@ -782,6 +964,8 @@
++@@ -781,6 +963,8 @@ INLINE OVERLOADABLE uint3 as_uint3(float3 v) {
 + }
 + 
 + union _type_cast_16_b {
 ++  long2 _long2;
 ++  ulong2 _ulong2;
 +   int4 _int4;
 +   uint4 _uint4;
 +   short8 _short8;
- @@ -791,6 +975,114 @@
++@@ -790,6 +974,114 @@ union _type_cast_16_b {
 +   float4 _float4;
 + };
 + 
 ++INLINE OVERLOADABLE ulong2 as_ulong2(long2 v) {
 ++  union _type_cast_16_b u;
 ++  u._long2 = v;
 ++  return u._ulong2;
 ++}
 ++
 ++INLINE OVERLOADABLE int4 as_int4(long2 v) {
 ++  union _type_cast_16_b u;
 ++  u._long2 = v;
 ++  return u._int4;
 ++}
 ++
 ++INLINE OVERLOADABLE uint4 as_uint4(long2 v) {
 ++  union _type_cast_16_b u;
 ++  u._long2 = v;
 ++  return u._uint4;
 ++}
 ++
 ++INLINE OVERLOADABLE short8 as_short8(long2 v) {
 ++  union _type_cast_16_b u;
 ++  u._long2 = v;
 ++  return u._short8;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort8 as_ushort8(long2 v) {
 ++  union _type_cast_16_b u;
 ++  u._long2 = v;
 ++  return u._ushort8;
 ++}
 ++
 ++INLINE OVERLOADABLE char16 as_char16(long2 v) {
 ++  union _type_cast_16_b u;
 ++  u._long2 = v;
 ++  return u._char16;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar16 as_uchar16(long2 v) {
 ++  union _type_cast_16_b u;
 ++  u._long2 = v;
 ++  return u._uchar16;
 ++}
 ++
 ++INLINE OVERLOADABLE float4 as_float4(long2 v) {
 ++  union _type_cast_16_b u;
 ++  u._long2 = v;
 ++  return u._float4;
 ++}
 ++
 ++INLINE OVERLOADABLE long2 as_long2(ulong2 v) {
 ++  union _type_cast_16_b u;
 ++  u._ulong2 = v;
 ++  return u._long2;
 ++}
 ++
 ++INLINE OVERLOADABLE int4 as_int4(ulong2 v) {
 ++  union _type_cast_16_b u;
 ++  u._ulong2 = v;
 ++  return u._int4;
 ++}
 ++
 ++INLINE OVERLOADABLE uint4 as_uint4(ulong2 v) {
 ++  union _type_cast_16_b u;
 ++  u._ulong2 = v;
 ++  return u._uint4;
 ++}
 ++
 ++INLINE OVERLOADABLE short8 as_short8(ulong2 v) {
 ++  union _type_cast_16_b u;
 ++  u._ulong2 = v;
 ++  return u._short8;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort8 as_ushort8(ulong2 v) {
 ++  union _type_cast_16_b u;
 ++  u._ulong2 = v;
 ++  return u._ushort8;
 ++}
 ++
 ++INLINE OVERLOADABLE char16 as_char16(ulong2 v) {
 ++  union _type_cast_16_b u;
 ++  u._ulong2 = v;
 ++  return u._char16;
 ++}
 ++
 ++INLINE OVERLOADABLE uchar16 as_uchar16(ulong2 v) {
 ++  union _type_cast_16_b u;
 ++  u._ulong2 = v;
 ++  return u._uchar16;
 ++}
 ++
 ++INLINE OVERLOADABLE float4 as_float4(ulong2 v) {
 ++  union _type_cast_16_b u;
 ++  u._ulong2 = v;
 ++  return u._float4;
 ++}
 ++
 ++INLINE OVERLOADABLE long2 as_long2(int4 v) {
 ++  union _type_cast_16_b u;
 ++  u._int4 = v;
 ++  return u._long2;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong2 as_ulong2(int4 v) {
 ++  union _type_cast_16_b u;
 ++  u._int4 = v;
 ++  return u._ulong2;
 ++}
 ++
 + INLINE OVERLOADABLE uint4 as_uint4(int4 v) {
 +   union _type_cast_16_b u;
 +   u._int4 = v;
- @@ -827,6 +1119,18 @@
++@@ -826,6 +1118,18 @@ INLINE OVERLOADABLE float4 as_float4(int4 v) {
 +   return u._float4;
 + }
 + 
 ++INLINE OVERLOADABLE long2 as_long2(uint4 v) {
 ++  union _type_cast_16_b u;
 ++  u._uint4 = v;
 ++  return u._long2;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong2 as_ulong2(uint4 v) {
 ++  union _type_cast_16_b u;
 ++  u._uint4 = v;
 ++  return u._ulong2;
 ++}
 ++
 + INLINE OVERLOADABLE int4 as_int4(uint4 v) {
 +   union _type_cast_16_b u;
 +   u._uint4 = v;
- @@ -863,6 +1167,18 @@
++@@ -862,6 +1166,18 @@ INLINE OVERLOADABLE float4 as_float4(uint4 v) {
 +   return u._float4;
 + }
 + 
 ++INLINE OVERLOADABLE long2 as_long2(short8 v) {
 ++  union _type_cast_16_b u;
 ++  u._short8 = v;
 ++  return u._long2;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong2 as_ulong2(short8 v) {
 ++  union _type_cast_16_b u;
 ++  u._short8 = v;
 ++  return u._ulong2;
 ++}
 ++
 + INLINE OVERLOADABLE int4 as_int4(short8 v) {
 +   union _type_cast_16_b u;
 +   u._short8 = v;
- @@ -899,6 +1215,18 @@
++@@ -898,6 +1214,18 @@ INLINE OVERLOADABLE float4 as_float4(short8 v) {
 +   return u._float4;
 + }
 + 
 ++INLINE OVERLOADABLE long2 as_long2(ushort8 v) {
 ++  union _type_cast_16_b u;
 ++  u._ushort8 = v;
 ++  return u._long2;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong2 as_ulong2(ushort8 v) {
 ++  union _type_cast_16_b u;
 ++  u._ushort8 = v;
 ++  return u._ulong2;
 ++}
 ++
 + INLINE OVERLOADABLE int4 as_int4(ushort8 v) {
 +   union _type_cast_16_b u;
 +   u._ushort8 = v;
- @@ -935,6 +1263,18 @@
++@@ -934,6 +1262,18 @@ INLINE OVERLOADABLE float4 as_float4(ushort8 v) {
 +   return u._float4;
 + }
 + 
 ++INLINE OVERLOADABLE long2 as_long2(char16 v) {
 ++  union _type_cast_16_b u;
 ++  u._char16 = v;
 ++  return u._long2;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong2 as_ulong2(char16 v) {
 ++  union _type_cast_16_b u;
 ++  u._char16 = v;
 ++  return u._ulong2;
 ++}
 ++
 + INLINE OVERLOADABLE int4 as_int4(char16 v) {
 +   union _type_cast_16_b u;
 +   u._char16 = v;
- @@ -971,6 +1311,18 @@
++@@ -970,6 +1310,18 @@ INLINE OVERLOADABLE float4 as_float4(char16 v) {
 +   return u._float4;
 + }
 + 
 ++INLINE OVERLOADABLE long2 as_long2(uchar16 v) {
 ++  union _type_cast_16_b u;
 ++  u._uchar16 = v;
 ++  return u._long2;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong2 as_ulong2(uchar16 v) {
 ++  union _type_cast_16_b u;
 ++  u._uchar16 = v;
 ++  return u._ulong2;
 ++}
 ++
 + INLINE OVERLOADABLE int4 as_int4(uchar16 v) {
 +   union _type_cast_16_b u;
 +   u._uchar16 = v;
- @@ -1007,6 +1359,18 @@
++@@ -1006,6 +1358,18 @@ INLINE OVERLOADABLE float4 as_float4(uchar16 v) {
 +   return u._float4;
 + }
 + 
 ++INLINE OVERLOADABLE long2 as_long2(float4 v) {
 ++  union _type_cast_16_b u;
 ++  u._float4 = v;
 ++  return u._long2;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong2 as_ulong2(float4 v) {
 ++  union _type_cast_16_b u;
 ++  u._float4 = v;
 ++  return u._ulong2;
 ++}
 ++
 + INLINE OVERLOADABLE int4 as_int4(float4 v) {
 +   union _type_cast_16_b u;
 +   u._float4 = v;
- @@ -1043,7 +1407,26 @@
++@@ -1042,7 +1406,26 @@ INLINE OVERLOADABLE uchar16 as_uchar16(float4 v) {
 +   return u._uchar16;
 + }
 + 
 ++union _type_cast_24_b {
 ++  long3 _long3;
 ++  ulong3 _ulong3;
 ++};
 ++
 ++INLINE OVERLOADABLE ulong3 as_ulong3(long3 v) {
 ++  union _type_cast_24_b u;
 ++  u._long3 = v;
 ++  return u._ulong3;
 ++}
 ++
 ++INLINE OVERLOADABLE long3 as_long3(ulong3 v) {
 ++  union _type_cast_24_b u;
 ++  u._ulong3 = v;
 ++  return u._long3;
 ++}
 ++
 + union _type_cast_32_b {
 ++  long4 _long4;
 ++  ulong4 _ulong4;
 +   int8 _int8;
 +   uint8 _uint8;
 +   short16 _short16;
- @@ -1051,30 +1434,126 @@
++@@ -1050,30 +1433,126 @@ union _type_cast_32_b {
 +   float8 _float8;
 + };
 + 
 +-INLINE OVERLOADABLE uint8 as_uint8(int8 v) {
 ++INLINE OVERLOADABLE ulong4 as_ulong4(long4 v) {
 +   union _type_cast_32_b u;
 +-  u._int8 = v;
 ++  u._long4 = v;
 ++  return u._ulong4;
 ++}
 ++
 ++INLINE OVERLOADABLE int8 as_int8(long4 v) {
 ++  union _type_cast_32_b u;
 ++  u._long4 = v;
 ++  return u._int8;
 ++}
 ++
 ++INLINE OVERLOADABLE uint8 as_uint8(long4 v) {
 ++  union _type_cast_32_b u;
 ++  u._long4 = v;
 +   return u._uint8;
 + }
 + 
 +-INLINE OVERLOADABLE short16 as_short16(int8 v) {
 ++INLINE OVERLOADABLE short16 as_short16(long4 v) {
 +   union _type_cast_32_b u;
 +-  u._int8 = v;
 ++  u._long4 = v;
 +   return u._short16;
 + }
 + 
 +-INLINE OVERLOADABLE ushort16 as_ushort16(int8 v) {
 ++INLINE OVERLOADABLE ushort16 as_ushort16(long4 v) {
 +   union _type_cast_32_b u;
 +-  u._int8 = v;
 ++  u._long4 = v;
 +   return u._ushort16;
 + }
 + 
 +-INLINE OVERLOADABLE float8 as_float8(int8 v) {
 ++INLINE OVERLOADABLE float8 as_float8(long4 v) {
 ++  union _type_cast_32_b u;
 ++  u._long4 = v;
 ++  return u._float8;
 ++}
 ++
 ++INLINE OVERLOADABLE long4 as_long4(ulong4 v) {
 ++  union _type_cast_32_b u;
 ++  u._ulong4 = v;
 ++  return u._long4;
 ++}
 ++
 ++INLINE OVERLOADABLE int8 as_int8(ulong4 v) {
 ++  union _type_cast_32_b u;
 ++  u._ulong4 = v;
 ++  return u._int8;
 ++}
 ++
 ++INLINE OVERLOADABLE uint8 as_uint8(ulong4 v) {
 ++  union _type_cast_32_b u;
 ++  u._ulong4 = v;
 ++  return u._uint8;
 ++}
 ++
 ++INLINE OVERLOADABLE short16 as_short16(ulong4 v) {
 ++  union _type_cast_32_b u;
 ++  u._ulong4 = v;
 ++  return u._short16;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort16 as_ushort16(ulong4 v) {
 ++  union _type_cast_32_b u;
 ++  u._ulong4 = v;
 ++  return u._ushort16;
 ++}
 ++
 ++INLINE OVERLOADABLE float8 as_float8(ulong4 v) {
 ++  union _type_cast_32_b u;
 ++  u._ulong4 = v;
 ++  return u._float8;
 ++}
 ++
 ++INLINE OVERLOADABLE long4 as_long4(int8 v) {
 ++  union _type_cast_32_b u;
 ++  u._int8 = v;
 ++  return u._long4;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong4 as_ulong4(int8 v) {
 ++  union _type_cast_32_b u;
 ++  u._int8 = v;
 ++  return u._ulong4;
 ++}
 ++
 ++INLINE OVERLOADABLE uint8 as_uint8(int8 v) {
 ++  union _type_cast_32_b u;
 ++  u._int8 = v;
 ++  return u._uint8;
 ++}
 ++
 ++INLINE OVERLOADABLE short16 as_short16(int8 v) {
 ++  union _type_cast_32_b u;
 ++  u._int8 = v;
 ++  return u._short16;
 ++}
 ++
 ++INLINE OVERLOADABLE ushort16 as_ushort16(int8 v) {
 ++  union _type_cast_32_b u;
 ++  u._int8 = v;
 ++  return u._ushort16;
 ++}
 ++
 ++INLINE OVERLOADABLE float8 as_float8(int8 v) {
 +   union _type_cast_32_b u;
 +   u._int8 = v;
 +   return u._float8;
 + }
 + 
 ++INLINE OVERLOADABLE long4 as_long4(uint8 v) {
 ++  union _type_cast_32_b u;
 ++  u._uint8 = v;
 ++  return u._long4;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong4 as_ulong4(uint8 v) {
 ++  union _type_cast_32_b u;
 ++  u._uint8 = v;
 ++  return u._ulong4;
 ++}
 ++
 + INLINE OVERLOADABLE int8 as_int8(uint8 v) {
 +   union _type_cast_32_b u;
 +   u._uint8 = v;
- @@ -1099,6 +1578,18 @@
++@@ -1098,6 +1577,18 @@ INLINE OVERLOADABLE float8 as_float8(uint8 v) {
 +   return u._float8;
 + }
 + 
 ++INLINE OVERLOADABLE long4 as_long4(short16 v) {
 ++  union _type_cast_32_b u;
 ++  u._short16 = v;
 ++  return u._long4;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong4 as_ulong4(short16 v) {
 ++  union _type_cast_32_b u;
 ++  u._short16 = v;
 ++  return u._ulong4;
 ++}
 ++
 + INLINE OVERLOADABLE int8 as_int8(short16 v) {
 +   union _type_cast_32_b u;
 +   u._short16 = v;
- @@ -1123,6 +1614,18 @@
++@@ -1122,6 +1613,18 @@ INLINE OVERLOADABLE float8 as_float8(short16 v) {
 +   return u._float8;
 + }
 + 
 ++INLINE OVERLOADABLE long4 as_long4(ushort16 v) {
 ++  union _type_cast_32_b u;
 ++  u._ushort16 = v;
 ++  return u._long4;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong4 as_ulong4(ushort16 v) {
 ++  union _type_cast_32_b u;
 ++  u._ushort16 = v;
 ++  return u._ulong4;
 ++}
 ++
 + INLINE OVERLOADABLE int8 as_int8(ushort16 v) {
 +   union _type_cast_32_b u;
 +   u._ushort16 = v;
- @@ -1147,6 +1650,18 @@
++@@ -1146,6 +1649,18 @@ INLINE OVERLOADABLE float8 as_float8(ushort16 v) {
 +   return u._float8;
 + }
 + 
 ++INLINE OVERLOADABLE long4 as_long4(float8 v) {
 ++  union _type_cast_32_b u;
 ++  u._float8 = v;
 ++  return u._long4;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong4 as_ulong4(float8 v) {
 ++  union _type_cast_32_b u;
 ++  u._float8 = v;
 ++  return u._ulong4;
 ++}
 ++
 + INLINE OVERLOADABLE int8 as_int8(float8 v) {
 +   union _type_cast_32_b u;
 +   u._float8 = v;
- @@ -1172,11 +1687,73 @@
++@@ -1171,11 +1686,73 @@ INLINE OVERLOADABLE ushort16 as_ushort16(float8 v) {
 + }
 + 
 + union _type_cast_64_b {
 ++  long8 _long8;
 ++  ulong8 _ulong8;
 +   int16 _int16;
 +   uint16 _uint16;
 +   float16 _float16;
 + };
 + 
 ++INLINE OVERLOADABLE ulong8 as_ulong8(long8 v) {
 ++  union _type_cast_64_b u;
 ++  u._long8 = v;
 ++  return u._ulong8;
 ++}
 ++
 ++INLINE OVERLOADABLE int16 as_int16(long8 v) {
 ++  union _type_cast_64_b u;
 ++  u._long8 = v;
 ++  return u._int16;
 ++}
 ++
 ++INLINE OVERLOADABLE uint16 as_uint16(long8 v) {
 ++  union _type_cast_64_b u;
 ++  u._long8 = v;
 ++  return u._uint16;
 ++}
 ++
 ++INLINE OVERLOADABLE float16 as_float16(long8 v) {
 ++  union _type_cast_64_b u;
 ++  u._long8 = v;
 ++  return u._float16;
 ++}
 ++
 ++INLINE OVERLOADABLE long8 as_long8(ulong8 v) {
 ++  union _type_cast_64_b u;
 ++  u._ulong8 = v;
 ++  return u._long8;
 ++}
 ++
 ++INLINE OVERLOADABLE int16 as_int16(ulong8 v) {
 ++  union _type_cast_64_b u;
 ++  u._ulong8 = v;
 ++  return u._int16;
 ++}
 ++
 ++INLINE OVERLOADABLE uint16 as_uint16(ulong8 v) {
 ++  union _type_cast_64_b u;
 ++  u._ulong8 = v;
 ++  return u._uint16;
 ++}
 ++
 ++INLINE OVERLOADABLE float16 as_float16(ulong8 v) {
 ++  union _type_cast_64_b u;
 ++  u._ulong8 = v;
 ++  return u._float16;
 ++}
 ++
 ++INLINE OVERLOADABLE long8 as_long8(int16 v) {
 ++  union _type_cast_64_b u;
 ++  u._int16 = v;
 ++  return u._long8;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong8 as_ulong8(int16 v) {
 ++  union _type_cast_64_b u;
 ++  u._int16 = v;
 ++  return u._ulong8;
 ++}
 ++
 + INLINE OVERLOADABLE uint16 as_uint16(int16 v) {
 +   union _type_cast_64_b u;
 +   u._int16 = v;
- @@ -1189,6 +1766,18 @@
++@@ -1188,6 +1765,18 @@ INLINE OVERLOADABLE float16 as_float16(int16 v) {
 +   return u._float16;
 + }
 + 
 ++INLINE OVERLOADABLE long8 as_long8(uint16 v) {
 ++  union _type_cast_64_b u;
 ++  u._uint16 = v;
 ++  return u._long8;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong8 as_ulong8(uint16 v) {
 ++  union _type_cast_64_b u;
 ++  u._uint16 = v;
 ++  return u._ulong8;
 ++}
 ++
 + INLINE OVERLOADABLE int16 as_int16(uint16 v) {
 +   union _type_cast_64_b u;
 +   u._uint16 = v;
- @@ -1201,6 +1790,18 @@
++@@ -1200,6 +1789,18 @@ INLINE OVERLOADABLE float16 as_float16(uint16 v) {
 +   return u._float16;
 + }
 + 
 ++INLINE OVERLOADABLE long8 as_long8(float16 v) {
 ++  union _type_cast_64_b u;
 ++  u._float16 = v;
 ++  return u._long8;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong8 as_ulong8(float16 v) {
 ++  union _type_cast_64_b u;
 ++  u._float16 = v;
 ++  return u._ulong8;
 ++}
 ++
 + INLINE OVERLOADABLE int16 as_int16(float16 v) {
 +   union _type_cast_64_b u;
 +   u._float16 = v;
- @@ -1213,6 +1814,95 @@
++@@ -1212,6 +1813,95 @@ INLINE OVERLOADABLE uint16 as_uint16(float16 v) {
 +   return u._uint16;
 + }
 + 
 ++union _type_cast_128_b {
 ++  long16 _long16;
 ++  ulong16 _ulong16;
 ++};
 ++
 ++INLINE OVERLOADABLE ulong16 as_ulong16(long16 v) {
 ++  union _type_cast_128_b u;
 ++  u._long16 = v;
 ++  return u._ulong16;
 ++}
 ++
 ++INLINE OVERLOADABLE long16 as_long16(ulong16 v) {
 ++  union _type_cast_128_b u;
 ++  u._ulong16 = v;
 ++  return u._long16;
 ++}
 ++
 ++INLINE OVERLOADABLE ulong2 convert_ulong2(long2 v) {
 ++  return (ulong2)((ulong)(v.s0), (ulong)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE int2 convert_int2(long2 v) {
 ++  return (int2)((int)(v.s0), (int)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE uint2 convert_uint2(long2 v) {
 ++  return (uint2)((uint)(v.s0), (uint)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE short2 convert_short2(long2 v) {
 ++  return (short2)((short)(v.s0), (short)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort2 convert_ushort2(long2 v) {
 ++  return (ushort2)((ushort)(v.s0), (ushort)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE char2 convert_char2(long2 v) {
 ++  return (char2)((char)(v.s0), (char)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar2 convert_uchar2(long2 v) {
 ++  return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE float2 convert_float2(long2 v) {
 ++  return (float2)((float)(v.s0), (float)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE long2 convert_long2(ulong2 v) {
 ++  return (long2)((long)(v.s0), (long)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE int2 convert_int2(ulong2 v) {
 ++  return (int2)((int)(v.s0), (int)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE uint2 convert_uint2(ulong2 v) {
 ++  return (uint2)((uint)(v.s0), (uint)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE short2 convert_short2(ulong2 v) {
 ++  return (short2)((short)(v.s0), (short)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort2 convert_ushort2(ulong2 v) {
 ++  return (ushort2)((ushort)(v.s0), (ushort)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE char2 convert_char2(ulong2 v) {
 ++  return (char2)((char)(v.s0), (char)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar2 convert_uchar2(ulong2 v) {
 ++  return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE float2 convert_float2(ulong2 v) {
 ++  return (float2)((float)(v.s0), (float)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE long2 convert_long2(int2 v) {
 ++  return (long2)((long)(v.s0), (long)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong2 convert_ulong2(int2 v) {
 ++  return (ulong2)((ulong)(v.s0), (ulong)(v.s1));
 ++}
 ++
 + INLINE OVERLOADABLE uint2 convert_uint2(int2 v) {
 +   return (uint2)((uint)(v.s0), (uint)(v.s1));
 + }
- @@ -1237,6 +1927,14 @@
++@@ -1236,6 +1926,14 @@ INLINE OVERLOADABLE float2 convert_float2(int2 v) {
 +   return (float2)((float)(v.s0), (float)(v.s1));
 + }
 + 
 ++INLINE OVERLOADABLE long2 convert_long2(uint2 v) {
 ++  return (long2)((long)(v.s0), (long)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong2 convert_ulong2(uint2 v) {
 ++  return (ulong2)((ulong)(v.s0), (ulong)(v.s1));
 ++}
 ++
 + INLINE OVERLOADABLE int2 convert_int2(uint2 v) {
 +   return (int2)((int)(v.s0), (int)(v.s1));
 + }
- @@ -1261,6 +1959,14 @@
++@@ -1260,6 +1958,14 @@ INLINE OVERLOADABLE float2 convert_float2(uint2 v) {
 +   return (float2)((float)(v.s0), (float)(v.s1));
 + }
 + 
 ++INLINE OVERLOADABLE long2 convert_long2(short2 v) {
 ++  return (long2)((long)(v.s0), (long)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong2 convert_ulong2(short2 v) {
 ++  return (ulong2)((ulong)(v.s0), (ulong)(v.s1));
 ++}
 ++
 + INLINE OVERLOADABLE int2 convert_int2(short2 v) {
 +   return (int2)((int)(v.s0), (int)(v.s1));
 + }
- @@ -1285,6 +1991,14 @@
++@@ -1284,6 +1990,14 @@ INLINE OVERLOADABLE float2 convert_float2(short2 v) {
 +   return (float2)((float)(v.s0), (float)(v.s1));
 + }
 + 
 ++INLINE OVERLOADABLE long2 convert_long2(ushort2 v) {
 ++  return (long2)((long)(v.s0), (long)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong2 convert_ulong2(ushort2 v) {
 ++  return (ulong2)((ulong)(v.s0), (ulong)(v.s1));
 ++}
 ++
 + INLINE OVERLOADABLE int2 convert_int2(ushort2 v) {
 +   return (int2)((int)(v.s0), (int)(v.s1));
 + }
- @@ -1309,6 +2023,14 @@
++@@ -1308,6 +2022,14 @@ INLINE OVERLOADABLE float2 convert_float2(ushort2 v) {
 +   return (float2)((float)(v.s0), (float)(v.s1));
 + }
 + 
 ++INLINE OVERLOADABLE long2 convert_long2(char2 v) {
 ++  return (long2)((long)(v.s0), (long)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong2 convert_ulong2(char2 v) {
 ++  return (ulong2)((ulong)(v.s0), (ulong)(v.s1));
 ++}
 ++
 + INLINE OVERLOADABLE int2 convert_int2(char2 v) {
 +   return (int2)((int)(v.s0), (int)(v.s1));
 + }
- @@ -1333,6 +2055,14 @@
++@@ -1332,6 +2054,14 @@ INLINE OVERLOADABLE float2 convert_float2(char2 v) {
 +   return (float2)((float)(v.s0), (float)(v.s1));
 + }
 + 
 ++INLINE OVERLOADABLE long2 convert_long2(uchar2 v) {
 ++  return (long2)((long)(v.s0), (long)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong2 convert_ulong2(uchar2 v) {
 ++  return (ulong2)((ulong)(v.s0), (ulong)(v.s1));
 ++}
 ++
 + INLINE OVERLOADABLE int2 convert_int2(uchar2 v) {
 +   return (int2)((int)(v.s0), (int)(v.s1));
 + }
- @@ -1357,6 +2087,14 @@
++@@ -1356,6 +2086,14 @@ INLINE OVERLOADABLE float2 convert_float2(uchar2 v) {
 +   return (float2)((float)(v.s0), (float)(v.s1));
 + }
 + 
 ++INLINE OVERLOADABLE long2 convert_long2(float2 v) {
 ++  return (long2)((long)(v.s0), (long)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong2 convert_ulong2(float2 v) {
 ++  return (ulong2)((ulong)(v.s0), (ulong)(v.s1));
 ++}
 ++
 + INLINE OVERLOADABLE int2 convert_int2(float2 v) {
 +   return (int2)((int)(v.s0), (int)(v.s1));
 + }
- @@ -1365,20 +2103,92 @@
++@@ -1364,20 +2102,92 @@ INLINE OVERLOADABLE uint2 convert_uint2(float2 v) {
 +   return (uint2)((uint)(v.s0), (uint)(v.s1));
 + }
 + 
 +-INLINE OVERLOADABLE short2 convert_short2(float2 v) {
 +-  return (short2)((short)(v.s0), (short)(v.s1));
 ++INLINE OVERLOADABLE short2 convert_short2(float2 v) {
 ++  return (short2)((short)(v.s0), (short)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort2 convert_ushort2(float2 v) {
 ++  return (ushort2)((ushort)(v.s0), (ushort)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE char2 convert_char2(float2 v) {
 ++  return (char2)((char)(v.s0), (char)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar2 convert_uchar2(float2 v) {
 ++  return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong3 convert_ulong3(long3 v) {
 ++  return (ulong3)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE int3 convert_int3(long3 v) {
 ++  return (int3)((int)(v.s0), (int)(v.s1), (int)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE uint3 convert_uint3(long3 v) {
 ++  return (uint3)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE short3 convert_short3(long3 v) {
 ++  return (short3)((short)(v.s0), (short)(v.s1), (short)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort3 convert_ushort3(long3 v) {
 ++  return (ushort3)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE char3 convert_char3(long3 v) {
 ++  return (char3)((char)(v.s0), (char)(v.s1), (char)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar3 convert_uchar3(long3 v) {
 ++  return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE float3 convert_float3(long3 v) {
 ++  return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE long3 convert_long3(ulong3 v) {
 ++  return (long3)((long)(v.s0), (long)(v.s1), (long)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE int3 convert_int3(ulong3 v) {
 ++  return (int3)((int)(v.s0), (int)(v.s1), (int)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE uint3 convert_uint3(ulong3 v) {
 ++  return (uint3)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE short3 convert_short3(ulong3 v) {
 ++  return (short3)((short)(v.s0), (short)(v.s1), (short)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort3 convert_ushort3(ulong3 v) {
 ++  return (ushort3)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE char3 convert_char3(ulong3 v) {
 ++  return (char3)((char)(v.s0), (char)(v.s1), (char)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar3 convert_uchar3(ulong3 v) {
 ++  return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
 + }
 + 
 +-INLINE OVERLOADABLE ushort2 convert_ushort2(float2 v) {
 +-  return (ushort2)((ushort)(v.s0), (ushort)(v.s1));
 ++INLINE OVERLOADABLE float3 convert_float3(ulong3 v) {
 ++  return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 + }
 + 
 +-INLINE OVERLOADABLE char2 convert_char2(float2 v) {
 +-  return (char2)((char)(v.s0), (char)(v.s1));
 ++INLINE OVERLOADABLE long3 convert_long3(int3 v) {
 ++  return (long3)((long)(v.s0), (long)(v.s1), (long)(v.s2));
 + }
 + 
 +-INLINE OVERLOADABLE uchar2 convert_uchar2(float2 v) {
 +-  return (uchar2)((uchar)(v.s0), (uchar)(v.s1));
 ++INLINE OVERLOADABLE ulong3 convert_ulong3(int3 v) {
 ++  return (ulong3)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2));
 + }
 + 
 + INLINE OVERLOADABLE uint3 convert_uint3(int3 v) {
- @@ -1405,6 +2215,14 @@
++@@ -1404,6 +2214,14 @@ INLINE OVERLOADABLE float3 convert_float3(int3 v) {
 +   return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 + }
 + 
 ++INLINE OVERLOADABLE long3 convert_long3(uint3 v) {
 ++  return (long3)((long)(v.s0), (long)(v.s1), (long)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong3 convert_ulong3(uint3 v) {
 ++  return (ulong3)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2));
 ++}
 ++
 + INLINE OVERLOADABLE int3 convert_int3(uint3 v) {
 +   return (int3)((int)(v.s0), (int)(v.s1), (int)(v.s2));
 + }
- @@ -1429,6 +2247,14 @@
++@@ -1428,6 +2246,14 @@ INLINE OVERLOADABLE float3 convert_float3(uint3 v) {
 +   return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 + }
 + 
 ++INLINE OVERLOADABLE long3 convert_long3(short3 v) {
 ++  return (long3)((long)(v.s0), (long)(v.s1), (long)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong3 convert_ulong3(short3 v) {
 ++  return (ulong3)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2));
 ++}
 ++
 + INLINE OVERLOADABLE int3 convert_int3(short3 v) {
 +   return (int3)((int)(v.s0), (int)(v.s1), (int)(v.s2));
 + }
- @@ -1453,6 +2279,14 @@
++@@ -1452,6 +2278,14 @@ INLINE OVERLOADABLE float3 convert_float3(short3 v) {
 +   return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 + }
 + 
 ++INLINE OVERLOADABLE long3 convert_long3(ushort3 v) {
 ++  return (long3)((long)(v.s0), (long)(v.s1), (long)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong3 convert_ulong3(ushort3 v) {
 ++  return (ulong3)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2));
 ++}
 ++
 + INLINE OVERLOADABLE int3 convert_int3(ushort3 v) {
 +   return (int3)((int)(v.s0), (int)(v.s1), (int)(v.s2));
 + }
- @@ -1477,6 +2311,14 @@
++@@ -1476,6 +2310,14 @@ INLINE OVERLOADABLE float3 convert_float3(ushort3 v) {
 +   return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 + }
 + 
 ++INLINE OVERLOADABLE long3 convert_long3(char3 v) {
 ++  return (long3)((long)(v.s0), (long)(v.s1), (long)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong3 convert_ulong3(char3 v) {
 ++  return (ulong3)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2));
 ++}
 ++
 + INLINE OVERLOADABLE int3 convert_int3(char3 v) {
 +   return (int3)((int)(v.s0), (int)(v.s1), (int)(v.s2));
 + }
- @@ -1501,6 +2343,14 @@
++@@ -1500,6 +2342,14 @@ INLINE OVERLOADABLE float3 convert_float3(char3 v) {
 +   return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 + }
 + 
 ++INLINE OVERLOADABLE long3 convert_long3(uchar3 v) {
 ++  return (long3)((long)(v.s0), (long)(v.s1), (long)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong3 convert_ulong3(uchar3 v) {
 ++  return (ulong3)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2));
 ++}
 ++
 + INLINE OVERLOADABLE int3 convert_int3(uchar3 v) {
 +   return (int3)((int)(v.s0), (int)(v.s1), (int)(v.s2));
 + }
- @@ -1525,6 +2375,14 @@
++@@ -1524,6 +2374,14 @@ INLINE OVERLOADABLE float3 convert_float3(uchar3 v) {
 +   return (float3)((float)(v.s0), (float)(v.s1), (float)(v.s2));
 + }
 + 
 ++INLINE OVERLOADABLE long3 convert_long3(float3 v) {
 ++  return (long3)((long)(v.s0), (long)(v.s1), (long)(v.s2));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong3 convert_ulong3(float3 v) {
 ++  return (ulong3)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2));
 ++}
 ++
 + INLINE OVERLOADABLE int3 convert_int3(float3 v) {
 +   return (int3)((int)(v.s0), (int)(v.s1), (int)(v.s2));
 + }
- @@ -1549,6 +2407,78 @@
++@@ -1548,6 +2406,78 @@ INLINE OVERLOADABLE uchar3 convert_uchar3(float3 v) {
 +   return (uchar3)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2));
 + }
 + 
 ++INLINE OVERLOADABLE ulong4 convert_ulong4(long4 v) {
 ++  return (ulong4)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE int4 convert_int4(long4 v) {
 ++  return (int4)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE uint4 convert_uint4(long4 v) {
 ++  return (uint4)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE short4 convert_short4(long4 v) {
 ++  return (short4)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort4 convert_ushort4(long4 v) {
 ++  return (ushort4)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE char4 convert_char4(long4 v) {
 ++  return (char4)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar4 convert_uchar4(long4 v) {
 ++  return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE float4 convert_float4(long4 v) {
 ++  return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE long4 convert_long4(ulong4 v) {
 ++  return (long4)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE int4 convert_int4(ulong4 v) {
 ++  return (int4)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE uint4 convert_uint4(ulong4 v) {
 ++  return (uint4)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE short4 convert_short4(ulong4 v) {
 ++  return (short4)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort4 convert_ushort4(ulong4 v) {
 ++  return (ushort4)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE char4 convert_char4(ulong4 v) {
 ++  return (char4)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar4 convert_uchar4(ulong4 v) {
 ++  return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE float4 convert_float4(ulong4 v) {
 ++  return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE long4 convert_long4(int4 v) {
 ++  return (long4)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong4 convert_ulong4(int4 v) {
 ++  return (ulong4)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3));
 ++}
 ++
 + INLINE OVERLOADABLE uint4 convert_uint4(int4 v) {
 +   return (uint4)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3));
 + }
- @@ -1573,6 +2503,14 @@
++@@ -1572,6 +2502,14 @@ INLINE OVERLOADABLE float4 convert_float4(int4 v) {
 +   return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 + }
 + 
 ++INLINE OVERLOADABLE long4 convert_long4(uint4 v) {
 ++  return (long4)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong4 convert_ulong4(uint4 v) {
 ++  return (ulong4)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3));
 ++}
 ++
 + INLINE OVERLOADABLE int4 convert_int4(uint4 v) {
 +   return (int4)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3));
 + }
- @@ -1597,6 +2535,14 @@
++@@ -1596,6 +2534,14 @@ INLINE OVERLOADABLE float4 convert_float4(uint4 v) {
 +   return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 + }
 + 
 ++INLINE OVERLOADABLE long4 convert_long4(short4 v) {
 ++  return (long4)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong4 convert_ulong4(short4 v) {
 ++  return (ulong4)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3));
 ++}
 ++
 + INLINE OVERLOADABLE int4 convert_int4(short4 v) {
 +   return (int4)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3));
 + }
- @@ -1621,6 +2567,14 @@
++@@ -1620,6 +2566,14 @@ INLINE OVERLOADABLE float4 convert_float4(short4 v) {
 +   return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 + }
 + 
 ++INLINE OVERLOADABLE long4 convert_long4(ushort4 v) {
 ++  return (long4)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong4 convert_ulong4(ushort4 v) {
 ++  return (ulong4)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3));
 ++}
 ++
 + INLINE OVERLOADABLE int4 convert_int4(ushort4 v) {
 +   return (int4)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3));
 + }
- @@ -1645,6 +2599,14 @@
++@@ -1644,6 +2598,14 @@ INLINE OVERLOADABLE float4 convert_float4(ushort4 v) {
 +   return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 + }
 + 
 ++INLINE OVERLOADABLE long4 convert_long4(char4 v) {
 ++  return (long4)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong4 convert_ulong4(char4 v) {
 ++  return (ulong4)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3));
 ++}
 ++
 + INLINE OVERLOADABLE int4 convert_int4(char4 v) {
 +   return (int4)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3));
 + }
- @@ -1669,6 +2631,14 @@
++@@ -1668,6 +2630,14 @@ INLINE OVERLOADABLE float4 convert_float4(char4 v) {
 +   return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 + }
 + 
 ++INLINE OVERLOADABLE long4 convert_long4(uchar4 v) {
 ++  return (long4)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong4 convert_ulong4(uchar4 v) {
 ++  return (ulong4)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3));
 ++}
 ++
 + INLINE OVERLOADABLE int4 convert_int4(uchar4 v) {
 +   return (int4)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3));
 + }
- @@ -1693,6 +2663,14 @@
++@@ -1692,6 +2662,14 @@ INLINE OVERLOADABLE float4 convert_float4(uchar4 v) {
 +   return (float4)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3));
 + }
 + 
 ++INLINE OVERLOADABLE long4 convert_long4(float4 v) {
 ++  return (long4)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong4 convert_ulong4(float4 v) {
 ++  return (ulong4)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3));
 ++}
 ++
 + INLINE OVERLOADABLE int4 convert_int4(float4 v) {
 +   return (int4)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3));
 + }
- @@ -1717,6 +2695,78 @@
++@@ -1716,6 +2694,78 @@ INLINE OVERLOADABLE uchar4 convert_uchar4(float4 v) {
 +   return (uchar4)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3));
 + }
 + 
 ++INLINE OVERLOADABLE ulong8 convert_ulong8(long8 v) {
 ++  return (ulong8)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE int8 convert_int8(long8 v) {
 ++  return (int8)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE uint8 convert_uint8(long8 v) {
 ++  return (uint8)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE short8 convert_short8(long8 v) {
 ++  return (short8)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort8 convert_ushort8(long8 v) {
 ++  return (ushort8)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE char8 convert_char8(long8 v) {
 ++  return (char8)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar8 convert_uchar8(long8 v) {
 ++  return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE float8 convert_float8(long8 v) {
 ++  return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE long8 convert_long8(ulong8 v) {
 ++  return (long8)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE int8 convert_int8(ulong8 v) {
 ++  return (int8)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE uint8 convert_uint8(ulong8 v) {
 ++  return (uint8)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE short8 convert_short8(ulong8 v) {
 ++  return (short8)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort8 convert_ushort8(ulong8 v) {
 ++  return (ushort8)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE char8 convert_char8(ulong8 v) {
 ++  return (char8)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar8 convert_uchar8(ulong8 v) {
 ++  return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE float8 convert_float8(ulong8 v) {
 ++  return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE long8 convert_long8(int8 v) {
 ++  return (long8)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong8 convert_ulong8(int8 v) {
 ++  return (ulong8)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7));
 ++}
 ++
 + INLINE OVERLOADABLE uint8 convert_uint8(int8 v) {
 +   return (uint8)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7));
 + }
- @@ -1741,6 +2791,14 @@
++@@ -1740,6 +2790,14 @@ INLINE OVERLOADABLE float8 convert_float8(int8 v) {
 +   return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 + }
 + 
 ++INLINE OVERLOADABLE long8 convert_long8(uint8 v) {
 ++  return (long8)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong8 convert_ulong8(uint8 v) {
 ++  return (ulong8)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7));
 ++}
 ++
 + INLINE OVERLOADABLE int8 convert_int8(uint8 v) {
 +   return (int8)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7));
 + }
- @@ -1765,6 +2823,14 @@
++@@ -1764,6 +2822,14 @@ INLINE OVERLOADABLE float8 convert_float8(uint8 v) {
 +   return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 + }
 + 
 ++INLINE OVERLOADABLE long8 convert_long8(short8 v) {
 ++  return (long8)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong8 convert_ulong8(short8 v) {
 ++  return (ulong8)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7));
 ++}
 ++
 + INLINE OVERLOADABLE int8 convert_int8(short8 v) {
 +   return (int8)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7));
 + }
- @@ -1789,6 +2855,14 @@
++@@ -1788,6 +2854,14 @@ INLINE OVERLOADABLE float8 convert_float8(short8 v) {
 +   return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 + }
 + 
 ++INLINE OVERLOADABLE long8 convert_long8(ushort8 v) {
 ++  return (long8)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong8 convert_ulong8(ushort8 v) {
 ++  return (ulong8)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7));
 ++}
 ++
 + INLINE OVERLOADABLE int8 convert_int8(ushort8 v) {
 +   return (int8)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7));
 + }
- @@ -1813,6 +2887,14 @@
++@@ -1812,6 +2886,14 @@ INLINE OVERLOADABLE float8 convert_float8(ushort8 v) {
 +   return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 + }
 + 
 ++INLINE OVERLOADABLE long8 convert_long8(char8 v) {
 ++  return (long8)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong8 convert_ulong8(char8 v) {
 ++  return (ulong8)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7));
 ++}
 ++
 + INLINE OVERLOADABLE int8 convert_int8(char8 v) {
 +   return (int8)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7));
 + }
- @@ -1837,6 +2919,14 @@
++@@ -1836,6 +2918,14 @@ INLINE OVERLOADABLE float8 convert_float8(char8 v) {
 +   return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 + }
 + 
 ++INLINE OVERLOADABLE long8 convert_long8(uchar8 v) {
 ++  return (long8)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong8 convert_ulong8(uchar8 v) {
 ++  return (ulong8)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7));
 ++}
 ++
 + INLINE OVERLOADABLE int8 convert_int8(uchar8 v) {
 +   return (int8)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7));
 + }
- @@ -1861,6 +2951,14 @@
++@@ -1860,6 +2950,14 @@ INLINE OVERLOADABLE float8 convert_float8(uchar8 v) {
 +   return (float8)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7));
 + }
 + 
 ++INLINE OVERLOADABLE long8 convert_long8(float8 v) {
 ++  return (long8)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong8 convert_ulong8(float8 v) {
 ++  return (ulong8)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7));
 ++}
 ++
 + INLINE OVERLOADABLE int8 convert_int8(float8 v) {
 +   return (int8)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7));
 + }
- @@ -1885,6 +2983,78 @@
++@@ -1884,6 +2982,78 @@ INLINE OVERLOADABLE uchar8 convert_uchar8(float8 v) {
 +   return (uchar8)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7));
 + }
 + 
 ++INLINE OVERLOADABLE ulong16 convert_ulong16(long16 v) {
 ++  return (ulong16)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7), (ulong)(v.s8), (ulong)(v.s9), (ulong)(v.sA), (ulong)(v.sB), (ulong)(v.sC), (ulong)(v.sD), (ulong)(v.sE), (ulong)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE int16 convert_int16(long16 v) {
 ++  return (int16)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7), (int)(v.s8), (int)(v.s9), (int)(v.sA), (int)(v.sB), (int)(v.sC), (int)(v.sD), (int)(v.sE), (int)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE uint16 convert_uint16(long16 v) {
 ++  return (uint16)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7), (uint)(v.s8), (uint)(v.s9), (uint)(v.sA), (uint)(v.sB), (uint)(v.sC), (uint)(v.sD), (uint)(v.sE), (uint)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE short16 convert_short16(long16 v) {
 ++  return (short16)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7), (short)(v.s8), (short)(v.s9), (short)(v.sA), (short)(v.sB), (short)(v.sC), (short)(v.sD), (short)(v.sE), (short)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort16 convert_ushort16(long16 v) {
 ++  return (ushort16)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7), (ushort)(v.s8), (ushort)(v.s9), (ushort)(v.sA), (ushort)(v.sB), (ushort)(v.sC), (ushort)(v.sD), (ushort)(v.sE), (ushort)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE char16 convert_char16(long16 v) {
 ++  return (char16)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7), (char)(v.s8), (char)(v.s9), (char)(v.sA), (char)(v.sB), (char)(v.sC), (char)(v.sD), (char)(v.sE), (char)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar16 convert_uchar16(long16 v) {
 ++  return (uchar16)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7), (uchar)(v.s8), (uchar)(v.s9), (uchar)(v.sA), (uchar)(v.sB), (uchar)(v.sC), (uchar)(v.sD), (uchar)(v.sE), (uchar)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE float16 convert_float16(long16 v) {
 ++  return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE long16 convert_long16(ulong16 v) {
 ++  return (long16)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7), (long)(v.s8), (long)(v.s9), (long)(v.sA), (long)(v.sB), (long)(v.sC), (long)(v.sD), (long)(v.sE), (long)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE int16 convert_int16(ulong16 v) {
 ++  return (int16)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7), (int)(v.s8), (int)(v.s9), (int)(v.sA), (int)(v.sB), (int)(v.sC), (int)(v.sD), (int)(v.sE), (int)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE uint16 convert_uint16(ulong16 v) {
 ++  return (uint16)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7), (uint)(v.s8), (uint)(v.s9), (uint)(v.sA), (uint)(v.sB), (uint)(v.sC), (uint)(v.sD), (uint)(v.sE), (uint)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE short16 convert_short16(ulong16 v) {
 ++  return (short16)((short)(v.s0), (short)(v.s1), (short)(v.s2), (short)(v.s3), (short)(v.s4), (short)(v.s5), (short)(v.s6), (short)(v.s7), (short)(v.s8), (short)(v.s9), (short)(v.sA), (short)(v.sB), (short)(v.sC), (short)(v.sD), (short)(v.sE), (short)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE ushort16 convert_ushort16(ulong16 v) {
 ++  return (ushort16)((ushort)(v.s0), (ushort)(v.s1), (ushort)(v.s2), (ushort)(v.s3), (ushort)(v.s4), (ushort)(v.s5), (ushort)(v.s6), (ushort)(v.s7), (ushort)(v.s8), (ushort)(v.s9), (ushort)(v.sA), (ushort)(v.sB), (ushort)(v.sC), (ushort)(v.sD), (ushort)(v.sE), (ushort)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE char16 convert_char16(ulong16 v) {
 ++  return (char16)((char)(v.s0), (char)(v.s1), (char)(v.s2), (char)(v.s3), (char)(v.s4), (char)(v.s5), (char)(v.s6), (char)(v.s7), (char)(v.s8), (char)(v.s9), (char)(v.sA), (char)(v.sB), (char)(v.sC), (char)(v.sD), (char)(v.sE), (char)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE uchar16 convert_uchar16(ulong16 v) {
 ++  return (uchar16)((uchar)(v.s0), (uchar)(v.s1), (uchar)(v.s2), (uchar)(v.s3), (uchar)(v.s4), (uchar)(v.s5), (uchar)(v.s6), (uchar)(v.s7), (uchar)(v.s8), (uchar)(v.s9), (uchar)(v.sA), (uchar)(v.sB), (uchar)(v.sC), (uchar)(v.sD), (uchar)(v.sE), (uchar)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE float16 convert_float16(ulong16 v) {
 ++  return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE long16 convert_long16(int16 v) {
 ++  return (long16)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7), (long)(v.s8), (long)(v.s9), (long)(v.sA), (long)(v.sB), (long)(v.sC), (long)(v.sD), (long)(v.sE), (long)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong16 convert_ulong16(int16 v) {
 ++  return (ulong16)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7), (ulong)(v.s8), (ulong)(v.s9), (ulong)(v.sA), (ulong)(v.sB), (ulong)(v.sC), (ulong)(v.sD), (ulong)(v.sE), (ulong)(v.sF));
 ++}
 ++
 + INLINE OVERLOADABLE uint16 convert_uint16(int16 v) {
 +   return (uint16)((uint)(v.s0), (uint)(v.s1), (uint)(v.s2), (uint)(v.s3), (uint)(v.s4), (uint)(v.s5), (uint)(v.s6), (uint)(v.s7), (uint)(v.s8), (uint)(v.s9), (uint)(v.sA), (uint)(v.sB), (uint)(v.sC), (uint)(v.sD), (uint)(v.sE), (uint)(v.sF));
 + }
- @@ -1909,6 +3079,14 @@
++@@ -1908,6 +3078,14 @@ INLINE OVERLOADABLE float16 convert_float16(int16 v) {
 +   return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 + }
 + 
 ++INLINE OVERLOADABLE long16 convert_long16(uint16 v) {
 ++  return (long16)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7), (long)(v.s8), (long)(v.s9), (long)(v.sA), (long)(v.sB), (long)(v.sC), (long)(v.sD), (long)(v.sE), (long)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong16 convert_ulong16(uint16 v) {
 ++  return (ulong16)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7), (ulong)(v.s8), (ulong)(v.s9), (ulong)(v.sA), (ulong)(v.sB), (ulong)(v.sC), (ulong)(v.sD), (ulong)(v.sE), (ulong)(v.sF));
 ++}
 ++
 + INLINE OVERLOADABLE int16 convert_int16(uint16 v) {
 +   return (int16)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7), (int)(v.s8), (int)(v.s9), (int)(v.sA), (int)(v.sB), (int)(v.sC), (int)(v.sD), (int)(v.sE), (int)(v.sF));
 + }
- @@ -1933,6 +3111,14 @@
++@@ -1932,6 +3110,14 @@ INLINE OVERLOADABLE float16 convert_float16(uint16 v) {
 +   return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 + }
 + 
 ++INLINE OVERLOADABLE long16 convert_long16(short16 v) {
 ++  return (long16)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7), (long)(v.s8), (long)(v.s9), (long)(v.sA), (long)(v.sB), (long)(v.sC), (long)(v.sD), (long)(v.sE), (long)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong16 convert_ulong16(short16 v) {
 ++  return (ulong16)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7), (ulong)(v.s8), (ulong)(v.s9), (ulong)(v.sA), (ulong)(v.sB), (ulong)(v.sC), (ulong)(v.sD), (ulong)(v.sE), (ulong)(v.sF));
 ++}
 ++
 + INLINE OVERLOADABLE int16 convert_int16(short16 v) {
 +   return (int16)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7), (int)(v.s8), (int)(v.s9), (int)(v.sA), (int)(v.sB), (int)(v.sC), (int)(v.sD), (int)(v.sE), (int)(v.sF));
 + }
- @@ -1957,6 +3143,14 @@
++@@ -1956,6 +3142,14 @@ INLINE OVERLOADABLE float16 convert_float16(short16 v) {
 +   return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 + }
 + 
 ++INLINE OVERLOADABLE long16 convert_long16(ushort16 v) {
 ++  return (long16)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7), (long)(v.s8), (long)(v.s9), (long)(v.sA), (long)(v.sB), (long)(v.sC), (long)(v.sD), (long)(v.sE), (long)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong16 convert_ulong16(ushort16 v) {
 ++  return (ulong16)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7), (ulong)(v.s8), (ulong)(v.s9), (ulong)(v.sA), (ulong)(v.sB), (ulong)(v.sC), (ulong)(v.sD), (ulong)(v.sE), (ulong)(v.sF));
 ++}
 ++
 + INLINE OVERLOADABLE int16 convert_int16(ushort16 v) {
 +   return (int16)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7), (int)(v.s8), (int)(v.s9), (int)(v.sA), (int)(v.sB), (int)(v.sC), (int)(v.sD), (int)(v.sE), (int)(v.sF));
 + }
- @@ -1981,6 +3175,14 @@
++@@ -1980,6 +3174,14 @@ INLINE OVERLOADABLE float16 convert_float16(ushort16 v) {
 +   return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 + }
 + 
 ++INLINE OVERLOADABLE long16 convert_long16(char16 v) {
 ++  return (long16)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7), (long)(v.s8), (long)(v.s9), (long)(v.sA), (long)(v.sB), (long)(v.sC), (long)(v.sD), (long)(v.sE), (long)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong16 convert_ulong16(char16 v) {
 ++  return (ulong16)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7), (ulong)(v.s8), (ulong)(v.s9), (ulong)(v.sA), (ulong)(v.sB), (ulong)(v.sC), (ulong)(v.sD), (ulong)(v.sE), (ulong)(v.sF));
 ++}
 ++
 + INLINE OVERLOADABLE int16 convert_int16(char16 v) {
 +   return (int16)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7), (int)(v.s8), (int)(v.s9), (int)(v.sA), (int)(v.sB), (int)(v.sC), (int)(v.sD), (int)(v.sE), (int)(v.sF));
 + }
- @@ -2005,6 +3207,14 @@
++@@ -2004,6 +3206,14 @@ INLINE OVERLOADABLE float16 convert_float16(char16 v) {
 +   return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 + }
 + 
 ++INLINE OVERLOADABLE long16 convert_long16(uchar16 v) {
 ++  return (long16)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7), (long)(v.s8), (long)(v.s9), (long)(v.sA), (long)(v.sB), (long)(v.sC), (long)(v.sD), (long)(v.sE), (long)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong16 convert_ulong16(uchar16 v) {
 ++  return (ulong16)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7), (ulong)(v.s8), (ulong)(v.s9), (ulong)(v.sA), (ulong)(v.sB), (ulong)(v.sC), (ulong)(v.sD), (ulong)(v.sE), (ulong)(v.sF));
 ++}
 ++
 + INLINE OVERLOADABLE int16 convert_int16(uchar16 v) {
 +   return (int16)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7), (int)(v.s8), (int)(v.s9), (int)(v.sA), (int)(v.sB), (int)(v.sC), (int)(v.sD), (int)(v.sE), (int)(v.sF));
 + }
- @@ -2029,6 +3239,14 @@
++@@ -2028,6 +3238,14 @@ INLINE OVERLOADABLE float16 convert_float16(uchar16 v) {
 +   return (float16)((float)(v.s0), (float)(v.s1), (float)(v.s2), (float)(v.s3), (float)(v.s4), (float)(v.s5), (float)(v.s6), (float)(v.s7), (float)(v.s8), (float)(v.s9), (float)(v.sA), (float)(v.sB), (float)(v.sC), (float)(v.sD), (float)(v.sE), (float)(v.sF));
 + }
 + 
 ++INLINE OVERLOADABLE long16 convert_long16(float16 v) {
 ++  return (long16)((long)(v.s0), (long)(v.s1), (long)(v.s2), (long)(v.s3), (long)(v.s4), (long)(v.s5), (long)(v.s6), (long)(v.s7), (long)(v.s8), (long)(v.s9), (long)(v.sA), (long)(v.sB), (long)(v.sC), (long)(v.sD), (long)(v.sE), (long)(v.sF));
 ++}
 ++
 ++INLINE OVERLOADABLE ulong16 convert_ulong16(float16 v) {
 ++  return (ulong16)((ulong)(v.s0), (ulong)(v.s1), (ulong)(v.s2), (ulong)(v.s3), (ulong)(v.s4), (ulong)(v.s5), (ulong)(v.s6), (ulong)(v.s7), (ulong)(v.s8), (ulong)(v.s9), (ulong)(v.sA), (ulong)(v.sB), (ulong)(v.sC), (ulong)(v.sD), (ulong)(v.sE), (ulong)(v.sF));
 ++}
 ++
 + INLINE OVERLOADABLE int16 convert_int16(float16 v) {
 +   return (int16)((int)(v.s0), (int)(v.s1), (int)(v.s2), (int)(v.s3), (int)(v.s4), (int)(v.s5), (int)(v.s6), (int)(v.s7), (int)(v.s8), (int)(v.s9), (int)(v.sA), (int)(v.sB), (int)(v.sC), (int)(v.sD), (int)(v.sE), (int)(v.sF));
 + }
++-- 
++1.7.10.4
++
diff --cc debian/patches/0004-Add-vector-argument-test-case.patch
index 0000000,0000000..4a1fbbe
new file mode 100644
--- /dev/null
+++ b/debian/patches/0004-Add-vector-argument-test-case.patch
@@@ -1,0 -1,0 +1,74 @@@
++From 123085e021ecb265228500c9deea407139762ba8 Mon Sep 17 00:00:00 2001
++From: Yang Rong <rong.r.yang at intel.com>
++Date: Thu, 16 May 2013 12:36:35 +0800
++Subject: [PATCH 4/7] Add vector argument test case.
++To: beignet at lists.freedesktop.org
++
++Signed-off-by: Yang Rong <rong.r.yang at intel.com>
++---
++ kernels/compiler_function_argument2.cl |    6 ++++++
++ utests/CMakeLists.txt                  |    1 +
++ utests/compiler_function_argument2.cpp |   26 ++++++++++++++++++++++++++
++ 3 files changed, 33 insertions(+)
++ create mode 100644 kernels/compiler_function_argument2.cl
++ create mode 100644 utests/compiler_function_argument2.cpp
++
++diff --git a/kernels/compiler_function_argument2.cl b/kernels/compiler_function_argument2.cl
++new file mode 100644
++index 0000000..0985dbd
++--- /dev/null
+++++ b/kernels/compiler_function_argument2.cl
++@@ -0,0 +1,6 @@
+++__kernel void
+++compiler_function_argument2(__global int *dst, int4 value)
+++{
+++  int id = (int)get_global_id(0);
+++  dst[id] = value.w;
+++}
++diff --git a/utests/CMakeLists.txt b/utests/CMakeLists.txt
++index 2ba01c4..717383b 100644
++--- a/utests/CMakeLists.txt
+++++ b/utests/CMakeLists.txt
++@@ -32,6 +32,7 @@ set (utests_sources
++   compiler_fill_image_3d_2.cpp
++   compiler_function_argument0.cpp
++   compiler_function_argument1.cpp
+++  compiler_function_argument2.cpp
++   compiler_function_argument.cpp
++   compiler_function_constant0.cpp
++   compiler_function_constant1.cpp
++diff --git a/utests/compiler_function_argument2.cpp b/utests/compiler_function_argument2.cpp
++new file mode 100644
++index 0000000..1e398a9
++--- /dev/null
+++++ b/utests/compiler_function_argument2.cpp
++@@ -0,0 +1,26 @@
+++#include "utest_helper.hpp"
+++
+++struct int4 {int x,y,z,w;};
+++void compiler_function_argument2(void)
+++{
+++  const size_t n = 2048;
+++  const int4 value = {31, 32, 33, 34};
+++
+++  // Setup kernel and buffers
+++  OCL_CREATE_KERNEL("compiler_function_argument2");
+++  OCL_CREATE_BUFFER(buf[0], 0, n * sizeof(uint32_t), NULL);
+++  OCL_SET_ARG(0, sizeof(cl_mem), &buf[0]);
+++  OCL_SET_ARG(1, sizeof(int4), &value);
+++
+++  // Run the kernel
+++  globals[0] = n;
+++  locals[0] = 16;
+++  OCL_NDRANGE(1);
+++  OCL_MAP_BUFFER(0);
+++
+++  // Check results
+++  for (uint32_t i = 0; i < n; ++i)
+++    OCL_ASSERT(((int*)buf_data[0])[i] == value.w);
+++}
+++
+++MAKE_UTEST_FROM_FUNCTION(compiler_function_argument2);
++-- 
++1.7.10.4
++
diff --cc debian/patches/0005-Add-more-get-image-info-functions.patch
index 0000000,0000000..4682e51
new file mode 100644
--- /dev/null
+++ b/debian/patches/0005-Add-more-get-image-info-functions.patch
@@@ -1,0 -1,0 +1,203 @@@
++From 503bee58b3080f4b863e61be22065c2fd2923827 Mon Sep 17 00:00:00 2001
++From: Zhigang Gong <zhigang.gong at linux.intel.com>
++Date: Mon, 20 May 2013 17:00:37 +0800
++Subject: [PATCH 5/7] Add more get image info functions.
++To: beignet at lists.freedesktop.org
++
++Add get image depth/channel data type/channel order/dim support.
++Now, only those functions for the unsupported image type have not
++been implemented. The unsupported image types are as below:
++image1d_t,image1d_buffer_t,image1d_array_t,image2d_array_t.
++
++Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
++---
++ backend/src/ir/image.cpp                   |   14 ++++++++---
++ backend/src/ir/instruction.hpp             |   10 ++++++--
++ backend/src/llvm/llvm_gen_backend.cpp      |    6 +++++
++ backend/src/llvm/llvm_gen_ocl_function.hxx |    3 +++
++ backend/src/ocl_stdlib.h                   |   37 ++++++++++++++++++----------
++ src/cl_command_queue.c                     |    6 +++++
++ 6 files changed, 57 insertions(+), 19 deletions(-)
++
++diff --git a/backend/src/ir/image.cpp b/backend/src/ir/image.cpp
++index 9398e22..486fde1 100644
++--- a/backend/src/ir/image.cpp
+++++ b/backend/src/ir/image.cpp
++@@ -31,8 +31,11 @@ namespace ir {
++   static uint32_t getInfoOffset4Type(struct ImageInfo *imageInfo, int type)
++   {
++     switch (type) {
++-      case GetImageInfoInstruction::WIDTH: return imageInfo->wSlot;
++-      case GetImageInfoInstruction::HEIGHT: return imageInfo->hSlot;
+++      case GetImageInfoInstruction::WIDTH:              return imageInfo->wSlot;
+++      case GetImageInfoInstruction::HEIGHT:             return imageInfo->hSlot;
+++      case GetImageInfoInstruction::DEPTH:              return imageInfo->depthSlot;
+++      case GetImageInfoInstruction::CHANNEL_DATA_TYPE:  return imageInfo->dataTypeSlot;
+++      case GetImageInfoInstruction::CHANNEL_ORDER:      return imageInfo->channelOrderSlot;
++       default:
++         NOT_IMPLEMENTED;
++     }
++@@ -42,8 +45,11 @@ namespace ir {
++   static uint32_t setInfoOffset4Type(struct ImageInfo *imageInfo, int type, uint32_t offset)
++   {
++     switch (type) {
++-      case GetImageInfoInstruction::WIDTH: imageInfo->wSlot = offset; break;
++-      case GetImageInfoInstruction::HEIGHT: imageInfo->hSlot = offset; break;
+++      case GetImageInfoInstruction::WIDTH:              imageInfo->wSlot = offset; break;
+++      case GetImageInfoInstruction::HEIGHT:             imageInfo->hSlot = offset; break;
+++      case GetImageInfoInstruction::DEPTH:              imageInfo->depthSlot = offset; break;
+++      case GetImageInfoInstruction::CHANNEL_DATA_TYPE:  imageInfo->dataTypeSlot = offset; break;
+++      case GetImageInfoInstruction::CHANNEL_ORDER:      imageInfo->channelOrderSlot = offset; break;
++       default:
++         NOT_IMPLEMENTED;
++     }
++diff --git a/backend/src/ir/instruction.hpp b/backend/src/ir/instruction.hpp
++index c948d2c..7662b6a 100644
++--- a/backend/src/ir/instruction.hpp
+++++ b/backend/src/ir/instruction.hpp
++@@ -335,12 +335,18 @@ namespace ir {
++     enum {
++      WIDTH = 0,
++      HEIGHT = 1,
+++     DEPTH = 2,
+++     CHANNEL_DATA_TYPE = 3,
+++     CHANNEL_ORDER = 4,
++     };
++ 
++     static INLINE uint32_t getDstNum4Type(int infoType) {
++       switch (infoType) {
++-        case GetImageInfoInstruction::WIDTH:
++-        case GetImageInfoInstruction::HEIGHT:
+++        case WIDTH:
+++        case HEIGHT:
+++        case DEPTH:
+++        case CHANNEL_DATA_TYPE:
+++        case CHANNEL_ORDER:
++           return 1;
++         break;
++         default:
++diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
++index deda687..a0946ef 100644
++--- a/backend/src/llvm/llvm_gen_backend.cpp
+++++ b/backend/src/llvm/llvm_gen_backend.cpp
++@@ -1662,6 +1662,9 @@ namespace gbe
++       case GEN_OCL_RNDD:
++       case GEN_OCL_GET_IMAGE_WIDTH:
++       case GEN_OCL_GET_IMAGE_HEIGHT:
+++      case GEN_OCL_GET_IMAGE_CHANNEL_DATA_TYPE:
+++      case GEN_OCL_GET_IMAGE_CHANNEL_ORDER:
+++      case GEN_OCL_GET_IMAGE_DEPTH:
++         // No structure can be returned
++         this->newRegister(&I);
++         break;
++@@ -1827,6 +1830,9 @@ namespace gbe
++           case GEN_OCL_LGBARRIER: ctx.SYNC(ir::syncLocalBarrier | ir::syncGlobalBarrier); break;
++           case GEN_OCL_GET_IMAGE_WIDTH:
++           case GEN_OCL_GET_IMAGE_HEIGHT:
+++          case GEN_OCL_GET_IMAGE_DEPTH:
+++          case GEN_OCL_GET_IMAGE_CHANNEL_DATA_TYPE:
+++          case GEN_OCL_GET_IMAGE_CHANNEL_ORDER:
++           {
++             GBE_ASSERT(AI != AE); const ir::Register surface_id = this->getRegister(*AI); ++AI;
++             uint32_t elemNum;
++diff --git a/backend/src/llvm/llvm_gen_ocl_function.hxx b/backend/src/llvm/llvm_gen_ocl_function.hxx
++index 2fb33c0..0524744 100644
++--- a/backend/src/llvm/llvm_gen_ocl_function.hxx
+++++ b/backend/src/llvm/llvm_gen_ocl_function.hxx
++@@ -73,6 +73,9 @@ DECL_LLVM_GEN_FUNCTION(WRITE_IMAGE15, _Z22__gen_ocl_write_imagefjfffDv4_f)
++ // To get image info function
++ DECL_LLVM_GEN_FUNCTION(GET_IMAGE_WIDTH, __gen_ocl_get_image_width)
++ DECL_LLVM_GEN_FUNCTION(GET_IMAGE_HEIGHT, __gen_ocl_get_image_height)
+++DECL_LLVM_GEN_FUNCTION(GET_IMAGE_DEPTH,  __gen_ocl_get_image_depth)
+++DECL_LLVM_GEN_FUNCTION(GET_IMAGE_CHANNEL_DATA_TYPE,  __gen_ocl_get_image_channel_data_type)
+++DECL_LLVM_GEN_FUNCTION(GET_IMAGE_CHANNEL_ORDER,  __gen_ocl_get_image_channel_order)
++ 
++ // saturation related functions.
++ DECL_LLVM_GEN_FUNCTION(SADD_SAT_CHAR, _Z12ocl_sadd_satcc)
++diff --git a/backend/src/ocl_stdlib.h b/backend/src/ocl_stdlib.h
++index 0d09aff..78a8da3 100644
++--- a/backend/src/ocl_stdlib.h
+++++ b/backend/src/ocl_stdlib.h
++@@ -4257,7 +4257,9 @@ OVERLOADABLE void __gen_ocl_write_imagef(uint surface_id, int u, int v, int w, f
++ OVERLOADABLE void __gen_ocl_write_imagef(uint surface_id, float u, float v, float w, float4 color);
++ int __gen_ocl_get_image_width(uint surface_id);
++ int __gen_ocl_get_image_height(uint surface_id);
++-//OVERLOADABLE int __gen_ocl_get_image_depth(image3d_t image);
+++int __gen_ocl_get_image_channel_data_type(uint surface_id);
+++int __gen_ocl_get_image_channel_order(uint surface_id);
+++int __gen_ocl_get_image_depth(uint surface_id);
++ 
++ #define GET_IMAGE(cl_image, surface_id) \
++     uint surface_id = (uint)cl_image
++@@ -4309,17 +4311,32 @@ DECL_IMAGE(float4, f)
++   { \
++     GET_IMAGE(image, surface_id);\
++     return __gen_ocl_get_image_height(surface_id); \
++-  }
++-#if 0
+++  } \
++   INLINE_OVERLOADABLE  int get_image_channel_data_type(image_type image)\
++-  { NOT_IMPLEMENTED; }\
+++  { \
+++    GET_IMAGE(image, surface_id);\
+++    return __gen_ocl_get_image_channel_data_type(surface_id); \
+++  }\
++   INLINE_OVERLOADABLE  int get_image_channel_order(image_type image)\
++-  { NOT_IMPLEMENTED; }
++-#endif
++-
+++  { \
+++    GET_IMAGE(image, surface_id);\
+++    return __gen_ocl_get_image_channel_order(surface_id); \
+++  }
++ 
++ DECL_IMAGE_INFO(image2d_t)
++ DECL_IMAGE_INFO(image3d_t)
+++
+++INLINE_OVERLOADABLE  int get_image_depth(image3d_t image)
+++  {
+++   GET_IMAGE(image, surface_id);
+++   return __gen_ocl_get_image_depth(surface_id);
+++  }
+++
+++INLINE_OVERLOADABLE  int2 get_image_dim(image2d_t image)
+++  { return (int2){get_image_width(image), get_image_height(image)}; }
+++
+++INLINE_OVERLOADABLE  int4 get_image_dim(image3d_t image)
+++  { return (int4){get_image_width(image), get_image_height(image), get_image_depth(image), 0}; }
++ #if 0
++ /* The following functions are not implemented yet. */
++ DECL_IMAGE_INFO(image1d_t)
++@@ -4327,12 +4344,6 @@ DECL_IMAGE_INFO(image1d_buffer_t)
++ DECL_IMAGE_INFO(image1d_array_t)
++ DECL_IMAGE_INFO(image2d_array_t)
++ 
++-INLINE_OVERLOADABLE  int get_image_depth(image3d_t image)
++-  { return __gen_ocl_get_image_depth(image); }
++-
++-INLINE_OVERLOADABLE  int2 get_image_dim(image2d_t image)
++-  { return __gen_ocl_get_image_dim(image); }
++-
++ INLINE_OVERLOADABLE  int2 get_image_dim(image2d_array_t image)
++   { return __gen_ocl_get_image_dim(image); }
++ 
++diff --git a/src/cl_command_queue.c b/src/cl_command_queue.c
++index 6ce9016..1a37c78 100644
++--- a/src/cl_command_queue.c
+++++ b/src/cl_command_queue.c
++@@ -105,6 +105,12 @@ set_image_info(char *curbe, struct ImageInfo * image_info, cl_mem image)
++     *(uint32_t*)(curbe + image_info->wSlot) = image->w;
++   if (image_info->hSlot >= 0)
++     *(uint32_t*)(curbe + image_info->hSlot) = image->h;
+++  if (image_info->depthSlot >= 0)
+++    *(uint32_t*)(curbe + image_info->depthSlot) = image->depth;
+++  if (image_info->channelOrderSlot >= 0)
+++    *(uint32_t*)(curbe + image_info->channelOrderSlot) = image->fmt.image_channel_order;
+++  if (image_info->dataTypeSlot >= 0)
+++    *(uint32_t*)(curbe + image_info->dataTypeSlot) = image->fmt.image_channel_data_type;
++ }
++ 
++ LOCAL cl_int
++-- 
++1.7.10.4
++
diff --cc debian/patches/0006-utests-extent-get_image_size-cases-to-other-informat.patch
index 0000000,0000000..fe06e44
new file mode 100644
--- /dev/null
+++ b/debian/patches/0006-utests-extent-get_image_size-cases-to-other-informat.patch
@@@ -1,0 -1,0 +1,180 @@@
++From 94021c43047de2593393777c39189b45cb8043ad Mon Sep 17 00:00:00 2001
++From: Zhigang Gong <zhigang.gong at linux.intel.com>
++Date: Tue, 21 May 2013 16:14:52 +0800
++Subject: [PATCH 6/7] utests: extent get_image_size cases to other
++ informations..
++To: beignet at lists.freedesktop.org
++
++Please ignore the previous patch, I sent the wrong patch. Please try this one.
++Sorry for that.
++
++From 6107ba1fee7091dee4ead72fbd780f94803be42f Mon Sep 17 00:00:00 2001
++From: Zhigang Gong <zhigang.gong at linux.intel.com>
++Date: Mon, 20 May 2013 16:41:28 +0800
++Subject: [PATCH v2 2/2] utests: extent get_image_size cases to other
++ informations..
++
++Extent it to test all the supported image informations.
++
++Signed-off-by: Zhigang Gong <zhigang.gong at linux.intel.com>
++---
++ kernels/test_get_image_info.cl     |   13 ++++++++++
++ kernels/test_get_image_size.cl     |    9 -------
++ utests/CMakeLists.txt              |    2 +-
++ utests/compiler_get_image_info.cpp |   50 ++++++++++++++++++++++++++++++++++++
++ utests/compiler_get_image_size.cpp |   37 --------------------------
++ 5 files changed, 64 insertions(+), 47 deletions(-)
++ create mode 100644 kernels/test_get_image_info.cl
++ delete mode 100644 kernels/test_get_image_size.cl
++ create mode 100644 utests/compiler_get_image_info.cpp
++ delete mode 100644 utests/compiler_get_image_size.cpp
++
++diff --git a/kernels/test_get_image_info.cl b/kernels/test_get_image_info.cl
++new file mode 100644
++index 0000000..8f69b75
++--- /dev/null
+++++ b/kernels/test_get_image_info.cl
++@@ -0,0 +1,13 @@
+++__kernel void
+++test_get_image_info(__write_only image3d_t src, __global int *size, __global int *fmt)
+++{
+++  int id = (int)get_global_id(0);
+++  int w, h, depth;
+++  w = get_image_width(src);
+++  h = get_image_height(src);
+++  depth = get_image_depth(src);
+++  int channel_data_type = get_image_channel_data_type(src);
+++  int channel_order = get_image_channel_order(src);
+++  size[id] = (w << 20 | h << 8  | depth);
+++  fmt[id] = (channel_data_type << 16 | channel_order);
+++}
++diff --git a/kernels/test_get_image_size.cl b/kernels/test_get_image_size.cl
++deleted file mode 100644
++index aeb7d66..0000000
++--- a/kernels/test_get_image_size.cl
+++++ /dev/null
++@@ -1,9 +0,0 @@
++-__kernel void
++-test_get_image_size(__write_only image2d_t src, __global int *info)
++-{
++-  int id = (int)get_global_id(0);
++-  int w, h;
++-  w = get_image_width(src);
++-  h = get_image_height(src);
++-  info[id] = (w << 16 | h);
++-}
++diff --git a/utests/CMakeLists.txt b/utests/CMakeLists.txt
++index 717383b..8498d73 100644
++--- a/utests/CMakeLists.txt
+++++ b/utests/CMakeLists.txt
++@@ -76,7 +76,7 @@ set (utests_sources
++   compiler_movforphi_undef.cpp
++   compiler_volatile.cpp
++   compiler_copy_image1.cpp
++-  compiler_get_image_size.cpp
+++  compiler_get_image_info.cpp
++   runtime_createcontext.cpp
++   utest_assert.cpp
++   utest.cpp
++diff --git a/utests/compiler_get_image_info.cpp b/utests/compiler_get_image_info.cpp
++new file mode 100644
++index 0000000..3b9d132
++--- /dev/null
+++++ b/utests/compiler_get_image_info.cpp
++@@ -0,0 +1,50 @@
+++#include "utest_helper.hpp"
+++
+++static void compiler_get_image_info(void)
+++{
+++  const size_t w = 256;
+++  const size_t h = 512;
+++  const size_t depth = 3;
+++  cl_image_format format;
+++  cl_image_desc desc;
+++
+++  format.image_channel_order = CL_RGBA;
+++  format.image_channel_data_type = CL_UNSIGNED_INT8;
+++  desc.image_type = CL_MEM_OBJECT_IMAGE3D;
+++  desc.image_width = w;
+++  desc.image_height = h;
+++  desc.image_depth = depth;
+++  desc.image_row_pitch = 0;
+++  desc.image_slice_pitch = 0;
+++  desc.num_mip_levels = 0;
+++  desc.num_samples = 0;
+++  desc.buffer = NULL;
+++
+++  // Setup kernel and images
+++  OCL_CREATE_KERNEL("test_get_image_info");
+++
+++  OCL_CREATE_IMAGE(buf[0], 0, &format, &desc, NULL);
+++  OCL_CREATE_BUFFER(buf[1], 0, 32 * sizeof(int), NULL);
+++  OCL_CREATE_BUFFER(buf[2], 0, 32 * sizeof(int), NULL);
+++
+++  // Run the kernel
+++  OCL_SET_ARG(0, sizeof(cl_mem), &buf[0]);
+++  OCL_SET_ARG(1, sizeof(cl_mem), &buf[1]);
+++  OCL_SET_ARG(2, sizeof(cl_mem), &buf[2]);
+++  globals[0] = 32;
+++  locals[0] = 16;
+++  OCL_NDRANGE(1);
+++
+++  // Check result
+++  OCL_MAP_BUFFER(1);
+++  OCL_MAP_BUFFER(2);
+++  for (uint32_t i = 0; i < 32; i++)
+++  {
+++    OCL_ASSERT(((uint32_t*)buf_data[1])[i] == ((w << 20) | (h << 8) | depth));
+++    OCL_ASSERT(((uint32_t*)buf_data[2])[i] == ((CL_UNSIGNED_INT8 << 16) | CL_RGBA));
+++  }
+++  OCL_UNMAP_BUFFER(1);
+++  OCL_UNMAP_BUFFER(2);
+++}
+++
+++MAKE_UTEST_FROM_FUNCTION(compiler_get_image_info);
++diff --git a/utests/compiler_get_image_size.cpp b/utests/compiler_get_image_size.cpp
++deleted file mode 100644
++index 49c08ad..0000000
++--- a/utests/compiler_get_image_size.cpp
+++++ /dev/null
++@@ -1,37 +0,0 @@
++-#include "utest_helper.hpp"
++-
++-static void compiler_get_image_size(void)
++-{
++-  const size_t w = 256;
++-  const size_t h = 512;
++-  cl_image_format format;
++-  cl_image_desc desc;
++-
++-  format.image_channel_order = CL_RGBA;
++-  format.image_channel_data_type = CL_UNSIGNED_INT8;
++-  desc.image_type = CL_MEM_OBJECT_IMAGE2D;
++-  desc.image_width = w;
++-  desc.image_height = h;
++-  desc.image_row_pitch = 0;
++-
++-  // Setup kernel and images
++-  OCL_CREATE_KERNEL("test_get_image_size");
++-
++-  OCL_CREATE_IMAGE(buf[0], 0, &format, &desc, NULL);
++-  OCL_CREATE_BUFFER(buf[1], 0, 32 * sizeof(int), NULL);
++-
++-  // Run the kernel
++-  OCL_SET_ARG(0, sizeof(cl_mem), &buf[0]);
++-  OCL_SET_ARG(1, sizeof(cl_mem), &buf[1]);
++-  globals[0] = 32;
++-  locals[0] = 16;
++-  OCL_NDRANGE(1);
++-
++-  // Check result
++-  OCL_MAP_BUFFER(1);
++-  for (uint32_t i = 0; i < 32; i++)
++-    OCL_ASSERT(((uint32_t*)buf_data[1])[i] == ((w << 16) | (h)));
++-  OCL_UNMAP_BUFFER(0);
++-}
++-
++-MAKE_UTEST_FROM_FUNCTION(compiler_get_image_size);
++-- 
++1.7.10.4
++
diff --cc debian/patches/0007-Change-clang-system-call-to-libclang-api-call.patch
index 0000000,0000000..bdb289f
new file mode 100644
--- /dev/null
+++ b/debian/patches/0007-Change-clang-system-call-to-libclang-api-call.patch
@@@ -1,0 -1,0 +1,261 @@@
++From 2d98eff3e09fe2b63812401949af8aea81308c8c Mon Sep 17 00:00:00 2001
++From: Yang Rong <rong.r.yang at intel.com>
++Date: Tue, 21 May 2013 12:45:56 +0800
++Subject: [PATCH 7/7] Change clang system call to libclang api call.
++To: beignet at lists.freedesktop.org
++
++The original call clang command directly as frontend. The implement is not very flexible.
++I change to call libclang apis, now support both clang 3.1 and clang 3.2.
++Now still write the intermediate to the file, for code simply.
++Also fix llvm 3.1 build errors for my vector scalarize commit.
++
++Signed-off-by: Yang Rong <rong.r.yang at intel.com>
++---
++ CMake/FindLLVM.cmake                  |   27 ++++++++-
++ backend/src/CMakeLists.txt            |    1 +
++ backend/src/backend/program.cpp       |  103 ++++++++++++++++++++++++++-------
++ backend/src/llvm/llvm_gen_backend.cpp |    7 +--
++ backend/src/llvm/llvm_scalarize.cpp   |   10 ++--
++ 5 files changed, 116 insertions(+), 32 deletions(-)
++
++diff --git a/CMake/FindLLVM.cmake b/CMake/FindLLVM.cmake
++index c06b8a4..b320639 100644
++--- a/CMake/FindLLVM.cmake
+++++ b/CMake/FindLLVM.cmake
++@@ -8,7 +8,7 @@
++ # LLVM_FOUND       - True if llvm found.
++ if (LLVM_INSTALL_DIR)
++   find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config-32 llvm-config-3.2 llvm-config DOC "llvm-config executable" PATHS ${LLVM_INSTALL_DIR} NO_DEFAULT_PATH)
++-else (LLVM_INSTALL_DIR)                                                                
+++else (LLVM_INSTALL_DIR)
++   find_program(LLVM_CONFIG_EXECUTABLE NAMES llvm-config-32 llvm-config-3.2 llvm-config DOC "llvm-config executable")
++ endif (LLVM_INSTALL_DIR)
++ 
++@@ -66,3 +66,28 @@ execute_process(
++   OUTPUT_VARIABLE LLVM_MODULE_LIBS
++   OUTPUT_STRIP_TRAILING_WHITESPACE
++ )
+++
+++macro(add_one_lib name)
+++  FIND_LIBRARY(CLANG_LIB
+++    NAMES ${name}
+++    PATHS ${LLVM_LIBRARY_DIR} )
+++  set(CLANG_LIBRARIES ${CLANG_LIBRARIES} ${CLANG_LIB})
+++	unset(CLANG_LIB CACHE)
+++endmacro()
+++
+++#Assume clang lib path same as llvm lib path
+++add_one_lib("clangFrontend")
+++add_one_lib("clangSerialization")
+++add_one_lib("clangDriver")
+++add_one_lib("clangCodeGen")
+++add_one_lib("clangSema")
+++add_one_lib("clangStaticAnalyzerFrontend")
+++add_one_lib("clangStaticAnalyzerCheckers")
+++add_one_lib("clangStaticAnalyzerCore")
+++add_one_lib("clangAnalysis")
+++add_one_lib("clangEdit")
+++add_one_lib("clangAST")
+++add_one_lib("clangParse")
+++add_one_lib("clangSema")
+++add_one_lib("clangLex")
+++add_one_lib("clangBasic")
++diff --git a/backend/src/CMakeLists.txt b/backend/src/CMakeLists.txt
++index 183517a..a0fe198 100644
++--- a/backend/src/CMakeLists.txt
+++++ b/backend/src/CMakeLists.txt
++@@ -116,6 +116,7 @@ target_link_libraries(
++                       ${DRM_INTEL_LIBRARY}
++                       ${DRM_LIBRARY}
++                       ${OPENGL_LIBRARIES}
+++                      ${CLANG_LIBRARIES}
++                       ${LLVM_MODULE_LIBS}
++                       ${CMAKE_THREAD_LIBS_INIT}
++                       ${CMAKE_DL_LIBS})
++diff --git a/backend/src/backend/program.cpp b/backend/src/backend/program.cpp
++index c46c681..6816a13 100644
++--- a/backend/src/backend/program.cpp
+++++ b/backend/src/backend/program.cpp
++@@ -46,6 +46,23 @@
++ #define LLVM_VERSION_MINOR 0
++ #endif /* !defined(LLVM_VERSION_MINOR) */
++ 
+++#include <clang/CodeGen/CodeGenAction.h>
+++#include <clang/Frontend/CompilerInstance.h>
+++#include <clang/Frontend/CompilerInvocation.h>
+++#if LLVM_VERSION_MINOR <= 1
+++#include <clang/Frontend/DiagnosticOptions.h>
+++#else
+++#include <clang/Basic/DiagnosticOptions.h>
+++#endif  /* LLVM_VERSION_MINOR <= 1 */
+++#include <clang/Frontend/TextDiagnosticPrinter.h>
+++#include <clang/Basic/TargetInfo.h>
+++#include <clang/Basic/TargetOptions.h>
+++#include <llvm/ADT/IntrusiveRefCntPtr.h>
+++#include <llvm/ADT/OwningPtr.h>
+++#include <llvm/Module.h>
+++#include <llvm/Bitcode/ReaderWriter.h>
+++#include <llvm/Support/raw_ostream.h>
+++
++ namespace gbe {
++ 
++   Kernel::Kernel(const std::string &name) :
++@@ -104,6 +121,71 @@ namespace gbe {
++     GBE_SAFE_DELETE(program);
++   }
++ 
+++  static void buildModuleFromSource(const char* input, const char* output) {
+++    // Arguments to pass to the clang frontend
+++    vector<const char *> args;
+++    args.push_back("-emit-llvm");
+++    args.push_back("-O3");
+++    args.push_back("-triple");
+++    args.push_back("nvptx");
+++    args.push_back(input);
+++
+++    // The compiler invocation needs a DiagnosticsEngine so it can report problems
+++#if LLVM_VERSION_MINOR <= 1
+++    args.push_back("-triple");
+++    args.push_back("ptx32");
+++
+++    clang::TextDiagnosticPrinter *DiagClient =
+++                             new clang::TextDiagnosticPrinter(llvm::errs(), clang::DiagnosticOptions());
+++    llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> DiagID(new clang::DiagnosticIDs());
+++    clang::DiagnosticsEngine Diags(DiagID, DiagClient);
+++#else
+++    args.push_back("-ffp-contract=off");
+++    args.push_back("-triple");
+++    args.push_back("nvptx");
+++
+++    llvm::IntrusiveRefCntPtr<clang::DiagnosticOptions> DiagOpts = new clang::DiagnosticOptions();
+++    clang::TextDiagnosticPrinter *DiagClient =
+++                             new clang::TextDiagnosticPrinter(llvm::errs(), &*DiagOpts);
+++    llvm::IntrusiveRefCntPtr<clang::DiagnosticIDs> DiagID(new clang::DiagnosticIDs());
+++    clang::DiagnosticsEngine Diags(DiagID, &*DiagOpts, DiagClient);
+++#endif /* LLVM_VERSION_MINOR <= 1 */
+++
+++    // Create the compiler invocation
+++    llvm::OwningPtr<clang::CompilerInvocation> CI(new clang::CompilerInvocation);
+++    clang::CompilerInvocation::CreateFromArgs(*CI,
+++                                              &args[0],
+++                                              &args[0] + args.size(),
+++                                              Diags);
+++
+++    // Create the compiler instance
+++    clang::CompilerInstance Clang;
+++    Clang.setInvocation(CI.take());
+++    // Get ready to report problems
+++    Clang.createDiagnostics(args.size(), &args[0]);
+++    if (!Clang.hasDiagnostics())
+++      return;
+++
+++    // Set Language
+++    clang::LangOptions & lang_opts = Clang.getLangOpts();
+++    lang_opts.OpenCL = 1;
+++
+++    // Create an action and make the compiler instance carry it out
+++    llvm::OwningPtr<clang::CodeGenAction> Act(new clang::EmitLLVMOnlyAction());
+++    if (!Clang.ExecuteAction(*Act))
+++      return;
+++
+++    llvm::Module *module = Act->takeModule();
+++
+++    std::string ErrorInfo;
+++    llvm::raw_fd_ostream OS(output, ErrorInfo,llvm::raw_fd_ostream::F_Binary);
+++    //still write to temp file for code simply, otherwise need add another function.
+++    //because gbe_program_new_from_llvm also be used by cl_program_create_from_llvm, can't be removed
+++    //TODO: Pass module to llvmToGen, if use module, should return Act and use OwningPtr out of this funciton
+++    llvm::WriteBitcodeToFile(module, OS);
+++    OS.close();
+++  }
+++
++   extern std::string ocl_stdlib_str;
++   extern std::string ocl_common_defines_str;
++   static gbe_program programNewFromSource(const char *source,
++@@ -124,26 +206,7 @@ namespace gbe {
++     fwrite(source, strlen(source), 1, clFile);
++     fclose(clFile);
++ 
++-    // Now compile the code to llvm using clang
++-#if LLVM_VERSION_MINOR <= 1
++-    std::string compileCmd = "clang -x cl -fno-color-diagnostics -emit-llvm -O3 -ccc-host-triple ptx32 -c ";
++-#else
++-    std::string compileCmd = "clang -ffp-contract=off -emit-llvm -O3 -target nvptx -x cl -c ";
++-#endif /* LLVM_VERSION_MINOR <= 1 */
++-    compileCmd += clName;
++-    compileCmd += " ";
++-    if(options)
++-      compileCmd += options;
++-    compileCmd += " -o ";
++-    compileCmd += llName;
++-
++-    // Open a pipe and compile from here. Using Clang API instead is better
++-    FILE *pipe = popen(compileCmd.c_str(), "r");
++-    FATAL_IF (pipe == NULL, "Unable to run extern compilation command");
++-    char msg[256];
++-    while (fgets(msg, sizeof(msg), pipe))
++-      std::cout << msg;
++-    pclose(pipe);
+++    buildModuleFromSource(clName.c_str(), llName.c_str());
++     remove(clName.c_str());
++ 
++     // Now build the program from llvm
++diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
++index a0946ef..3fe0cbf 100644
++--- a/backend/src/llvm/llvm_gen_backend.cpp
+++++ b/backend/src/llvm/llvm_gen_backend.cpp
++@@ -853,11 +853,8 @@ namespace gbe
++       // Insert a new register for each function argument
++ #if LLVM_VERSION_MINOR <= 1
++       const AttrListPtr &PAL = F.getAttributes();
++-      uint32_t argID = 1; // Start at one actually
++-      for (; I != E; ++I, ++argID) {
++-#else
++-      for (; I != E; ++I, ++argID) {
++ #endif /* LLVM_VERSION_MINOR <= 1 */
+++      for (; I != E; ++I, ++argID) {
++         const std::string &argName = I->getName().str();
++         Type *type = I->getType();
++ 
++@@ -892,7 +889,7 @@ namespace gbe
++           PointerType *pointerType = dyn_cast<PointerType>(type);
++           // By value structure
++ #if LLVM_VERSION_MINOR <= 1
++-          if (PAL.paramHasAttr(argID, Attribute::ByVal)) {
+++          if (PAL.paramHasAttr(argID+1, Attribute::ByVal)) {
++ #else
++           if (I->hasByValAttr()) {
++ #endif /* LLVM_VERSION_MINOR <= 1 */
++diff --git a/backend/src/llvm/llvm_scalarize.cpp b/backend/src/llvm/llvm_scalarize.cpp
++index f71401f..ef431f2 100644
++--- a/backend/src/llvm/llvm_scalarize.cpp
+++++ b/backend/src/llvm/llvm_scalarize.cpp
++@@ -71,7 +71,11 @@
++ #include "llvm/IntrinsicInst.h"
++ #include "llvm/Module.h"
++ #include "llvm/Pass.h"
+++#if LLVM_VERSION_MINOR <= 1
+++#include "llvm/Support/IRBuilder.h"
+++#else
++ #include "llvm/IRBuilder.h"
+++#endif /* LLVM_VERSION_MINOR <= 1 */
++ #include "llvm/Support/CallSite.h"
++ #include "llvm/Support/CFG.h"
++ #include "llvm/Support/raw_ostream.h"
++@@ -730,13 +734,7 @@ namespace gbe {
++ 
++     Function::arg_iterator I = F.arg_begin(), E = F.arg_end();
++ 
++-#if LLVM_VERSION_MINOR <= 1
++-    const AttrListPtr &PAL = F.getAttributes();
++-    uint32_t argID = 1; // Start at one actually
++-    for (; I != E; ++I, ++argID) {
++-#else
++     for (; I != E; ++I) {
++-#endif /* LLVM_VERSION_MINOR <= 1 */
++       Type *type = I->getType();
++ 
++       if(type->isVectorTy())
++-- 
++1.7.10.4
++
diff --cc debian/patches/debug
index ce1a8fc,0000000..d8e8997
mode 100644,000000..100644
--- a/debian/patches/debug
+++ b/debian/patches/debug
@@@ -1,16 -1,0 +1,16 @@@
- Description: More verbose errors
++Description: Enhance debug output
 +Author: Simon Richter <sjr at debian.org>
- Last-Update: 2013-04-01
++Last-Update: 2013-05-21
 +
- Index: beignet-0.1+git20130514+19e9c58/src/cl_utils.h
++Index: beignet-0.1+git20130521+a7ea35c/src/cl_utils.h
 +===================================================================
- --- beignet-0.1+git20130514+19e9c58.orig/src/cl_utils.h	2013-05-14 20:04:49.846033866 +0200
- +++ beignet-0.1+git20130514+19e9c58/src/cl_utils.h	2013-05-14 20:05:00.822033376 +0200
++--- beignet-0.1+git20130521+a7ea35c.orig/src/cl_utils.h	2013-05-21 10:39:13.823946702 +0200
+++++ beignet-0.1+git20130521+a7ea35c/src/cl_utils.h	2013-05-21 10:39:20.751946393 +0200
 +@@ -80,6 +80,7 @@
 + 
 + #define FATAL(...)                                          \
 + do {                                                        \
 ++  fprintf(stderr, "in function %s:\n", __FUNCTION__);       \
 +   fprintf(stderr, "error: ");                               \
 +   fprintf(stderr, __VA_ARGS__);                             \
 +   fprintf(stderr, "\n");                                    \
diff --cc debian/patches/flags
index 1b17e6c,0000000..c90c1d4
mode 100644,000000..100644
--- a/debian/patches/flags
+++ b/debian/patches/flags
@@@ -1,94 -1,0 +1,94 @@@
- Description: Respect CFLAGS/CXXFLAGS from Debian
++Description: Debian compliant compiler flags handling
 +Author: Simon Richter <sjr at debian.org>
- Last-Update: 2013-04-16
++Last-Update: 2013-05-21
 +
- Index: beignet-0.1+git20130514+19e9c58/CMakeLists.txt
++Index: beignet-0.1+git20130521+a7ea35c/CMakeLists.txt
 +===================================================================
- --- beignet-0.1+git20130514+19e9c58.orig/CMakeLists.txt	2013-05-08 11:55:52.000000000 +0200
- +++ beignet-0.1+git20130514+19e9c58/CMakeLists.txt	2013-05-14 20:06:02.014030648 +0200
++--- beignet-0.1+git20130521+a7ea35c.orig/CMakeLists.txt	2013-05-21 10:40:02.635944526 +0200
+++++ beignet-0.1+git20130521+a7ea35c/CMakeLists.txt	2013-05-21 10:40:37.351942978 +0200
 +@@ -18,7 +18,6 @@
 + 
 + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
 + 
 +-SET(CMAKE_VERBOSE_MAKEFILE "false")
 + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/CMake/")
 + SET(EMULATE_IVB false CACHE BOOL "To emulate IVB")
 + SET(EMULATE_SNB false CACHE BOOL "To emulate SNB")
- Index: beignet-0.1+git20130514+19e9c58/backend/CMakeLists.txt
++Index: beignet-0.1+git20130521+a7ea35c/backend/CMakeLists.txt
 +===================================================================
- --- beignet-0.1+git20130514+19e9c58.orig/backend/CMakeLists.txt	2013-05-08 11:55:52.000000000 +0200
- +++ beignet-0.1+git20130514+19e9c58/backend/CMakeLists.txt	2013-05-14 20:06:02.014030648 +0200
++--- beignet-0.1+git20130521+a7ea35c.orig/backend/CMakeLists.txt	2013-05-21 10:40:03.103944505 +0200
+++++ beignet-0.1+git20130521+a7ea35c/backend/CMakeLists.txt	2013-05-21 10:40:37.351942978 +0200
 +@@ -45,39 +45,39 @@
 + if (COMPILER STREQUAL "GCC")
 +   set (CMAKE_C_CXX_FLAGS "${CMAKE_C_CXX_FLAGS} -funroll-loops -Wstrict-aliasing=2 -fstrict-aliasing -msse2 -msse3 -mssse3 -msse4.1 -fPIC -Wall")
 +   set (CMAKE_C_CXX_FLAGS "${CMAKE_C_CXX_FLAGS}  ${LLVM_CFLAGS}")
 +-  set (CMAKE_CXX_FLAGS "${CMAKE_C_CXX_FLAGS}  -Wno-invalid-offsetof -fno-rtti -std=c++0x")
 ++  set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_CXX_FLAGS}  -Wno-invalid-offsetof -fno-rtti -std=c++0x")
 +   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GBE_DEBUG_MEMORY_FLAG}")
 +   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GBE_COMPILE_UTESTS_FLAG}")
 +   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-E")
 +-  set (CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined ${LLVM_LFLAGS}")
 +-  set (CMAKE_CXX_FLAGS_DEBUG          "-g -DGBE_DEBUG=1")
 +-  set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DGBE_DEBUG=1")
 +-  set (CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG -DGBE_DEBUG=0")
 +-  set (CMAKE_CXX_FLAGS_RELEASE        "-O2 -DNDEBUG -DGBE_DEBUG=0")
 +-  set (CMAKE_C_FLAGS "${CMAKE_C_CXX_FLAGS}")
 ++  set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined ${LLVM_LFLAGS}")
 ++  set (CMAKE_CXX_FLAGS_DEBUG          "-DGBE_DEBUG=1")
 ++  set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DGBE_DEBUG=1")
 ++  set (CMAKE_CXX_FLAGS_MINSIZEREL     "-DNDEBUG -DGBE_DEBUG=0")
 ++  set (CMAKE_CXX_FLAGS_RELEASE        "-DNDEBUG -DGBE_DEBUG=0")
 ++  set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_CXX_FLAGS}")
 +   set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GBE_DEBUG_MEMORY_FLAG}")
 +   set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GBE_COMPILE_UTESTS_FLAG}")
 +   set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wl,-E")
 +-  set (CMAKE_C_FLAGS_DEBUG          "-g -DGBE_DEBUG=1")
 +-  set (CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DGBE_DEBUG=1")
 +-  set (CMAKE_C_FLAGS_MINSIZEREL     "-Os -DNDEBUG -DGBE_DEBUG=0")
 +-  set (CMAKE_C_FLAGS_RELEASE        "-O2 -DNDEBUG -DGBE_DEBUG=0")
 ++  set (CMAKE_C_FLAGS_DEBUG          "-DGBE_DEBUG=1")
 ++  set (CMAKE_C_FLAGS_RELWITHDEBINFO "-DGBE_DEBUG=1")
 ++  set (CMAKE_C_FLAGS_MINSIZEREL     "-DNDEBUG -DGBE_DEBUG=0")
 ++  set (CMAKE_C_FLAGS_RELEASE        "-DNDEBUG -DGBE_DEBUG=0")
 + elseif (COMPILER STREQUAL "CLANG")
 +   set (CMAKE_C_COMPILER             "clang")
 +   set (CMAKE_C_FLAGS                "-Wall -std=c99")
 +-  set (CMAKE_C_FLAGS_DEBUG          "-g -DGBE_DEBUG=1")
 +-  set (CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -DGBE_DEBUG=1")
 +-  set (CMAKE_C_FLAGS_MINSIZEREL     "-Os -DNDEBUG -DGBE_DEBUG=0")
 +-  set (CMAKE_C_FLAGS_RELEASE        "-O2 -DNDEBUG -DGBE_DEBUG=0")
 ++  set (CMAKE_C_FLAGS_DEBUG          "-DGBE_DEBUG=1")
 ++  set (CMAKE_C_FLAGS_RELWITHDEBINFO "-DGBE_DEBUG=1")
 ++  set (CMAKE_C_FLAGS_MINSIZEREL     "-DNDEBUG -DGBE_DEBUG=0")
 ++  set (CMAKE_C_FLAGS_RELEASE        "-DNDEBUG -DGBE_DEBUG=0")
 +   set (CMAKE_CXX_COMPILER             "clang++")
 +   set (CMAKE_CXX_FLAGS "-fstrict-aliasing -msse2 -fPIC -Wall -Wno-format-security -Wno-invalid-offsetof -std=c++0x")
 +   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GBE_DEBUG_MEMORY_FLAG}")
 +   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GBE_COMPILE_UTESTS_FLAG}")
 +   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VISIBILITY_FLAG}")
 +-  set (CMAKE_CXX_FLAGS_DEBUG          "-g -DGBE_DEBUG=1")
 +-  set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -DGBE_DEBUG=1")
 +-  set (CMAKE_CXX_FLAGS_MINSIZEREL     "-Os -DNDEBUG -DGBE_DEBUG=0")
 +-  set (CMAKE_CXX_FLAGS_RELEASE        "-O2 -DNDEBUG -DGBE_DEBUG=0")
 ++  set (CMAKE_CXX_FLAGS_DEBUG          "-DGBE_DEBUG=1")
 ++  set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-DGBE_DEBUG=1")
 ++  set (CMAKE_CXX_FLAGS_MINSIZEREL     "-DNDEBUG -DGBE_DEBUG=0")
 ++  set (CMAKE_CXX_FLAGS_RELEASE        "-DNDEBUG -DGBE_DEBUG=0")
 +   set (CMAKE_AR      "/usr/bin/llvm-ar")
 +   set (CMAKE_LINKER  "/usr/bin/llvm-ld")
 +   set (CMAKE_NM      "/usr/bin/llvm-nm")
 +@@ -91,10 +91,10 @@
 +   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GBE_COMPILE_UTESTS_FLAG}")
 +   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${VISIBILITY_FLAG} -Wl,-E")
 +   set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GBE_DEBUG_MODE_FLAG}")
 +-  set (CMAKE_CXX_FLAGS_DEBUG "-g -O0 -DGBE_DEBUG=1")
 +-  set (CCMAKE_CXX_FLAGS_RELWITHDEBINFO "-g -O2 -DGBE_DEBUG=1")
 +-  set (CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -O2 -DGBE_DEBUG=0")
 +-  set (CCMAKE_CXX_FLAGS_MINSIZEREL "-Os -DGBE_DEBUG=0")
 ++  set (CMAKE_CXX_FLAGS_DEBUG "-DGBE_DEBUG=1")
 ++  set (CCMAKE_CXX_FLAGS_RELWITHDEBINFO "-DGBE_DEBUG=1")
 ++  set (CMAKE_CXX_FLAGS_RELEASE "-DNDEBUG -DGBE_DEBUG=0")
 ++  set (CCMAKE_CXX_FLAGS_MINSIZEREL "-DGBE_DEBUG=0")
 +   set (CMAKE_EXE_LINKER_FLAGS "")
 + endif ()
 + 
diff --cc debian/patches/khronos
index 37ae544,0000000..8f4f6ac
mode 100644,000000..100644
--- a/debian/patches/khronos
+++ b/debian/patches/khronos
@@@ -1,3100 -1,0 +1,3100 @@@
 +Description: Use Khronos Group headers
 +Author: Simon Richter <sjr at debian.org>
- Last-Update: 2013-04-01
++Last-Update: 2013-05-21
 +
- Index: beignet-0.1+git20130514+19e9c58/include/CL/cl_ext.h
++Index: beignet-0.1+git20130521+a7ea35c/include/CL/cl_ext.h
 +===================================================================
- --- beignet-0.1+git20130514+19e9c58.orig/include/CL/cl_ext.h	2013-05-14 20:04:50.338033844 +0200
- +++ beignet-0.1+git20130514+19e9c58/include/CL/cl_ext.h	2013-05-14 20:04:53.670033695 +0200
++--- beignet-0.1+git20130521+a7ea35c.orig/include/CL/cl_ext.h	2013-05-21 10:38:37.207948335 +0200
+++++ beignet-0.1+git20130521+a7ea35c/include/CL/cl_ext.h	2013-05-21 10:41:03.323941820 +0200
 +@@ -1,251 +1 @@
 +-/*******************************************************************************
 +- * Copyright (c) 2008 - 2012 The Khronos Group Inc.
 +- *
 +- * Permission is hereby granted, free of charge, to any person obtaining a
 +- * copy of this software and/or associated documentation files (the
 +- * "Materials"), to deal in the Materials without restriction, including
 +- * without limitation the rights to use, copy, modify, merge, publish,
 +- * distribute, sublicense, and/or sell copies of the Materials, and to
 +- * permit persons to whom the Materials are furnished to do so, subject to
 +- * the following conditions:
 +- *
 +- * The above copyright notice and this permission notice shall be included
 +- * in all copies or substantial portions of the Materials.
 +- *
 +- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 +- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 +- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 +- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 +- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
 +- ******************************************************************************/
 +-
 +-/* $Revision: 11928 $ on $Date: 2010-07-13 09:04:56 -0700 (Tue, 13 Jul 2010) $ */
 +-
 +-/* cl_ext.h contains OpenCL extensions which don't have external */
 +-/* (OpenGL, D3D) dependencies.                                   */
 +-
 +-#ifndef __CL_EXT_H
 +-#define __CL_EXT_H
 +-
 +-#ifdef __cplusplus
 +-extern "C" {
 +-#endif
 +-
 +-#ifdef __APPLE__
 +-	#include <OpenCL/cl.h>
 +-    #include <AvailabilityMacros.h>
 +-#else
 +-	#include <CL/cl.h>
 +-#endif
 +-
 +-/* cl_khr_fp16 extension - no extension #define since it has no functions  */
 +-#define CL_DEVICE_HALF_FP_CONFIG                    0x1033
 +-
 +-/* Memory object destruction
 +- *
 +- * Apple extension for use to manage externally allocated buffers used with cl_mem objects with CL_MEM_USE_HOST_PTR
 +- *
 +- * Registers a user callback function that will be called when the memory object is deleted and its resources 
 +- * freed. Each call to clSetMemObjectCallbackFn registers the specified user callback function on a callback 
 +- * stack associated with memobj. The registered user callback functions are called in the reverse order in 
 +- * which they were registered. The user callback functions are called and then the memory object is deleted 
 +- * and its resources freed. This provides a mechanism for the application (and libraries) using memobj to be 
 +- * notified when the memory referenced by host_ptr, specified when the memory object is created and used as 
 +- * the storage bits for the memory object, can be reused or freed.
 +- *
 +- * The application may not call CL api's with the cl_mem object passed to the pfn_notify.
 +- *
 +- * Please check for the "cl_APPLE_SetMemObjectDestructor" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
 +- * before using.
 +- */
 +-#define cl_APPLE_SetMemObjectDestructor 1
 +-cl_int	CL_API_ENTRY clSetMemObjectDestructorAPPLE(  cl_mem /* memobj */, 
 +-                                        void (* /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/), 
 +-                                        void * /*user_data */ )             CL_EXT_SUFFIX__VERSION_1_0;  
 +-
 +-
 +-/* Context Logging Functions
 +- *
 +- * The next three convenience functions are intended to be used as the pfn_notify parameter to clCreateContext().
 +- * Please check for the "cl_APPLE_ContextLoggingFunctions" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
 +- * before using.
 +- *
 +- * clLogMessagesToSystemLog fowards on all log messages to the Apple System Logger 
 +- */
 +-#define cl_APPLE_ContextLoggingFunctions 1
 +-extern void CL_API_ENTRY clLogMessagesToSystemLogAPPLE(  const char * /* errstr */, 
 +-                                            const void * /* private_info */, 
 +-                                            size_t       /* cb */, 
 +-                                            void *       /* user_data */ )  CL_EXT_SUFFIX__VERSION_1_0;
 +-
 +-/* clLogMessagesToStdout sends all log messages to the file descriptor stdout */
 +-extern void CL_API_ENTRY clLogMessagesToStdoutAPPLE(   const char * /* errstr */, 
 +-                                          const void * /* private_info */, 
 +-                                          size_t       /* cb */, 
 +-                                          void *       /* user_data */ )    CL_EXT_SUFFIX__VERSION_1_0;
 +-
 +-/* clLogMessagesToStderr sends all log messages to the file descriptor stderr */
 +-extern void CL_API_ENTRY clLogMessagesToStderrAPPLE(   const char * /* errstr */, 
 +-                                          const void * /* private_info */, 
 +-                                          size_t       /* cb */, 
 +-                                          void *       /* user_data */ )    CL_EXT_SUFFIX__VERSION_1_0;
 +-
 +-
 +-/************************ 
 +-* cl_khr_icd extension *                                                  
 +-************************/
 +-#define cl_khr_icd 1
 +-
 +-/* cl_platform_info                                                        */
 +-#define CL_PLATFORM_ICD_SUFFIX_KHR                  0x0920
 +-
 +-/* Additional Error Codes                                                  */
 +-#define CL_PLATFORM_NOT_FOUND_KHR                   -1001
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clIcdGetPlatformIDsKHR(cl_uint          /* num_entries */,
 +-                       cl_platform_id * /* platforms */,
 +-                       cl_uint *        /* num_platforms */);
 +-
 +-typedef CL_API_ENTRY cl_int (CL_API_CALL *clIcdGetPlatformIDsKHR_fn)(
 +-    cl_uint          /* num_entries */,
 +-    cl_platform_id * /* platforms */,
 +-    cl_uint *        /* num_platforms */);
 +-
 +-
 +-/* Extension: cl_khr_image2D_buffer
 +- *
 +- * This extension allows a 2D image to be created from a cl_mem buffer without a copy.
 +- * The type associated with a 2D image created from a buffer in an OpenCL program is image2d_t.
 +- * Both the sampler and sampler-less read_image built-in functions are supported for 2D images
 +- * and 2D images created from a buffer.  Similarly, the write_image built-ins are also supported
 +- * for 2D images created from a buffer.
 +- *
 +- * When the 2D image from buffer is created, the client must specify the width,
 +- * height, image format (i.e. channel order and channel data type) and optionally the row pitch
 +- *
 +- * The pitch specified must be a multiple of CL_DEVICE_IMAGE_PITCH_ALIGNMENT pixels.
 +- * The base address of the buffer must be aligned to CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT pixels.
 +- */
 +-    
 +-/*************************************
 +- * cl_khr_initalize_memory extension *
 +- *************************************/
 +-    
 +-#define CL_CONTEXT_MEMORY_INITIALIZE_KHR            0x200E
 +-    
 +-    
 +-/**************************************
 +- * cl_khr_terminate_context extension *
 +- **************************************/
 +-    
 +-#define CL_DEVICE_TERMINATE_CAPABILITY_KHR          0x200F
 +-#define CL_CONTEXT_TERMINATE_KHR                    0x2010
 +-
 +-#define cl_khr_terminate_context 1
 +-extern CL_API_ENTRY cl_int CL_API_CALL clTerminateContextKHR(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2;
 +-
 +-typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHR_fn)(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2;
 +-    
 +-    
 +-/*
 +- * Extension: cl_khr_spir
 +- *
 +- * This extension adds support to create an OpenCL program object from a 
 +- * Standard Portable Intermediate Representation (SPIR) instance
 +- */
 +-
 +-/******************************************
 +-* cl_nv_device_attribute_query extension *
 +-******************************************/
 +-/* cl_nv_device_attribute_query extension - no extension #define since it has no functions */
 +-#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV       0x4000
 +-#define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV       0x4001
 +-#define CL_DEVICE_REGISTERS_PER_BLOCK_NV            0x4002
 +-#define CL_DEVICE_WARP_SIZE_NV                      0x4003
 +-#define CL_DEVICE_GPU_OVERLAP_NV                    0x4004
 +-#define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV            0x4005
 +-#define CL_DEVICE_INTEGRATED_MEMORY_NV              0x4006
 +-
 +-
 +-/*********************************
 +-* cl_amd_device_attribute_query *
 +-*********************************/
 +-#define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD        0x4036
 +-
 +-#ifdef CL_VERSION_1_1
 +-   /***********************************
 +-    * cl_ext_device_fission extension *
 +-    ***********************************/
 +-    #define cl_ext_device_fission   1
 +-    
 +-    extern CL_API_ENTRY cl_int CL_API_CALL
 +-    clReleaseDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; 
 +-    
 +-    typedef CL_API_ENTRY cl_int 
 +-    (CL_API_CALL *clReleaseDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
 +-
 +-    extern CL_API_ENTRY cl_int CL_API_CALL
 +-    clRetainDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1; 
 +-    
 +-    typedef CL_API_ENTRY cl_int 
 +-    (CL_API_CALL *clRetainDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
 +-
 +-    typedef cl_ulong  cl_device_partition_property_ext;
 +-    extern CL_API_ENTRY cl_int CL_API_CALL
 +-    clCreateSubDevicesEXT(  cl_device_id /*in_device*/,
 +-                            const cl_device_partition_property_ext * /* properties */,
 +-                            cl_uint /*num_entries*/,
 +-                            cl_device_id * /*out_devices*/,
 +-                            cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;
 +-
 +-    typedef CL_API_ENTRY cl_int 
 +-    ( CL_API_CALL * clCreateSubDevicesEXT_fn)(  cl_device_id /*in_device*/,
 +-                                                const cl_device_partition_property_ext * /* properties */,
 +-                                                cl_uint /*num_entries*/,
 +-                                                cl_device_id * /*out_devices*/,
 +-                                                cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;
 +-
 +-    /* cl_device_partition_property_ext */
 +-    #define CL_DEVICE_PARTITION_EQUALLY_EXT             0x4050
 +-    #define CL_DEVICE_PARTITION_BY_COUNTS_EXT           0x4051
 +-    #define CL_DEVICE_PARTITION_BY_NAMES_EXT            0x4052
 +-    #define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT  0x4053
 +-    
 +-    /* clDeviceGetInfo selectors */
 +-    #define CL_DEVICE_PARENT_DEVICE_EXT                 0x4054
 +-    #define CL_DEVICE_PARTITION_TYPES_EXT               0x4055
 +-    #define CL_DEVICE_AFFINITY_DOMAINS_EXT              0x4056
 +-    #define CL_DEVICE_REFERENCE_COUNT_EXT               0x4057
 +-    #define CL_DEVICE_PARTITION_STYLE_EXT               0x4058
 +-    
 +-    /* error codes */
 +-    #define CL_DEVICE_PARTITION_FAILED_EXT              -1057
 +-    #define CL_INVALID_PARTITION_COUNT_EXT              -1058
 +-    #define CL_INVALID_PARTITION_NAME_EXT               -1059
 +-    
 +-    /* CL_AFFINITY_DOMAINs */
 +-    #define CL_AFFINITY_DOMAIN_L1_CACHE_EXT             0x1
 +-    #define CL_AFFINITY_DOMAIN_L2_CACHE_EXT             0x2
 +-    #define CL_AFFINITY_DOMAIN_L3_CACHE_EXT             0x3
 +-    #define CL_AFFINITY_DOMAIN_L4_CACHE_EXT             0x4
 +-    #define CL_AFFINITY_DOMAIN_NUMA_EXT                 0x10
 +-    #define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT     0x100
 +-    
 +-    /* cl_device_partition_property_ext list terminators */
 +-    #define CL_PROPERTIES_LIST_END_EXT                  ((cl_device_partition_property_ext) 0)
 +-    #define CL_PARTITION_BY_COUNTS_LIST_END_EXT         ((cl_device_partition_property_ext) 0)
 +-    #define CL_PARTITION_BY_NAMES_LIST_END_EXT          ((cl_device_partition_property_ext) 0 - 1)
 +-
 +-
 +-
 +-#endif /* CL_VERSION_1_1 */
 +-
 +-#ifdef __cplusplus
 +-}
 +-#endif
 +-
 +-
 +-#endif /* __CL_EXT_H */
 ++#include_next <CL/cl_ext.h>
- Index: beignet-0.1+git20130514+19e9c58/include/CL/opencl.h
++Index: beignet-0.1+git20130521+a7ea35c/include/CL/opencl.h
 +===================================================================
- --- beignet-0.1+git20130514+19e9c58.orig/include/CL/opencl.h	2013-05-14 20:04:50.338033844 +0200
- +++ beignet-0.1+git20130514+19e9c58/include/CL/opencl.h	2013-05-14 20:04:53.674033695 +0200
++--- beignet-0.1+git20130521+a7ea35c.orig/include/CL/opencl.h	2013-05-21 10:38:37.207948335 +0200
+++++ beignet-0.1+git20130521+a7ea35c/include/CL/opencl.h	2013-05-21 10:41:03.323941820 +0200
 +@@ -1,54 +1 @@
 +-/*******************************************************************************
 +- * Copyright (c) 2008-2012 The Khronos Group Inc.
 +- *
 +- * Permission is hereby granted, free of charge, to any person obtaining a
 +- * copy of this software and/or associated documentation files (the
 +- * "Materials"), to deal in the Materials without restriction, including
 +- * without limitation the rights to use, copy, modify, merge, publish,
 +- * distribute, sublicense, and/or sell copies of the Materials, and to
 +- * permit persons to whom the Materials are furnished to do so, subject to
 +- * the following conditions:
 +- *
 +- * The above copyright notice and this permission notice shall be included
 +- * in all copies or substantial portions of the Materials.
 +- *
 +- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 +- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 +- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 +- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 +- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
 +- ******************************************************************************/
 +-
 +-/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
 +-
 +-#ifndef __OPENCL_H
 +-#define __OPENCL_H
 +-
 +-#ifdef __cplusplus
 +-extern "C" {
 +-#endif
 +-
 +-#ifdef __APPLE__
 +-
 +-#include <OpenCL/cl.h>
 +-#include <OpenCL/cl_gl.h>
 +-#include <OpenCL/cl_gl_ext.h>
 +-#include <OpenCL/cl_ext.h>
 +-
 +-#else
 +-
 +-#include <CL/cl.h>
 +-#include <CL/cl_gl.h>
 +-#include <CL/cl_gl_ext.h>
 +-#include <CL/cl_ext.h>
 +-
 +-#endif
 +-
 +-#ifdef __cplusplus
 +-}
 +-#endif
 +-
 +-#endif  /* __OPENCL_H   */
 +-
 ++#include_next <CL/opencl.h>
- Index: beignet-0.1+git20130514+19e9c58/include/CL/cl_d3d10.h
++Index: beignet-0.1+git20130521+a7ea35c/include/CL/cl_d3d10.h
 +===================================================================
- --- beignet-0.1+git20130514+19e9c58.orig/include/CL/cl_d3d10.h	2013-05-14 20:04:50.338033844 +0200
- +++ beignet-0.1+git20130514+19e9c58/include/CL/cl_d3d10.h	2013-05-14 20:04:53.674033695 +0200
++--- beignet-0.1+git20130521+a7ea35c.orig/include/CL/cl_d3d10.h	2013-05-21 10:38:37.207948335 +0200
+++++ beignet-0.1+git20130521+a7ea35c/include/CL/cl_d3d10.h	2013-05-21 10:41:03.323941820 +0200
 +@@ -1,126 +1 @@
 +-/**********************************************************************************
 +- * Copyright (c) 2008-2012 The Khronos Group Inc.
 +- *
 +- * Permission is hereby granted, free of charge, to any person obtaining a
 +- * copy of this software and/or associated documentation files (the
 +- * "Materials"), to deal in the Materials without restriction, including
 +- * without limitation the rights to use, copy, modify, merge, publish,
 +- * distribute, sublicense, and/or sell copies of the Materials, and to
 +- * permit persons to whom the Materials are furnished to do so, subject to
 +- * the following conditions:
 +- *
 +- * The above copyright notice and this permission notice shall be included
 +- * in all copies or substantial portions of the Materials.
 +- *
 +- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 +- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 +- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 +- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 +- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
 +- **********************************************************************************/
 +-
 +-/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
 +-
 +-#ifndef __OPENCL_CL_D3D10_H
 +-#define __OPENCL_CL_D3D10_H
 +-
 +-#include <d3d10.h>
 +-#include <CL/cl.h>
 +-#include <CL/cl_platform.h>
 +-
 +-#ifdef __cplusplus
 +-extern "C" {
 +-#endif
 +-
 +-/******************************************************************************
 +- * cl_khr_d3d10_sharing                                                       */
 +-#define cl_khr_d3d10_sharing 1
 +-
 +-typedef cl_uint cl_d3d10_device_source_khr;
 +-typedef cl_uint cl_d3d10_device_set_khr;
 +-
 +-/******************************************************************************/
 +-
 +-// Error Codes
 +-#define CL_INVALID_D3D10_DEVICE_KHR                  -1002
 +-#define CL_INVALID_D3D10_RESOURCE_KHR                -1003
 +-#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR       -1004
 +-#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR           -1005
 +-
 +-// cl_d3d10_device_source_nv
 +-#define CL_D3D10_DEVICE_KHR                          0x4010
 +-#define CL_D3D10_DXGI_ADAPTER_KHR                    0x4011
 +-
 +-// cl_d3d10_device_set_nv
 +-#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR           0x4012
 +-#define CL_ALL_DEVICES_FOR_D3D10_KHR                 0x4013
 +-
 +-// cl_context_info
 +-#define CL_CONTEXT_D3D10_DEVICE_KHR                  0x4014
 +-#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C
 +-
 +-// cl_mem_info
 +-#define CL_MEM_D3D10_RESOURCE_KHR                    0x4015
 +-
 +-// cl_image_info
 +-#define CL_IMAGE_D3D10_SUBRESOURCE_KHR               0x4016
 +-
 +-// cl_command_type
 +-#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR         0x4017
 +-#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR         0x4018
 +-
 +-/******************************************************************************/
 +-
 +-typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)(
 +-    cl_platform_id             platform,
 +-    cl_d3d10_device_source_khr d3d_device_source,
 +-    void *                     d3d_object,
 +-    cl_d3d10_device_set_khr    d3d_device_set,
 +-    cl_uint                    num_entries,
 +-    cl_device_id *             devices,
 +-    cl_uint *                  num_devices) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)(
 +-    cl_context     context,
 +-    cl_mem_flags   flags,
 +-    ID3D10Buffer * resource,
 +-    cl_int *       errcode_ret) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)(
 +-    cl_context        context,
 +-    cl_mem_flags      flags,
 +-    ID3D10Texture2D * resource,
 +-    UINT              subresource,
 +-    cl_int *          errcode_ret) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)(
 +-    cl_context        context,
 +-    cl_mem_flags      flags,
 +-    ID3D10Texture3D * resource,
 +-    UINT              subresource,
 +-    cl_int *          errcode_ret) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)(
 +-    cl_command_queue command_queue,
 +-    cl_uint          num_objects,
 +-    const cl_mem *   mem_objects,
 +-    cl_uint          num_events_in_wait_list,
 +-    const cl_event * event_wait_list,
 +-    cl_event *       event) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)(
 +-    cl_command_queue command_queue,
 +-    cl_uint          num_objects,
 +-    const cl_mem *   mem_objects,
 +-    cl_uint          num_events_in_wait_list,
 +-    const cl_event * event_wait_list,
 +-    cl_event *       event) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-#ifdef __cplusplus
 +-}
 +-#endif
 +-
 +-#endif  // __OPENCL_CL_D3D10_H
 +-
 ++#include_next <CL/cl_d3d10.h>
- Index: beignet-0.1+git20130514+19e9c58/include/CL/cl.h
++Index: beignet-0.1+git20130521+a7ea35c/include/CL/cl.h
 +===================================================================
- --- beignet-0.1+git20130514+19e9c58.orig/include/CL/cl.h	2013-05-14 20:04:50.338033844 +0200
- +++ beignet-0.1+git20130514+19e9c58/include/CL/cl.h	2013-05-14 20:04:53.674033695 +0200
++--- beignet-0.1+git20130521+a7ea35c.orig/include/CL/cl.h	2013-05-21 10:38:37.207948335 +0200
+++++ beignet-0.1+git20130521+a7ea35c/include/CL/cl.h	2013-05-21 10:41:03.327941820 +0200
 +@@ -1,1214 +1 @@
 +-/*******************************************************************************
 +- * Copyright (c) 2008 - 2012 The Khronos Group Inc.
 +- *
 +- * Permission is hereby granted, free of charge, to any person obtaining a
 +- * copy of this software and/or associated documentation files (the
 +- * "Materials"), to deal in the Materials without restriction, including
 +- * without limitation the rights to use, copy, modify, merge, publish,
 +- * distribute, sublicense, and/or sell copies of the Materials, and to
 +- * permit persons to whom the Materials are furnished to do so, subject to
 +- * the following conditions:
 +- *
 +- * The above copyright notice and this permission notice shall be included
 +- * in all copies or substantial portions of the Materials.
 +- *
 +- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 +- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 +- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 +- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 +- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
 +- ******************************************************************************/
 +-
 +-#ifndef __OPENCL_CL_H
 +-#define __OPENCL_CL_H
 +-
 +-#ifdef __APPLE__
 +-#include <OpenCL/cl_platform.h>
 +-#else
 +-#include <CL/cl_platform.h>
 +-#endif	
 +-
 +-#ifdef __cplusplus
 +-extern "C" {
 +-#endif
 +-
 +-/******************************************************************************/
 +-
 +-typedef struct _cl_platform_id *    cl_platform_id;
 +-typedef struct _cl_device_id *      cl_device_id;
 +-typedef struct _cl_context *        cl_context;
 +-typedef struct _cl_command_queue *  cl_command_queue;
 +-typedef struct _cl_mem *            cl_mem;
 +-typedef struct _cl_program *        cl_program;
 +-typedef struct _cl_kernel *         cl_kernel;
 +-typedef struct _cl_event *          cl_event;
 +-typedef struct _cl_sampler *        cl_sampler;
 +-
 +-typedef cl_uint             cl_bool;                     /* WARNING!  Unlike cl_ types in cl_platform.h, cl_bool is not guaranteed to be the same size as the bool in kernels. */ 
 +-typedef cl_ulong            cl_bitfield;
 +-typedef cl_bitfield         cl_device_type;
 +-typedef cl_uint             cl_platform_info;
 +-typedef cl_uint             cl_device_info;
 +-typedef cl_bitfield         cl_device_fp_config;
 +-typedef cl_uint             cl_device_mem_cache_type;
 +-typedef cl_uint             cl_device_local_mem_type;
 +-typedef cl_bitfield         cl_device_exec_capabilities;
 +-typedef cl_bitfield         cl_command_queue_properties;
 +-typedef intptr_t            cl_device_partition_property;
 +-typedef cl_bitfield         cl_device_affinity_domain;
 +-
 +-typedef intptr_t            cl_context_properties;
 +-typedef cl_uint             cl_context_info;
 +-typedef cl_uint             cl_command_queue_info;
 +-typedef cl_uint             cl_channel_order;
 +-typedef cl_uint             cl_channel_type;
 +-typedef cl_bitfield         cl_mem_flags;
 +-typedef cl_uint             cl_mem_object_type;
 +-typedef cl_uint             cl_mem_info;
 +-typedef cl_bitfield         cl_mem_migration_flags;
 +-typedef cl_uint             cl_image_info;
 +-typedef cl_uint             cl_buffer_create_type;
 +-typedef cl_uint             cl_addressing_mode;
 +-typedef cl_uint             cl_filter_mode;
 +-typedef cl_uint             cl_sampler_info;
 +-typedef cl_bitfield         cl_map_flags;
 +-typedef cl_uint             cl_program_info;
 +-typedef cl_uint             cl_program_build_info;
 +-typedef cl_uint             cl_program_binary_type;
 +-typedef cl_int              cl_build_status;
 +-typedef cl_uint             cl_kernel_info;
 +-typedef cl_uint             cl_kernel_arg_info;
 +-typedef cl_uint             cl_kernel_arg_address_qualifier;
 +-typedef cl_uint             cl_kernel_arg_access_qualifier;
 +-typedef cl_bitfield         cl_kernel_arg_type_qualifier;
 +-typedef cl_uint             cl_kernel_work_group_info;
 +-typedef cl_uint             cl_event_info;
 +-typedef cl_uint             cl_command_type;
 +-typedef cl_uint             cl_profiling_info;
 +-
 +-
 +-typedef struct _cl_image_format {
 +-    cl_channel_order        image_channel_order;
 +-    cl_channel_type         image_channel_data_type;
 +-} cl_image_format;
 +-
 +-typedef struct _cl_image_desc {
 +-    cl_mem_object_type      image_type;
 +-    size_t                  image_width;
 +-    size_t                  image_height;
 +-    size_t                  image_depth;
 +-    size_t                  image_array_size;
 +-    size_t                  image_row_pitch;
 +-    size_t                  image_slice_pitch;
 +-    cl_uint                 num_mip_levels;
 +-    cl_uint                 num_samples;
 +-    cl_mem                  buffer;
 +-} cl_image_desc;
 +-
 +-typedef struct _cl_buffer_region {
 +-    size_t                  origin;
 +-    size_t                  size;
 +-} cl_buffer_region;
 +-
 +-
 +-/******************************************************************************/
 +-
 +-/* Error Codes */
 +-#define CL_SUCCESS                                  0
 +-#define CL_DEVICE_NOT_FOUND                         -1
 +-#define CL_DEVICE_NOT_AVAILABLE                     -2
 +-#define CL_COMPILER_NOT_AVAILABLE                   -3
 +-#define CL_MEM_OBJECT_ALLOCATION_FAILURE            -4
 +-#define CL_OUT_OF_RESOURCES                         -5
 +-#define CL_OUT_OF_HOST_MEMORY                       -6
 +-#define CL_PROFILING_INFO_NOT_AVAILABLE             -7
 +-#define CL_MEM_COPY_OVERLAP                         -8
 +-#define CL_IMAGE_FORMAT_MISMATCH                    -9
 +-#define CL_IMAGE_FORMAT_NOT_SUPPORTED               -10
 +-#define CL_BUILD_PROGRAM_FAILURE                    -11
 +-#define CL_MAP_FAILURE                              -12
 +-#define CL_MISALIGNED_SUB_BUFFER_OFFSET             -13
 +-#define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14
 +-#define CL_COMPILE_PROGRAM_FAILURE                  -15
 +-#define CL_LINKER_NOT_AVAILABLE                     -16
 +-#define CL_LINK_PROGRAM_FAILURE                     -17
 +-#define CL_DEVICE_PARTITION_FAILED                  -18
 +-#define CL_KERNEL_ARG_INFO_NOT_AVAILABLE            -19
 +-
 +-#define CL_INVALID_VALUE                            -30
 +-#define CL_INVALID_DEVICE_TYPE                      -31
 +-#define CL_INVALID_PLATFORM                         -32
 +-#define CL_INVALID_DEVICE                           -33
 +-#define CL_INVALID_CONTEXT                          -34
 +-#define CL_INVALID_QUEUE_PROPERTIES                 -35
 +-#define CL_INVALID_COMMAND_QUEUE                    -36
 +-#define CL_INVALID_HOST_PTR                         -37
 +-#define CL_INVALID_MEM_OBJECT                       -38
 +-#define CL_INVALID_IMAGE_FORMAT_DESCRIPTOR          -39
 +-#define CL_INVALID_IMAGE_SIZE                       -40
 +-#define CL_INVALID_SAMPLER                          -41
 +-#define CL_INVALID_BINARY                           -42
 +-#define CL_INVALID_BUILD_OPTIONS                    -43
 +-#define CL_INVALID_PROGRAM                          -44
 +-#define CL_INVALID_PROGRAM_EXECUTABLE               -45
 +-#define CL_INVALID_KERNEL_NAME                      -46
 +-#define CL_INVALID_KERNEL_DEFINITION                -47
 +-#define CL_INVALID_KERNEL                           -48
 +-#define CL_INVALID_ARG_INDEX                        -49
 +-#define CL_INVALID_ARG_VALUE                        -50
 +-#define CL_INVALID_ARG_SIZE                         -51
 +-#define CL_INVALID_KERNEL_ARGS                      -52
 +-#define CL_INVALID_WORK_DIMENSION                   -53
 +-#define CL_INVALID_WORK_GROUP_SIZE                  -54
 +-#define CL_INVALID_WORK_ITEM_SIZE                   -55
 +-#define CL_INVALID_GLOBAL_OFFSET                    -56
 +-#define CL_INVALID_EVENT_WAIT_LIST                  -57
 +-#define CL_INVALID_EVENT                            -58
 +-#define CL_INVALID_OPERATION                        -59
 +-#define CL_INVALID_GL_OBJECT                        -60
 +-#define CL_INVALID_BUFFER_SIZE                      -61
 +-#define CL_INVALID_MIP_LEVEL                        -62
 +-#define CL_INVALID_GLOBAL_WORK_SIZE                 -63
 +-#define CL_INVALID_PROPERTY                         -64
 +-#define CL_INVALID_IMAGE_DESCRIPTOR                 -65
 +-#define CL_INVALID_COMPILER_OPTIONS                 -66
 +-#define CL_INVALID_LINKER_OPTIONS                   -67
 +-#define CL_INVALID_DEVICE_PARTITION_COUNT           -68
 +-
 +-/* OpenCL Version */
 +-#define CL_VERSION_1_0                              1
 +-#define CL_VERSION_1_1                              1
 +-#define CL_VERSION_1_2                              1
 +-
 +-/* cl_bool */
 +-#define CL_FALSE                                    0
 +-#define CL_TRUE                                     1
 +-#define CL_BLOCKING                                 CL_TRUE
 +-#define CL_NON_BLOCKING                             CL_FALSE
 +-
 +-/* cl_platform_info */
 +-#define CL_PLATFORM_PROFILE                         0x0900
 +-#define CL_PLATFORM_VERSION                         0x0901
 +-#define CL_PLATFORM_NAME                            0x0902
 +-#define CL_PLATFORM_VENDOR                          0x0903
 +-#define CL_PLATFORM_EXTENSIONS                      0x0904
 +-
 +-/* cl_device_type - bitfield */
 +-#define CL_DEVICE_TYPE_DEFAULT                      (1 << 0)
 +-#define CL_DEVICE_TYPE_CPU                          (1 << 1)
 +-#define CL_DEVICE_TYPE_GPU                          (1 << 2)
 +-#define CL_DEVICE_TYPE_ACCELERATOR                  (1 << 3)
 +-#define CL_DEVICE_TYPE_CUSTOM                       (1 << 4)
 +-#define CL_DEVICE_TYPE_ALL                          0xFFFFFFFF
 +-
 +-/* cl_device_info */
 +-#define CL_DEVICE_TYPE                              0x1000
 +-#define CL_DEVICE_VENDOR_ID                         0x1001
 +-#define CL_DEVICE_MAX_COMPUTE_UNITS                 0x1002
 +-#define CL_DEVICE_MAX_WORK_ITEM_DIMENSIONS          0x1003
 +-#define CL_DEVICE_MAX_WORK_GROUP_SIZE               0x1004
 +-#define CL_DEVICE_MAX_WORK_ITEM_SIZES               0x1005
 +-#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_CHAR       0x1006
 +-#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_SHORT      0x1007
 +-#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT        0x1008
 +-#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG       0x1009
 +-#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT      0x100A
 +-#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE     0x100B
 +-#define CL_DEVICE_MAX_CLOCK_FREQUENCY               0x100C
 +-#define CL_DEVICE_ADDRESS_BITS                      0x100D
 +-#define CL_DEVICE_MAX_READ_IMAGE_ARGS               0x100E
 +-#define CL_DEVICE_MAX_WRITE_IMAGE_ARGS              0x100F
 +-#define CL_DEVICE_MAX_MEM_ALLOC_SIZE                0x1010
 +-#define CL_DEVICE_IMAGE2D_MAX_WIDTH                 0x1011
 +-#define CL_DEVICE_IMAGE2D_MAX_HEIGHT                0x1012
 +-#define CL_DEVICE_IMAGE3D_MAX_WIDTH                 0x1013
 +-#define CL_DEVICE_IMAGE3D_MAX_HEIGHT                0x1014
 +-#define CL_DEVICE_IMAGE3D_MAX_DEPTH                 0x1015
 +-#define CL_DEVICE_IMAGE_SUPPORT                     0x1016
 +-#define CL_DEVICE_MAX_PARAMETER_SIZE                0x1017
 +-#define CL_DEVICE_MAX_SAMPLERS                      0x1018
 +-#define CL_DEVICE_MEM_BASE_ADDR_ALIGN               0x1019
 +-#define CL_DEVICE_MIN_DATA_TYPE_ALIGN_SIZE          0x101A
 +-#define CL_DEVICE_SINGLE_FP_CONFIG                  0x101B
 +-#define CL_DEVICE_GLOBAL_MEM_CACHE_TYPE             0x101C
 +-#define CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE         0x101D
 +-#define CL_DEVICE_GLOBAL_MEM_CACHE_SIZE             0x101E
 +-#define CL_DEVICE_GLOBAL_MEM_SIZE                   0x101F
 +-#define CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE          0x1020
 +-#define CL_DEVICE_MAX_CONSTANT_ARGS                 0x1021
 +-#define CL_DEVICE_LOCAL_MEM_TYPE                    0x1022
 +-#define CL_DEVICE_LOCAL_MEM_SIZE                    0x1023
 +-#define CL_DEVICE_ERROR_CORRECTION_SUPPORT          0x1024
 +-#define CL_DEVICE_PROFILING_TIMER_RESOLUTION        0x1025
 +-#define CL_DEVICE_ENDIAN_LITTLE                     0x1026
 +-#define CL_DEVICE_AVAILABLE                         0x1027
 +-#define CL_DEVICE_COMPILER_AVAILABLE                0x1028
 +-#define CL_DEVICE_EXECUTION_CAPABILITIES            0x1029
 +-#define CL_DEVICE_QUEUE_PROPERTIES                  0x102A
 +-#define CL_DEVICE_NAME                              0x102B
 +-#define CL_DEVICE_VENDOR                            0x102C
 +-#define CL_DRIVER_VERSION                           0x102D
 +-#define CL_DEVICE_PROFILE                           0x102E
 +-#define CL_DEVICE_VERSION                           0x102F
 +-#define CL_DEVICE_EXTENSIONS                        0x1030
 +-#define CL_DEVICE_PLATFORM                          0x1031
 +-#define CL_DEVICE_DOUBLE_FP_CONFIG                  0x1032
 +-/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */
 +-#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF       0x1034
 +-#define CL_DEVICE_HOST_UNIFIED_MEMORY               0x1035
 +-#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR          0x1036
 +-#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT         0x1037
 +-#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT           0x1038
 +-#define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG          0x1039
 +-#define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT         0x103A
 +-#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE        0x103B
 +-#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF          0x103C
 +-#define CL_DEVICE_OPENCL_C_VERSION                  0x103D
 +-#define CL_DEVICE_LINKER_AVAILABLE                  0x103E
 +-#define CL_DEVICE_BUILT_IN_KERNELS                  0x103F
 +-#define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE             0x1040
 +-#define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE              0x1041
 +-#define CL_DEVICE_PARENT_DEVICE                     0x1042
 +-#define CL_DEVICE_PARTITION_MAX_SUB_DEVICES         0x1043
 +-#define CL_DEVICE_PARTITION_PROPERTIES              0x1044
 +-#define CL_DEVICE_PARTITION_AFFINITY_DOMAIN         0x1045
 +-#define CL_DEVICE_PARTITION_TYPE                    0x1046
 +-#define CL_DEVICE_REFERENCE_COUNT                   0x1047
 +-#define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC       0x1048
 +-#define CL_DEVICE_PRINTF_BUFFER_SIZE                0x1049
 +-#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT             0x104A
 +-#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT      0x104B
 +-
 +-/* cl_device_fp_config - bitfield */
 +-#define CL_FP_DENORM                                (1 << 0)
 +-#define CL_FP_INF_NAN                               (1 << 1)
 +-#define CL_FP_ROUND_TO_NEAREST                      (1 << 2)
 +-#define CL_FP_ROUND_TO_ZERO                         (1 << 3)
 +-#define CL_FP_ROUND_TO_INF                          (1 << 4)
 +-#define CL_FP_FMA                                   (1 << 5)
 +-#define CL_FP_SOFT_FLOAT                            (1 << 6)
 +-#define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT         (1 << 7)
 +-
 +-/* cl_device_mem_cache_type */
 +-#define CL_NONE                                     0x0
 +-#define CL_READ_ONLY_CACHE                          0x1
 +-#define CL_READ_WRITE_CACHE                         0x2
 +-
 +-/* cl_device_local_mem_type */
 +-#define CL_LOCAL                                    0x1
 +-#define CL_GLOBAL                                   0x2
 +-
 +-/* cl_device_exec_capabilities - bitfield */
 +-#define CL_EXEC_KERNEL                              (1 << 0)
 +-#define CL_EXEC_NATIVE_KERNEL                       (1 << 1)
 +-
 +-/* cl_command_queue_properties - bitfield */
 +-#define CL_QUEUE_OUT_OF_ORDER_EXEC_MODE_ENABLE      (1 << 0)
 +-#define CL_QUEUE_PROFILING_ENABLE                   (1 << 1)
 +-
 +-/* cl_context_info  */
 +-#define CL_CONTEXT_REFERENCE_COUNT                  0x1080
 +-#define CL_CONTEXT_DEVICES                          0x1081
 +-#define CL_CONTEXT_PROPERTIES                       0x1082
 +-#define CL_CONTEXT_NUM_DEVICES                      0x1083
 +-
 +-/* cl_context_properties */
 +-#define CL_CONTEXT_PLATFORM                         0x1084
 +-#define CL_CONTEXT_INTEROP_USER_SYNC                0x1085
 +-    
 +-/* cl_device_partition_property */
 +-#define CL_DEVICE_PARTITION_EQUALLY                 0x1086
 +-#define CL_DEVICE_PARTITION_BY_COUNTS               0x1087
 +-#define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END      0x0
 +-#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN      0x1088
 +-    
 +-/* cl_device_affinity_domain */
 +-#define CL_DEVICE_AFFINITY_DOMAIN_NUMA                     (1 << 0)
 +-#define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE                 (1 << 1)
 +-#define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE                 (1 << 2)
 +-#define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE                 (1 << 3)
 +-#define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE                 (1 << 4)
 +-#define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE       (1 << 5)
 +-
 +-/* cl_command_queue_info */
 +-#define CL_QUEUE_CONTEXT                            0x1090
 +-#define CL_QUEUE_DEVICE                             0x1091
 +-#define CL_QUEUE_REFERENCE_COUNT                    0x1092
 +-#define CL_QUEUE_PROPERTIES                         0x1093
 +-
 +-/* cl_mem_flags - bitfield */
 +-#define CL_MEM_READ_WRITE                           (1 << 0)
 +-#define CL_MEM_WRITE_ONLY                           (1 << 1)
 +-#define CL_MEM_READ_ONLY                            (1 << 2)
 +-#define CL_MEM_USE_HOST_PTR                         (1 << 3)
 +-#define CL_MEM_ALLOC_HOST_PTR                       (1 << 4)
 +-#define CL_MEM_COPY_HOST_PTR                        (1 << 5)
 +-// reserved                                         (1 << 6)    
 +-#define CL_MEM_HOST_WRITE_ONLY                      (1 << 7)
 +-#define CL_MEM_HOST_READ_ONLY                       (1 << 8)
 +-#define CL_MEM_HOST_NO_ACCESS                       (1 << 9)
 +-
 +-/* cl_mem_migration_flags - bitfield */
 +-#define CL_MIGRATE_MEM_OBJECT_HOST                  (1 << 0)
 +-#define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED     (1 << 1)
 +-
 +-/* cl_channel_order */
 +-#define CL_R                                        0x10B0
 +-#define CL_A                                        0x10B1
 +-#define CL_RG                                       0x10B2
 +-#define CL_RA                                       0x10B3
 +-#define CL_RGB                                      0x10B4
 +-#define CL_RGBA                                     0x10B5
 +-#define CL_BGRA                                     0x10B6
 +-#define CL_ARGB                                     0x10B7
 +-#define CL_INTENSITY                                0x10B8
 +-#define CL_LUMINANCE                                0x10B9
 +-#define CL_Rx                                       0x10BA
 +-#define CL_RGx                                      0x10BB
 +-#define CL_RGBx                                     0x10BC
 +-#define CL_DEPTH                                    0x10BD
 +-#define CL_DEPTH_STENCIL                            0x10BE
 +-
 +-/* cl_channel_type */
 +-#define CL_SNORM_INT8                               0x10D0
 +-#define CL_SNORM_INT16                              0x10D1
 +-#define CL_UNORM_INT8                               0x10D2
 +-#define CL_UNORM_INT16                              0x10D3
 +-#define CL_UNORM_SHORT_565                          0x10D4
 +-#define CL_UNORM_SHORT_555                          0x10D5
 +-#define CL_UNORM_INT_101010                         0x10D6
 +-#define CL_SIGNED_INT8                              0x10D7
 +-#define CL_SIGNED_INT16                             0x10D8
 +-#define CL_SIGNED_INT32                             0x10D9
 +-#define CL_UNSIGNED_INT8                            0x10DA
 +-#define CL_UNSIGNED_INT16                           0x10DB
 +-#define CL_UNSIGNED_INT32                           0x10DC
 +-#define CL_HALF_FLOAT                               0x10DD
 +-#define CL_FLOAT                                    0x10DE
 +-#define CL_UNORM_INT24                              0x10DF
 +-
 +-/* cl_mem_object_type */
 +-#define CL_MEM_OBJECT_BUFFER                        0x10F0
 +-#define CL_MEM_OBJECT_IMAGE2D                       0x10F1
 +-#define CL_MEM_OBJECT_IMAGE3D                       0x10F2
 +-#define CL_MEM_OBJECT_IMAGE2D_ARRAY                 0x10F3
 +-#define CL_MEM_OBJECT_IMAGE1D                       0x10F4
 +-#define CL_MEM_OBJECT_IMAGE1D_ARRAY                 0x10F5
 +-#define CL_MEM_OBJECT_IMAGE1D_BUFFER                0x10F6
 +-
 +-/* cl_mem_info */
 +-#define CL_MEM_TYPE                                 0x1100
 +-#define CL_MEM_FLAGS                                0x1101
 +-#define CL_MEM_SIZE                                 0x1102
 +-#define CL_MEM_HOST_PTR                             0x1103
 +-#define CL_MEM_MAP_COUNT                            0x1104
 +-#define CL_MEM_REFERENCE_COUNT                      0x1105
 +-#define CL_MEM_CONTEXT                              0x1106
 +-#define CL_MEM_ASSOCIATED_MEMOBJECT                 0x1107
 +-#define CL_MEM_OFFSET                               0x1108
 +-
 +-/* cl_image_info */
 +-#define CL_IMAGE_FORMAT                             0x1110
 +-#define CL_IMAGE_ELEMENT_SIZE                       0x1111
 +-#define CL_IMAGE_ROW_PITCH                          0x1112
 +-#define CL_IMAGE_SLICE_PITCH                        0x1113
 +-#define CL_IMAGE_WIDTH                              0x1114
 +-#define CL_IMAGE_HEIGHT                             0x1115
 +-#define CL_IMAGE_DEPTH                              0x1116
 +-#define CL_IMAGE_ARRAY_SIZE                         0x1117
 +-#define CL_IMAGE_BUFFER                             0x1118
 +-#define CL_IMAGE_NUM_MIP_LEVELS                     0x1119
 +-#define CL_IMAGE_NUM_SAMPLES                        0x111A
 +-
 +-/* cl_addressing_mode */
 +-#define CL_ADDRESS_NONE                             0x1130
 +-#define CL_ADDRESS_CLAMP_TO_EDGE                    0x1131
 +-#define CL_ADDRESS_CLAMP                            0x1132
 +-#define CL_ADDRESS_REPEAT                           0x1133
 +-#define CL_ADDRESS_MIRRORED_REPEAT                  0x1134
 +-
 +-/* cl_filter_mode */
 +-#define CL_FILTER_NEAREST                           0x1140
 +-#define CL_FILTER_LINEAR                            0x1141
 +-
 +-/* cl_sampler_info */
 +-#define CL_SAMPLER_REFERENCE_COUNT                  0x1150
 +-#define CL_SAMPLER_CONTEXT                          0x1151
 +-#define CL_SAMPLER_NORMALIZED_COORDS                0x1152
 +-#define CL_SAMPLER_ADDRESSING_MODE                  0x1153
 +-#define CL_SAMPLER_FILTER_MODE                      0x1154
 +-
 +-/* cl_map_flags - bitfield */
 +-#define CL_MAP_READ                                 (1 << 0)
 +-#define CL_MAP_WRITE                                (1 << 1)
 +-#define CL_MAP_WRITE_INVALIDATE_REGION              (1 << 2)
 +-
 +-/* cl_program_info */
 +-#define CL_PROGRAM_REFERENCE_COUNT                  0x1160
 +-#define CL_PROGRAM_CONTEXT                          0x1161
 +-#define CL_PROGRAM_NUM_DEVICES                      0x1162
 +-#define CL_PROGRAM_DEVICES                          0x1163
 +-#define CL_PROGRAM_SOURCE                           0x1164
 +-#define CL_PROGRAM_BINARY_SIZES                     0x1165
 +-#define CL_PROGRAM_BINARIES                         0x1166
 +-#define CL_PROGRAM_NUM_KERNELS                      0x1167
 +-#define CL_PROGRAM_KERNEL_NAMES                     0x1168
 +-
 +-/* cl_program_build_info */
 +-#define CL_PROGRAM_BUILD_STATUS                     0x1181
 +-#define CL_PROGRAM_BUILD_OPTIONS                    0x1182
 +-#define CL_PROGRAM_BUILD_LOG                        0x1183
 +-#define CL_PROGRAM_BINARY_TYPE                      0x1184
 +-    
 +-/* cl_program_binary_type */
 +-#define CL_PROGRAM_BINARY_TYPE_NONE                 0x0
 +-#define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT      0x1
 +-#define CL_PROGRAM_BINARY_TYPE_LIBRARY              0x2
 +-#define CL_PROGRAM_BINARY_TYPE_EXECUTABLE           0x4
 +-
 +-/* cl_build_status */
 +-#define CL_BUILD_SUCCESS                            0
 +-#define CL_BUILD_NONE                               -1
 +-#define CL_BUILD_ERROR                              -2
 +-#define CL_BUILD_IN_PROGRESS                        -3
 +-
 +-/* cl_kernel_info */
 +-#define CL_KERNEL_FUNCTION_NAME                     0x1190
 +-#define CL_KERNEL_NUM_ARGS                          0x1191
 +-#define CL_KERNEL_REFERENCE_COUNT                   0x1192
 +-#define CL_KERNEL_CONTEXT                           0x1193
 +-#define CL_KERNEL_PROGRAM                           0x1194
 +-#define CL_KERNEL_ATTRIBUTES                        0x1195
 +-
 +-/* cl_kernel_arg_info */
 +-#define CL_KERNEL_ARG_ADDRESS_QUALIFIER             0x1196
 +-#define CL_KERNEL_ARG_ACCESS_QUALIFIER              0x1197
 +-#define CL_KERNEL_ARG_TYPE_NAME                     0x1198
 +-#define CL_KERNEL_ARG_TYPE_QUALIFIER                0x1199
 +-#define CL_KERNEL_ARG_NAME                          0x119A
 +-
 +-/* cl_kernel_arg_address_qualifier */
 +-#define CL_KERNEL_ARG_ADDRESS_GLOBAL                0x119B
 +-#define CL_KERNEL_ARG_ADDRESS_LOCAL                 0x119C
 +-#define CL_KERNEL_ARG_ADDRESS_CONSTANT              0x119D
 +-#define CL_KERNEL_ARG_ADDRESS_PRIVATE               0x119E
 +-
 +-/* cl_kernel_arg_access_qualifier */
 +-#define CL_KERNEL_ARG_ACCESS_READ_ONLY              0x11A0
 +-#define CL_KERNEL_ARG_ACCESS_WRITE_ONLY             0x11A1
 +-#define CL_KERNEL_ARG_ACCESS_READ_WRITE             0x11A2
 +-#define CL_KERNEL_ARG_ACCESS_NONE                   0x11A3
 +-    
 +-/* cl_kernel_arg_type_qualifer */
 +-#define CL_KERNEL_ARG_TYPE_NONE                     0
 +-#define CL_KERNEL_ARG_TYPE_CONST                    (1 << 0)
 +-#define CL_KERNEL_ARG_TYPE_RESTRICT                 (1 << 1)
 +-#define CL_KERNEL_ARG_TYPE_VOLATILE                 (1 << 2)
 +-
 +-/* cl_kernel_work_group_info */
 +-#define CL_KERNEL_WORK_GROUP_SIZE                   0x11B0
 +-#define CL_KERNEL_COMPILE_WORK_GROUP_SIZE           0x11B1
 +-#define CL_KERNEL_LOCAL_MEM_SIZE                    0x11B2
 +-#define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3
 +-#define CL_KERNEL_PRIVATE_MEM_SIZE                  0x11B4
 +-#define CL_KERNEL_GLOBAL_WORK_SIZE                  0x11B5
 +-
 +-/* cl_event_info  */
 +-#define CL_EVENT_COMMAND_QUEUE                      0x11D0
 +-#define CL_EVENT_COMMAND_TYPE                       0x11D1
 +-#define CL_EVENT_REFERENCE_COUNT                    0x11D2
 +-#define CL_EVENT_COMMAND_EXECUTION_STATUS           0x11D3
 +-#define CL_EVENT_CONTEXT                            0x11D4
 +-
 +-/* cl_command_type */
 +-#define CL_COMMAND_NDRANGE_KERNEL                   0x11F0
 +-#define CL_COMMAND_TASK                             0x11F1
 +-#define CL_COMMAND_NATIVE_KERNEL                    0x11F2
 +-#define CL_COMMAND_READ_BUFFER                      0x11F3
 +-#define CL_COMMAND_WRITE_BUFFER                     0x11F4
 +-#define CL_COMMAND_COPY_BUFFER                      0x11F5
 +-#define CL_COMMAND_READ_IMAGE                       0x11F6
 +-#define CL_COMMAND_WRITE_IMAGE                      0x11F7
 +-#define CL_COMMAND_COPY_IMAGE                       0x11F8
 +-#define CL_COMMAND_COPY_IMAGE_TO_BUFFER             0x11F9
 +-#define CL_COMMAND_COPY_BUFFER_TO_IMAGE             0x11FA
 +-#define CL_COMMAND_MAP_BUFFER                       0x11FB
 +-#define CL_COMMAND_MAP_IMAGE                        0x11FC
 +-#define CL_COMMAND_UNMAP_MEM_OBJECT                 0x11FD
 +-#define CL_COMMAND_MARKER                           0x11FE
 +-#define CL_COMMAND_ACQUIRE_GL_OBJECTS               0x11FF
 +-#define CL_COMMAND_RELEASE_GL_OBJECTS               0x1200
 +-#define CL_COMMAND_READ_BUFFER_RECT                 0x1201
 +-#define CL_COMMAND_WRITE_BUFFER_RECT                0x1202
 +-#define CL_COMMAND_COPY_BUFFER_RECT                 0x1203
 +-#define CL_COMMAND_USER                             0x1204
 +-#define CL_COMMAND_BARRIER                          0x1205
 +-#define CL_COMMAND_MIGRATE_MEM_OBJECTS              0x1206
 +-#define CL_COMMAND_FILL_BUFFER                      0x1207
 +-#define CL_COMMAND_FILL_IMAGE                       0x1208
 +-
 +-/* command execution status */
 +-#define CL_COMPLETE                                 0x0
 +-#define CL_RUNNING                                  0x1
 +-#define CL_SUBMITTED                                0x2
 +-#define CL_QUEUED                                   0x3
 +-
 +-/* cl_buffer_create_type  */
 +-#define CL_BUFFER_CREATE_TYPE_REGION                0x1220
 +-
 +-/* cl_profiling_info  */
 +-#define CL_PROFILING_COMMAND_QUEUED                 0x1280
 +-#define CL_PROFILING_COMMAND_SUBMIT                 0x1281
 +-#define CL_PROFILING_COMMAND_START                  0x1282
 +-#define CL_PROFILING_COMMAND_END                    0x1283
 +-
 +-/********************************************************************************************************/
 +-
 +-/* Platform API */
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetPlatformIDs(cl_uint          /* num_entries */,
 +-                 cl_platform_id * /* platforms */,
 +-                 cl_uint *        /* num_platforms */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL 
 +-clGetPlatformInfo(cl_platform_id   /* platform */, 
 +-                  cl_platform_info /* param_name */,
 +-                  size_t           /* param_value_size */, 
 +-                  void *           /* param_value */,
 +-                  size_t *         /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-/* Device APIs */
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetDeviceIDs(cl_platform_id   /* platform */,
 +-               cl_device_type   /* device_type */, 
 +-               cl_uint          /* num_entries */, 
 +-               cl_device_id *   /* devices */, 
 +-               cl_uint *        /* num_devices */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetDeviceInfo(cl_device_id    /* device */,
 +-                cl_device_info  /* param_name */, 
 +-                size_t          /* param_value_size */, 
 +-                void *          /* param_value */,
 +-                size_t *        /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-    
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clCreateSubDevices(cl_device_id                         /* in_device */,
 +-                   const cl_device_partition_property * /* properties */,
 +-                   cl_uint                              /* num_devices */,
 +-                   cl_device_id *                       /* out_devices */,
 +-                   cl_uint *                            /* num_devices_ret */) CL_API_SUFFIX__VERSION_1_2;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clRetainDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2;
 +-    
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clReleaseDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2;
 +-    
 +-/* Context APIs  */
 +-extern CL_API_ENTRY cl_context CL_API_CALL
 +-clCreateContext(const cl_context_properties * /* properties */,
 +-                cl_uint                 /* num_devices */,
 +-                const cl_device_id *    /* devices */,
 +-                void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *),
 +-                void *                  /* user_data */,
 +-                cl_int *                /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_context CL_API_CALL
 +-clCreateContextFromType(const cl_context_properties * /* properties */,
 +-                        cl_device_type          /* device_type */,
 +-                        void (CL_CALLBACK *     /* pfn_notify*/ )(const char *, const void *, size_t, void *),
 +-                        void *                  /* user_data */,
 +-                        cl_int *                /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clRetainContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clReleaseContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetContextInfo(cl_context         /* context */, 
 +-                 cl_context_info    /* param_name */, 
 +-                 size_t             /* param_value_size */, 
 +-                 void *             /* param_value */, 
 +-                 size_t *           /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-/* Command Queue APIs */
 +-extern CL_API_ENTRY cl_command_queue CL_API_CALL
 +-clCreateCommandQueue(cl_context                     /* context */, 
 +-                     cl_device_id                   /* device */, 
 +-                     cl_command_queue_properties    /* properties */,
 +-                     cl_int *                       /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clRetainCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clReleaseCommandQueue(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetCommandQueueInfo(cl_command_queue      /* command_queue */,
 +-                      cl_command_queue_info /* param_name */,
 +-                      size_t                /* param_value_size */,
 +-                      void *                /* param_value */,
 +-                      size_t *              /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-/* Memory Object APIs */
 +-extern CL_API_ENTRY cl_mem CL_API_CALL
 +-clCreateBuffer(cl_context   /* context */,
 +-               cl_mem_flags /* flags */,
 +-               size_t       /* size */,
 +-               void *       /* host_ptr */,
 +-               cl_int *     /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_mem CL_API_CALL
 +-clCreateSubBuffer(cl_mem                   /* buffer */,
 +-                  cl_mem_flags             /* flags */,
 +-                  cl_buffer_create_type    /* buffer_create_type */,
 +-                  const void *             /* buffer_create_info */,
 +-                  cl_int *                 /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
 +-
 +-extern CL_API_ENTRY cl_mem CL_API_CALL
 +-clCreateImage(cl_context              /* context */,
 +-              cl_mem_flags            /* flags */,
 +-              const cl_image_format * /* image_format */,
 +-              const cl_image_desc *   /* image_desc */, 
 +-              void *                  /* host_ptr */,
 +-              cl_int *                /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;
 +-                        
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clRetainMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clReleaseMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetSupportedImageFormats(cl_context           /* context */,
 +-                           cl_mem_flags         /* flags */,
 +-                           cl_mem_object_type   /* image_type */,
 +-                           cl_uint              /* num_entries */,
 +-                           cl_image_format *    /* image_formats */,
 +-                           cl_uint *            /* num_image_formats */) CL_API_SUFFIX__VERSION_1_0;
 +-                                    
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetMemObjectInfo(cl_mem           /* memobj */,
 +-                   cl_mem_info      /* param_name */, 
 +-                   size_t           /* param_value_size */,
 +-                   void *           /* param_value */,
 +-                   size_t *         /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetImageInfo(cl_mem           /* image */,
 +-               cl_image_info    /* param_name */, 
 +-               size_t           /* param_value_size */,
 +-               void *           /* param_value */,
 +-               size_t *         /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clSetMemObjectDestructorCallback(  cl_mem /* memobj */, 
 +-                                    void (CL_CALLBACK * /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/), 
 +-                                    void * /*user_data */ )             CL_API_SUFFIX__VERSION_1_1;  
 +-
 +-/* Sampler APIs */
 +-extern CL_API_ENTRY cl_sampler CL_API_CALL
 +-clCreateSampler(cl_context          /* context */,
 +-                cl_bool             /* normalized_coords */, 
 +-                cl_addressing_mode  /* addressing_mode */, 
 +-                cl_filter_mode      /* filter_mode */,
 +-                cl_int *            /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clRetainSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clReleaseSampler(cl_sampler /* sampler */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetSamplerInfo(cl_sampler         /* sampler */,
 +-                 cl_sampler_info    /* param_name */,
 +-                 size_t             /* param_value_size */,
 +-                 void *             /* param_value */,
 +-                 size_t *           /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-                            
 +-/* Program Object APIs  */
 +-extern CL_API_ENTRY cl_program CL_API_CALL
 +-clCreateProgramWithSource(cl_context        /* context */,
 +-                          cl_uint           /* count */,
 +-                          const char **     /* strings */,
 +-                          const size_t *    /* lengths */,
 +-                          cl_int *          /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_program CL_API_CALL
 +-clCreateProgramWithBinary(cl_context                     /* context */,
 +-                          cl_uint                        /* num_devices */,
 +-                          const cl_device_id *           /* device_list */,
 +-                          const size_t *                 /* lengths */,
 +-                          const unsigned char **         /* binaries */,
 +-                          cl_int *                       /* binary_status */,
 +-                          cl_int *                       /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_program CL_API_CALL
 +-clCreateProgramWithBuiltInKernels(cl_context            /* context */,
 +-                                  cl_uint               /* num_devices */,
 +-                                  const cl_device_id *  /* device_list */,
 +-                                  const char *          /* kernel_names */,
 +-                                  cl_int *              /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clRetainProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clReleaseProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clBuildProgram(cl_program           /* program */,
 +-               cl_uint              /* num_devices */,
 +-               const cl_device_id * /* device_list */,
 +-               const char *         /* options */, 
 +-               void (CL_CALLBACK *  /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
 +-               void *               /* user_data */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clCompileProgram(cl_program           /* program */,
 +-                 cl_uint              /* num_devices */,
 +-                 const cl_device_id * /* device_list */,
 +-                 const char *         /* options */, 
 +-                 cl_uint              /* num_input_headers */,
 +-                 const cl_program *   /* input_headers */,
 +-                 const char **        /* header_include_names */,
 +-                 void (CL_CALLBACK *  /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
 +-                 void *               /* user_data */) CL_API_SUFFIX__VERSION_1_2;
 +-
 +-extern CL_API_ENTRY cl_program CL_API_CALL
 +-clLinkProgram(cl_context           /* context */,
 +-              cl_uint              /* num_devices */,
 +-              const cl_device_id * /* device_list */,
 +-              const char *         /* options */, 
 +-              cl_uint              /* num_input_programs */,
 +-              const cl_program *   /* input_programs */,
 +-              void (CL_CALLBACK *  /* pfn_notify */)(cl_program /* program */, void * /* user_data */),
 +-              void *               /* user_data */,
 +-              cl_int *             /* errcode_ret */ ) CL_API_SUFFIX__VERSION_1_2;
 +-
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clUnloadPlatformCompiler(cl_platform_id /* platform */) CL_API_SUFFIX__VERSION_1_2;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetProgramInfo(cl_program         /* program */,
 +-                 cl_program_info    /* param_name */,
 +-                 size_t             /* param_value_size */,
 +-                 void *             /* param_value */,
 +-                 size_t *           /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetProgramBuildInfo(cl_program            /* program */,
 +-                      cl_device_id          /* device */,
 +-                      cl_program_build_info /* param_name */,
 +-                      size_t                /* param_value_size */,
 +-                      void *                /* param_value */,
 +-                      size_t *              /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-                            
 +-/* Kernel Object APIs */
 +-extern CL_API_ENTRY cl_kernel CL_API_CALL
 +-clCreateKernel(cl_program      /* program */,
 +-               const char *    /* kernel_name */,
 +-               cl_int *        /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clCreateKernelsInProgram(cl_program     /* program */,
 +-                         cl_uint        /* num_kernels */,
 +-                         cl_kernel *    /* kernels */,
 +-                         cl_uint *      /* num_kernels_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clRetainKernel(cl_kernel    /* kernel */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clReleaseKernel(cl_kernel   /* kernel */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clSetKernelArg(cl_kernel    /* kernel */,
 +-               cl_uint      /* arg_index */,
 +-               size_t       /* arg_size */,
 +-               const void * /* arg_value */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetKernelInfo(cl_kernel       /* kernel */,
 +-                cl_kernel_info  /* param_name */,
 +-                size_t          /* param_value_size */,
 +-                void *          /* param_value */,
 +-                size_t *        /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetKernelArgInfo(cl_kernel       /* kernel */,
 +-                   cl_uint         /* arg_indx */,
 +-                   cl_kernel_arg_info  /* param_name */,
 +-                   size_t          /* param_value_size */,
 +-                   void *          /* param_value */,
 +-                   size_t *        /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_2;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetKernelWorkGroupInfo(cl_kernel                  /* kernel */,
 +-                         cl_device_id               /* device */,
 +-                         cl_kernel_work_group_info  /* param_name */,
 +-                         size_t                     /* param_value_size */,
 +-                         void *                     /* param_value */,
 +-                         size_t *                   /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-/* Event Object APIs */
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clWaitForEvents(cl_uint             /* num_events */,
 +-                const cl_event *    /* event_list */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetEventInfo(cl_event         /* event */,
 +-               cl_event_info    /* param_name */,
 +-               size_t           /* param_value_size */,
 +-               void *           /* param_value */,
 +-               size_t *         /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-                            
 +-extern CL_API_ENTRY cl_event CL_API_CALL
 +-clCreateUserEvent(cl_context    /* context */,
 +-                  cl_int *      /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;               
 +-                            
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clRetainEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clReleaseEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clSetUserEventStatus(cl_event   /* event */,
 +-                     cl_int     /* execution_status */) CL_API_SUFFIX__VERSION_1_1;
 +-                     
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clSetEventCallback( cl_event    /* event */,
 +-                    cl_int      /* command_exec_callback_type */,
 +-                    void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *),
 +-                    void *      /* user_data */) CL_API_SUFFIX__VERSION_1_1;
 +-
 +-/* Profiling APIs */
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetEventProfilingInfo(cl_event            /* event */,
 +-                        cl_profiling_info   /* param_name */,
 +-                        size_t              /* param_value_size */,
 +-                        void *              /* param_value */,
 +-                        size_t *            /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-                                
 +-/* Flush and Finish APIs */
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clFlush(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clFinish(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-/* Enqueued Commands APIs */
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueReadBuffer(cl_command_queue    /* command_queue */,
 +-                    cl_mem              /* buffer */,
 +-                    cl_bool             /* blocking_read */,
 +-                    size_t              /* offset */,
 +-                    size_t              /* size */, 
 +-                    void *              /* ptr */,
 +-                    cl_uint             /* num_events_in_wait_list */,
 +-                    const cl_event *    /* event_wait_list */,
 +-                    cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_0;
 +-                            
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueReadBufferRect(cl_command_queue    /* command_queue */,
 +-                        cl_mem              /* buffer */,
 +-                        cl_bool             /* blocking_read */,
 +-                        const size_t *      /* buffer_offset */,
 +-                        const size_t *      /* host_offset */, 
 +-                        const size_t *      /* region */,
 +-                        size_t              /* buffer_row_pitch */,
 +-                        size_t              /* buffer_slice_pitch */,
 +-                        size_t              /* host_row_pitch */,
 +-                        size_t              /* host_slice_pitch */,                        
 +-                        void *              /* ptr */,
 +-                        cl_uint             /* num_events_in_wait_list */,
 +-                        const cl_event *    /* event_wait_list */,
 +-                        cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_1;
 +-                            
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueWriteBuffer(cl_command_queue   /* command_queue */, 
 +-                     cl_mem             /* buffer */, 
 +-                     cl_bool            /* blocking_write */, 
 +-                     size_t             /* offset */, 
 +-                     size_t             /* size */, 
 +-                     const void *       /* ptr */, 
 +-                     cl_uint            /* num_events_in_wait_list */, 
 +-                     const cl_event *   /* event_wait_list */, 
 +-                     cl_event *         /* event */) CL_API_SUFFIX__VERSION_1_0;
 +-                            
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueWriteBufferRect(cl_command_queue    /* command_queue */,
 +-                         cl_mem              /* buffer */,
 +-                         cl_bool             /* blocking_write */,
 +-                         const size_t *      /* buffer_offset */,
 +-                         const size_t *      /* host_offset */, 
 +-                         const size_t *      /* region */,
 +-                         size_t              /* buffer_row_pitch */,
 +-                         size_t              /* buffer_slice_pitch */,
 +-                         size_t              /* host_row_pitch */,
 +-                         size_t              /* host_slice_pitch */,                        
 +-                         const void *        /* ptr */,
 +-                         cl_uint             /* num_events_in_wait_list */,
 +-                         const cl_event *    /* event_wait_list */,
 +-                         cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_1;
 +-                            
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueFillBuffer(cl_command_queue   /* command_queue */,
 +-                    cl_mem             /* buffer */, 
 +-                    const void *       /* pattern */, 
 +-                    size_t             /* pattern_size */, 
 +-                    size_t             /* offset */, 
 +-                    size_t             /* size */, 
 +-                    cl_uint            /* num_events_in_wait_list */, 
 +-                    const cl_event *   /* event_wait_list */, 
 +-                    cl_event *         /* event */) CL_API_SUFFIX__VERSION_1_2;
 +-                            
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueCopyBuffer(cl_command_queue    /* command_queue */, 
 +-                    cl_mem              /* src_buffer */,
 +-                    cl_mem              /* dst_buffer */, 
 +-                    size_t              /* src_offset */,
 +-                    size_t              /* dst_offset */,
 +-                    size_t              /* size */, 
 +-                    cl_uint             /* num_events_in_wait_list */,
 +-                    const cl_event *    /* event_wait_list */,
 +-                    cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_0;
 +-                            
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueCopyBufferRect(cl_command_queue    /* command_queue */, 
 +-                        cl_mem              /* src_buffer */,
 +-                        cl_mem              /* dst_buffer */, 
 +-                        const size_t *      /* src_origin */,
 +-                        const size_t *      /* dst_origin */,
 +-                        const size_t *      /* region */, 
 +-                        size_t              /* src_row_pitch */,
 +-                        size_t              /* src_slice_pitch */,
 +-                        size_t              /* dst_row_pitch */,
 +-                        size_t              /* dst_slice_pitch */,
 +-                        cl_uint             /* num_events_in_wait_list */,
 +-                        const cl_event *    /* event_wait_list */,
 +-                        cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_1;
 +-                            
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueReadImage(cl_command_queue     /* command_queue */,
 +-                   cl_mem               /* image */,
 +-                   cl_bool              /* blocking_read */, 
 +-                   const size_t *       /* origin[3] */,
 +-                   const size_t *       /* region[3] */,
 +-                   size_t               /* row_pitch */,
 +-                   size_t               /* slice_pitch */, 
 +-                   void *               /* ptr */,
 +-                   cl_uint              /* num_events_in_wait_list */,
 +-                   const cl_event *     /* event_wait_list */,
 +-                   cl_event *           /* event */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueWriteImage(cl_command_queue    /* command_queue */,
 +-                    cl_mem              /* image */,
 +-                    cl_bool             /* blocking_write */, 
 +-                    const size_t *      /* origin[3] */,
 +-                    const size_t *      /* region[3] */,
 +-                    size_t              /* input_row_pitch */,
 +-                    size_t              /* input_slice_pitch */, 
 +-                    const void *        /* ptr */,
 +-                    cl_uint             /* num_events_in_wait_list */,
 +-                    const cl_event *    /* event_wait_list */,
 +-                    cl_event *          /* event */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueFillImage(cl_command_queue   /* command_queue */,
 +-                   cl_mem             /* image */, 
 +-                   const void *       /* fill_color */, 
 +-                   const size_t *     /* origin[3] */, 
 +-                   const size_t *     /* region[3] */, 
 +-                   cl_uint            /* num_events_in_wait_list */, 
 +-                   const cl_event *   /* event_wait_list */, 
 +-                   cl_event *         /* event */) CL_API_SUFFIX__VERSION_1_2;
 +-                            
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueCopyImage(cl_command_queue     /* command_queue */,
 +-                   cl_mem               /* src_image */,
 +-                   cl_mem               /* dst_image */, 
 +-                   const size_t *       /* src_origin[3] */,
 +-                   const size_t *       /* dst_origin[3] */,
 +-                   const size_t *       /* region[3] */, 
 +-                   cl_uint              /* num_events_in_wait_list */,
 +-                   const cl_event *     /* event_wait_list */,
 +-                   cl_event *           /* event */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueCopyImageToBuffer(cl_command_queue /* command_queue */,
 +-                           cl_mem           /* src_image */,
 +-                           cl_mem           /* dst_buffer */, 
 +-                           const size_t *   /* src_origin[3] */,
 +-                           const size_t *   /* region[3] */, 
 +-                           size_t           /* dst_offset */,
 +-                           cl_uint          /* num_events_in_wait_list */,
 +-                           const cl_event * /* event_wait_list */,
 +-                           cl_event *       /* event */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueCopyBufferToImage(cl_command_queue /* command_queue */,
 +-                           cl_mem           /* src_buffer */,
 +-                           cl_mem           /* dst_image */, 
 +-                           size_t           /* src_offset */,
 +-                           const size_t *   /* dst_origin[3] */,
 +-                           const size_t *   /* region[3] */, 
 +-                           cl_uint          /* num_events_in_wait_list */,
 +-                           const cl_event * /* event_wait_list */,
 +-                           cl_event *       /* event */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY void * CL_API_CALL
 +-clEnqueueMapBuffer(cl_command_queue /* command_queue */,
 +-                   cl_mem           /* buffer */,
 +-                   cl_bool          /* blocking_map */, 
 +-                   cl_map_flags     /* map_flags */,
 +-                   size_t           /* offset */,
 +-                   size_t           /* size */,
 +-                   cl_uint          /* num_events_in_wait_list */,
 +-                   const cl_event * /* event_wait_list */,
 +-                   cl_event *       /* event */,
 +-                   cl_int *         /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY void * CL_API_CALL
 +-clEnqueueMapImage(cl_command_queue  /* command_queue */,
 +-                  cl_mem            /* image */, 
 +-                  cl_bool           /* blocking_map */, 
 +-                  cl_map_flags      /* map_flags */, 
 +-                  const size_t *    /* origin[3] */,
 +-                  const size_t *    /* region[3] */,
 +-                  size_t *          /* image_row_pitch */,
 +-                  size_t *          /* image_slice_pitch */,
 +-                  cl_uint           /* num_events_in_wait_list */,
 +-                  const cl_event *  /* event_wait_list */,
 +-                  cl_event *        /* event */,
 +-                  cl_int *          /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueUnmapMemObject(cl_command_queue /* command_queue */,
 +-                        cl_mem           /* memobj */,
 +-                        void *           /* mapped_ptr */,
 +-                        cl_uint          /* num_events_in_wait_list */,
 +-                        const cl_event *  /* event_wait_list */,
 +-                        cl_event *        /* event */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueMigrateMemObjects(cl_command_queue       /* command_queue */,
 +-                           cl_uint                /* num_mem_objects */,
 +-                           const cl_mem *         /* mem_objects */,
 +-                           cl_mem_migration_flags /* flags */,
 +-                           cl_uint                /* num_events_in_wait_list */,
 +-                           const cl_event *       /* event_wait_list */,
 +-                           cl_event *             /* event */) CL_API_SUFFIX__VERSION_1_2;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueNDRangeKernel(cl_command_queue /* command_queue */,
 +-                       cl_kernel        /* kernel */,
 +-                       cl_uint          /* work_dim */,
 +-                       const size_t *   /* global_work_offset */,
 +-                       const size_t *   /* global_work_size */,
 +-                       const size_t *   /* local_work_size */,
 +-                       cl_uint          /* num_events_in_wait_list */,
 +-                       const cl_event * /* event_wait_list */,
 +-                       cl_event *       /* event */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueTask(cl_command_queue  /* command_queue */,
 +-              cl_kernel         /* kernel */,
 +-              cl_uint           /* num_events_in_wait_list */,
 +-              const cl_event *  /* event_wait_list */,
 +-              cl_event *        /* event */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueNativeKernel(cl_command_queue  /* command_queue */,
 +-					  void (CL_CALLBACK * /*user_func*/)(void *), 
 +-                      void *            /* args */,
 +-                      size_t            /* cb_args */, 
 +-                      cl_uint           /* num_mem_objects */,
 +-                      const cl_mem *    /* mem_list */,
 +-                      const void **     /* args_mem_loc */,
 +-                      cl_uint           /* num_events_in_wait_list */,
 +-                      const cl_event *  /* event_wait_list */,
 +-                      cl_event *        /* event */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueMarkerWithWaitList(cl_command_queue /* command_queue */,
 +-                            cl_uint           /* num_events_in_wait_list */,
 +-                            const cl_event *  /* event_wait_list */,
 +-                            cl_event *        /* event */) CL_API_SUFFIX__VERSION_1_2;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueBarrierWithWaitList(cl_command_queue /* command_queue */,
 +-                             cl_uint           /* num_events_in_wait_list */,
 +-                             const cl_event *  /* event_wait_list */,
 +-                             cl_event *        /* event */) CL_API_SUFFIX__VERSION_1_2;
 +-
 +-
 +-/* Extension function access
 +- *
 +- * Returns the extension function address for the given function name,
 +- * or NULL if a valid function can not be found.  The client must
 +- * check to make sure the address is not NULL, before using or 
 +- * calling the returned function address.
 +- */
 +-extern CL_API_ENTRY void * CL_API_CALL 
 +-clGetExtensionFunctionAddressForPlatform(cl_platform_id /* platform */,
 +-                                         const char *   /* func_name */) CL_API_SUFFIX__VERSION_1_2;
 +-    
 +-
 +-// Deprecated OpenCL 1.1 APIs
 +-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
 +-clCreateImage2D(cl_context              /* context */,
 +-                cl_mem_flags            /* flags */,
 +-                const cl_image_format * /* image_format */,
 +-                size_t                  /* image_width */,
 +-                size_t                  /* image_height */,
 +-                size_t                  /* image_row_pitch */, 
 +-                void *                  /* host_ptr */,
 +-                cl_int *                /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
 +-    
 +-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
 +-clCreateImage3D(cl_context              /* context */,
 +-                cl_mem_flags            /* flags */,
 +-                const cl_image_format * /* image_format */,
 +-                size_t                  /* image_width */, 
 +-                size_t                  /* image_height */,
 +-                size_t                  /* image_depth */, 
 +-                size_t                  /* image_row_pitch */, 
 +-                size_t                  /* image_slice_pitch */, 
 +-                void *                  /* host_ptr */,
 +-                cl_int *                /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
 +-    
 +-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
 +-clEnqueueMarker(cl_command_queue    /* command_queue */,
 +-                cl_event *          /* event */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
 +-    
 +-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
 +-clEnqueueWaitForEvents(cl_command_queue /* command_queue */,
 +-                        cl_uint          /* num_events */,
 +-                        const cl_event * /* event_list */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
 +-    
 +-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
 +-clEnqueueBarrier(cl_command_queue /* command_queue */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
 +-
 +-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
 +-clUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
 +-    
 +-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL
 +-clGetExtensionFunctionAddress(const char * /* func_name */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
 +-
 +-#ifdef __cplusplus
 +-}
 +-#endif
 +-
 +-#endif  /* __OPENCL_CL_H */
 +-
 ++#include_next <CL/cl.h>
- Index: beignet-0.1+git20130514+19e9c58/include/CL/cl_platform.h
++Index: beignet-0.1+git20130521+a7ea35c/include/CL/cl_platform.h
 +===================================================================
- --- beignet-0.1+git20130514+19e9c58.orig/include/CL/cl_platform.h	2013-05-14 20:04:50.338033844 +0200
- +++ beignet-0.1+git20130514+19e9c58/include/CL/cl_platform.h	2013-05-14 20:04:53.678033695 +0200
++--- beignet-0.1+git20130521+a7ea35c.orig/include/CL/cl_platform.h	2013-05-21 10:38:37.207948335 +0200
+++++ beignet-0.1+git20130521+a7ea35c/include/CL/cl_platform.h	2013-05-21 10:41:03.327941820 +0200
 +@@ -1,1254 +1 @@
 +-/**********************************************************************************
 +- * Copyright (c) 2008-2012 The Khronos Group Inc.
 +- *
 +- * Permission is hereby granted, free of charge, to any person obtaining a
 +- * copy of this software and/or associated documentation files (the
 +- * "Materials"), to deal in the Materials without restriction, including
 +- * without limitation the rights to use, copy, modify, merge, publish,
 +- * distribute, sublicense, and/or sell copies of the Materials, and to
 +- * permit persons to whom the Materials are furnished to do so, subject to
 +- * the following conditions:
 +- *
 +- * The above copyright notice and this permission notice shall be included
 +- * in all copies or substantial portions of the Materials.
 +- *
 +- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 +- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 +- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 +- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 +- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
 +- **********************************************************************************/
 +-
 +-/* $Revision: 11803 $ on $Date: 2010-06-25 10:02:12 -0700 (Fri, 25 Jun 2010) $ */
 +-
 +-#ifndef __CL_PLATFORM_H
 +-#define __CL_PLATFORM_H
 +-
 +-#ifdef __APPLE__
 +-    /* Contains #defines for AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER below */
 +-    #include <AvailabilityMacros.h>
 +-#endif
 +-
 +-#ifdef __cplusplus
 +-extern "C" {
 +-#endif
 +-
 +-#if defined(_WIN32)
 +-    #define CL_API_ENTRY
 +-    #define CL_API_CALL     __stdcall
 +-    #define CL_CALLBACK     __stdcall
 +-#else
 +-    #define CL_API_ENTRY
 +-    #define CL_API_CALL
 +-    #define CL_CALLBACK
 +-#endif
 +-
 +-#ifdef __APPLE__
 +-    #define CL_EXTENSION_WEAK_LINK       __attribute__((weak_import))
 +-    #define CL_API_SUFFIX__VERSION_1_0                  AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
 +-    #define CL_EXT_SUFFIX__VERSION_1_0                  CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER
 +-    #define CL_API_SUFFIX__VERSION_1_1                  AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
 +-    #define GCL_API_SUFFIX__VERSION_1_1                 AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
 +-    #define CL_EXT_SUFFIX__VERSION_1_1                  CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
 +-    #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED       CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_6_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_7
 +-    
 +-    #ifdef AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
 +-        #define CL_API_SUFFIX__VERSION_1_2              AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
 +-        #define GCL_API_SUFFIX__VERSION_1_2             AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
 +-        #define CL_EXT_SUFFIX__VERSION_1_2              CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_8_AND_LATER
 +-        #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
 +-        #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED   CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER_BUT_DEPRECATED_IN_MAC_OS_X_VERSION_10_8
 +-    #else
 +-        #warning  This path should never happen outside of internal operating system development.  AvailabilityMacros do not function correctly here!
 +-        #define CL_API_SUFFIX__VERSION_1_2              AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
 +-        #define GCL_API_SUFFIX__VERSION_1_2             AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
 +-        #define CL_EXT_SUFFIX__VERSION_1_2              CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
 +-        #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED   CL_EXTENSION_WEAK_LINK AVAILABLE_MAC_OS_X_VERSION_10_7_AND_LATER
 +-    #endif
 +-#else
 +-    #define CL_EXTENSION_WEAK_LINK  
 +-    #define CL_API_SUFFIX__VERSION_1_0
 +-    #define CL_EXT_SUFFIX__VERSION_1_0
 +-    #define CL_API_SUFFIX__VERSION_1_1
 +-    #define CL_EXT_SUFFIX__VERSION_1_1
 +-    #define CL_API_SUFFIX__VERSION_1_2
 +-    #define CL_EXT_SUFFIX__VERSION_1_2
 +-    
 +-    #ifdef __GNUC__
 +-        #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
 +-            #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
 +-            #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED    
 +-        #else
 +-            #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED __attribute__((deprecated))
 +-            #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED    
 +-        #endif
 +-    
 +-        #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
 +-            #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED    
 +-            #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED    
 +-        #else
 +-            #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED __attribute__((deprecated))
 +-            #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED    
 +-        #endif
 +-    #elif _WIN32
 +-        #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
 +-            #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED    
 +-            #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED    
 +-        #else
 +-            #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED 
 +-            #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED __declspec(deprecated)     
 +-        #endif
 +-    
 +-        #ifdef CL_USE_DEPRECATED_OPENCL_1_1_APIS
 +-            #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
 +-            #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED    
 +-        #else
 +-            #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED 
 +-            #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED __declspec(deprecated)     
 +-        #endif
 +-    #else
 +-        #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED
 +-        #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED
 +-    
 +-        #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED
 +-        #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED
 +-    #endif
 +-#endif
 +-
 +-#if (defined (_WIN32) && defined(_MSC_VER))
 +-
 +-/* scalar types  */
 +-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;
 +-
 +-typedef unsigned __int16        cl_half;
 +-typedef float                   cl_float;
 +-typedef double                  cl_double;
 +-
 +-/* Macro names and corresponding values defined by OpenCL */
 +-#define CL_CHAR_BIT         8
 +-#define CL_SCHAR_MAX        127
 +-#define CL_SCHAR_MIN        (-127-1)
 +-#define CL_CHAR_MAX         CL_SCHAR_MAX
 +-#define CL_CHAR_MIN         CL_SCHAR_MIN
 +-#define CL_UCHAR_MAX        255
 +-#define CL_SHRT_MAX         32767
 +-#define CL_SHRT_MIN         (-32767-1)
 +-#define CL_USHRT_MAX        65535
 +-#define CL_INT_MAX          2147483647
 +-#define CL_INT_MIN          (-2147483647-1)
 +-#define CL_UINT_MAX         0xffffffffU
 +-#define CL_LONG_MAX         ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
 +-#define CL_LONG_MIN         ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
 +-#define CL_ULONG_MAX        ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
 +-
 +-#define CL_FLT_DIG          6
 +-#define CL_FLT_MANT_DIG     24
 +-#define CL_FLT_MAX_10_EXP   +38
 +-#define CL_FLT_MAX_EXP      +128
 +-#define CL_FLT_MIN_10_EXP   -37
 +-#define CL_FLT_MIN_EXP      -125
 +-#define CL_FLT_RADIX        2
 +-#define CL_FLT_MAX          340282346638528859811704183484516925440.0f
 +-#define CL_FLT_MIN          1.175494350822287507969e-38f
 +-#define CL_FLT_EPSILON      0x1.0p-23f
 +-
 +-#define CL_DBL_DIG          15
 +-#define CL_DBL_MANT_DIG     53
 +-#define CL_DBL_MAX_10_EXP   +308
 +-#define CL_DBL_MAX_EXP      +1024
 +-#define CL_DBL_MIN_10_EXP   -307
 +-#define CL_DBL_MIN_EXP      -1021
 +-#define CL_DBL_RADIX        2
 +-#define CL_DBL_MAX          179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.0
 +-#define CL_DBL_MIN          2.225073858507201383090e-308
 +-#define CL_DBL_EPSILON      2.220446049250313080847e-16
 +-
 +-#define  CL_M_E             2.718281828459045090796
 +-#define  CL_M_LOG2E         1.442695040888963387005
 +-#define  CL_M_LOG10E        0.434294481903251816668
 +-#define  CL_M_LN2           0.693147180559945286227
 +-#define  CL_M_LN10          2.302585092994045901094
 +-#define  CL_M_PI            3.141592653589793115998
 +-#define  CL_M_PI_2          1.570796326794896557999
 +-#define  CL_M_PI_4          0.785398163397448278999
 +-#define  CL_M_1_PI          0.318309886183790691216
 +-#define  CL_M_2_PI          0.636619772367581382433
 +-#define  CL_M_2_SQRTPI      1.128379167095512558561
 +-#define  CL_M_SQRT2         1.414213562373095145475
 +-#define  CL_M_SQRT1_2       0.707106781186547572737
 +-
 +-#define  CL_M_E_F           2.71828174591064f
 +-#define  CL_M_LOG2E_F       1.44269502162933f
 +-#define  CL_M_LOG10E_F      0.43429449200630f
 +-#define  CL_M_LN2_F         0.69314718246460f
 +-#define  CL_M_LN10_F        2.30258512496948f
 +-#define  CL_M_PI_F          3.14159274101257f
 +-#define  CL_M_PI_2_F        1.57079637050629f
 +-#define  CL_M_PI_4_F        0.78539818525314f
 +-#define  CL_M_1_PI_F        0.31830987334251f
 +-#define  CL_M_2_PI_F        0.63661974668503f
 +-#define  CL_M_2_SQRTPI_F    1.12837922573090f
 +-#define  CL_M_SQRT2_F       1.41421353816986f
 +-#define  CL_M_SQRT1_2_F     0.70710676908493f
 +-
 +-#define CL_NAN              (CL_INFINITY - CL_INFINITY)
 +-#define CL_HUGE_VALF        ((cl_float) 1e50)
 +-#define CL_HUGE_VAL         ((cl_double) 1e500)
 +-#define CL_MAXFLOAT         CL_FLT_MAX
 +-#define CL_INFINITY         CL_HUGE_VALF
 +-
 +-#else
 +-
 +-#include <stdint.h>
 +-
 +-/* scalar types  */
 +-typedef int8_t          cl_char;
 +-typedef uint8_t         cl_uchar;
 +-typedef int16_t         cl_short    __attribute__((aligned(2)));
 +-typedef uint16_t        cl_ushort   __attribute__((aligned(2)));
 +-typedef int32_t         cl_int      __attribute__((aligned(4)));
 +-typedef uint32_t        cl_uint     __attribute__((aligned(4)));
 +-typedef int64_t         cl_long     __attribute__((aligned(8)));
 +-typedef uint64_t        cl_ulong    __attribute__((aligned(8)));
 +-
 +-typedef uint16_t        cl_half     __attribute__((aligned(2)));
 +-typedef float           cl_float    __attribute__((aligned(4)));
 +-typedef double          cl_double   __attribute__((aligned(8)));
 +-
 +-/* Macro names and corresponding values defined by OpenCL */
 +-#define CL_CHAR_BIT         8
 +-#define CL_SCHAR_MAX        127
 +-#define CL_SCHAR_MIN        (-127-1)
 +-#define CL_CHAR_MAX         CL_SCHAR_MAX
 +-#define CL_CHAR_MIN         CL_SCHAR_MIN
 +-#define CL_UCHAR_MAX        255
 +-#define CL_SHRT_MAX         32767
 +-#define CL_SHRT_MIN         (-32767-1)
 +-#define CL_USHRT_MAX        65535
 +-#define CL_INT_MAX          2147483647
 +-#define CL_INT_MIN          (-2147483647-1)
 +-#define CL_UINT_MAX         0xffffffffU
 +-#define CL_LONG_MAX         ((cl_long) 0x7FFFFFFFFFFFFFFFLL)
 +-#define CL_LONG_MIN         ((cl_long) -0x7FFFFFFFFFFFFFFFLL - 1LL)
 +-#define CL_ULONG_MAX        ((cl_ulong) 0xFFFFFFFFFFFFFFFFULL)
 +-
 +-#define CL_FLT_DIG          6
 +-#define CL_FLT_MANT_DIG     24
 +-#define CL_FLT_MAX_10_EXP   +38
 +-#define CL_FLT_MAX_EXP      +128
 +-#define CL_FLT_MIN_10_EXP   -37
 +-#define CL_FLT_MIN_EXP      -125
 +-#define CL_FLT_RADIX        2
 +-#define CL_FLT_MAX          0x1.fffffep127f
 +-#define CL_FLT_MIN          0x1.0p-126f
 +-#define CL_FLT_EPSILON      0x1.0p-23f
 +-
 +-#define CL_DBL_DIG          15
 +-#define CL_DBL_MANT_DIG     53
 +-#define CL_DBL_MAX_10_EXP   +308
 +-#define CL_DBL_MAX_EXP      +1024
 +-#define CL_DBL_MIN_10_EXP   -307
 +-#define CL_DBL_MIN_EXP      -1021
 +-#define CL_DBL_RADIX        2
 +-#define CL_DBL_MAX          0x1.fffffffffffffp1023
 +-#define CL_DBL_MIN          0x1.0p-1022
 +-#define CL_DBL_EPSILON      0x1.0p-52
 +-
 +-#define  CL_M_E             2.718281828459045090796
 +-#define  CL_M_LOG2E         1.442695040888963387005
 +-#define  CL_M_LOG10E        0.434294481903251816668
 +-#define  CL_M_LN2           0.693147180559945286227
 +-#define  CL_M_LN10          2.302585092994045901094
 +-#define  CL_M_PI            3.141592653589793115998
 +-#define  CL_M_PI_2          1.570796326794896557999
 +-#define  CL_M_PI_4          0.785398163397448278999
 +-#define  CL_M_1_PI          0.318309886183790691216
 +-#define  CL_M_2_PI          0.636619772367581382433
 +-#define  CL_M_2_SQRTPI      1.128379167095512558561
 +-#define  CL_M_SQRT2         1.414213562373095145475
 +-#define  CL_M_SQRT1_2       0.707106781186547572737
 +-
 +-#define  CL_M_E_F           2.71828174591064f
 +-#define  CL_M_LOG2E_F       1.44269502162933f
 +-#define  CL_M_LOG10E_F      0.43429449200630f
 +-#define  CL_M_LN2_F         0.69314718246460f
 +-#define  CL_M_LN10_F        2.30258512496948f
 +-#define  CL_M_PI_F          3.14159274101257f
 +-#define  CL_M_PI_2_F        1.57079637050629f
 +-#define  CL_M_PI_4_F        0.78539818525314f
 +-#define  CL_M_1_PI_F        0.31830987334251f
 +-#define  CL_M_2_PI_F        0.63661974668503f
 +-#define  CL_M_2_SQRTPI_F    1.12837922573090f
 +-#define  CL_M_SQRT2_F       1.41421353816986f
 +-#define  CL_M_SQRT1_2_F     0.70710676908493f
 +-
 +-#if defined( __GNUC__ )
 +-   #define CL_HUGE_VALF     __builtin_huge_valf()
 +-   #define CL_HUGE_VAL      __builtin_huge_val()
 +-   #define CL_NAN           __builtin_nanf( "" )
 +-#else
 +-   #define CL_HUGE_VALF     ((cl_float) 1e50)
 +-   #define CL_HUGE_VAL      ((cl_double) 1e500)
 +-   float nanf( const char * );
 +-   #define CL_NAN           nanf( "" )  
 +-#endif
 +-#define CL_MAXFLOAT         CL_FLT_MAX
 +-#define CL_INFINITY         CL_HUGE_VALF
 +-
 +-#endif
 +-
 +-#include <stddef.h>
 +-
 +-/* Mirror types to GL types. Mirror types allow us to avoid deciding which 87s to load based on whether we are using GL or GLES here. */
 +-typedef unsigned int cl_GLuint;
 +-typedef int          cl_GLint;
 +-typedef unsigned int cl_GLenum;
 +-
 +-/*
 +- * Vector types 
 +- *
 +- *  Note:   OpenCL requires that all types be naturally aligned. 
 +- *          This means that vector types must be naturally aligned.
 +- *          For example, a vector of four floats must be aligned to
 +- *          a 16 byte boundary (calculated as 4 * the natural 4-byte 
 +- *          alignment of the float).  The alignment qualifiers here
 +- *          will only function properly if your compiler supports them
 +- *          and if you don't actively work to defeat them.  For example,
 +- *          in order for a cl_float4 to be 16 byte aligned in a struct,
 +- *          the start of the struct must itself be 16-byte aligned. 
 +- *
 +- *          Maintaining proper alignment is the user's responsibility.
 +- */
 +-
 +-/* Define basic vector types */
 +-#if defined( __VEC__ )
 +-   #include <altivec.h>   /* may be omitted depending on compiler. AltiVec spec provides no way to detect whether the header is required. */
 +-   typedef vector unsigned char     __cl_uchar16;
 +-   typedef vector signed char       __cl_char16;
 +-   typedef vector unsigned short    __cl_ushort8;
 +-   typedef vector signed short      __cl_short8;
 +-   typedef vector unsigned int      __cl_uint4;
 +-   typedef vector signed int        __cl_int4;
 +-   typedef vector float             __cl_float4;
 +-   #define  __CL_UCHAR16__  1
 +-   #define  __CL_CHAR16__   1
 +-   #define  __CL_USHORT8__  1
 +-   #define  __CL_SHORT8__   1
 +-   #define  __CL_UINT4__    1
 +-   #define  __CL_INT4__     1
 +-   #define  __CL_FLOAT4__   1
 +-#endif
 +-
 +-#if defined( __SSE__ )
 +-    #if defined( __MINGW64__ )
 +-        #include <intrin.h>
 +-    #else
 +-        #include <xmmintrin.h>
 +-    #endif
 +-    #if defined( __GNUC__ )
 +-        typedef float __cl_float4   __attribute__((vector_size(16)));
 +-    #else
 +-        typedef __m128 __cl_float4;
 +-    #endif
 +-    #define __CL_FLOAT4__   1
 +-#endif
 +-
 +-#if defined( __SSE2__ )
 +-    #if defined( __MINGW64__ )
 +-        #include <intrin.h>
 +-    #else
 +-        #include <emmintrin.h>
 +-    #endif
 +-    #if defined( __GNUC__ )
 +-        typedef cl_uchar    __cl_uchar16    __attribute__((vector_size(16)));
 +-        typedef cl_char     __cl_char16     __attribute__((vector_size(16)));
 +-        typedef cl_ushort   __cl_ushort8    __attribute__((vector_size(16)));
 +-        typedef cl_short    __cl_short8     __attribute__((vector_size(16)));
 +-        typedef cl_uint     __cl_uint4      __attribute__((vector_size(16)));
 +-        typedef cl_int      __cl_int4       __attribute__((vector_size(16)));
 +-        typedef cl_ulong    __cl_ulong2     __attribute__((vector_size(16)));
 +-        typedef cl_long     __cl_long2      __attribute__((vector_size(16)));
 +-        typedef cl_double   __cl_double2    __attribute__((vector_size(16)));
 +-    #else
 +-        typedef __m128i __cl_uchar16;
 +-        typedef __m128i __cl_char16;
 +-        typedef __m128i __cl_ushort8;
 +-        typedef __m128i __cl_short8;
 +-        typedef __m128i __cl_uint4;
 +-        typedef __m128i __cl_int4;
 +-        typedef __m128i __cl_ulong2;
 +-        typedef __m128i __cl_long2;
 +-        typedef __m128d __cl_double2;
 +-    #endif
 +-    #define __CL_UCHAR16__  1
 +-    #define __CL_CHAR16__   1
 +-    #define __CL_USHORT8__  1
 +-    #define __CL_SHORT8__   1
 +-    #define __CL_INT4__     1
 +-    #define __CL_UINT4__    1
 +-    #define __CL_ULONG2__   1
 +-    #define __CL_LONG2__    1
 +-    #define __CL_DOUBLE2__  1
 +-#endif
 +-
 +-#if defined( __MMX__ )
 +-    #include <mmintrin.h>
 +-    #if defined( __GNUC__ )
 +-        typedef cl_uchar    __cl_uchar8     __attribute__((vector_size(8)));
 +-        typedef cl_char     __cl_char8      __attribute__((vector_size(8)));
 +-        typedef cl_ushort   __cl_ushort4    __attribute__((vector_size(8)));
 +-        typedef cl_short    __cl_short4     __attribute__((vector_size(8)));
 +-        typedef cl_uint     __cl_uint2      __attribute__((vector_size(8)));
 +-        typedef cl_int      __cl_int2       __attribute__((vector_size(8)));
 +-        typedef cl_ulong    __cl_ulong1     __attribute__((vector_size(8)));
 +-        typedef cl_long     __cl_long1      __attribute__((vector_size(8)));
 +-        typedef cl_float    __cl_float2     __attribute__((vector_size(8)));
 +-    #else
 +-        typedef __m64       __cl_uchar8;
 +-        typedef __m64       __cl_char8;
 +-        typedef __m64       __cl_ushort4;
 +-        typedef __m64       __cl_short4;
 +-        typedef __m64       __cl_uint2;
 +-        typedef __m64       __cl_int2;
 +-        typedef __m64       __cl_ulong1;
 +-        typedef __m64       __cl_long1;
 +-        typedef __m64       __cl_float2;
 +-    #endif
 +-    #define __CL_UCHAR8__   1
 +-    #define __CL_CHAR8__    1
 +-    #define __CL_USHORT4__  1
 +-    #define __CL_SHORT4__   1
 +-    #define __CL_INT2__     1
 +-    #define __CL_UINT2__    1
 +-    #define __CL_ULONG1__   1
 +-    #define __CL_LONG1__    1
 +-    #define __CL_FLOAT2__   1
 +-#endif
 +-
 +-#if defined( __AVX__ )
 +-    #if defined( __MINGW64__ )
 +-        #include <intrin.h>
 +-    #else
 +-        #include <immintrin.h> 
 +-    #endif
 +-    #if defined( __GNUC__ )
 +-        typedef cl_float    __cl_float8     __attribute__((vector_size(32)));
 +-        typedef cl_double   __cl_double4    __attribute__((vector_size(32)));
 +-    #else
 +-        typedef __m256      __cl_float8;
 +-        typedef __m256d     __cl_double4;
 +-    #endif
 +-    #define __CL_FLOAT8__   1
 +-    #define __CL_DOUBLE4__  1
 +-#endif
 +-
 +-/* Define alignment keys */
 +-#if defined( __GNUC__ )
 +-    #define CL_ALIGNED(_x)          __attribute__ ((aligned(_x)))
 +-#elif defined( _WIN32) && (_MSC_VER)
 +-    /* Alignment keys neutered on windows because MSVC can't swallow function arguments with alignment requirements     */
 +-    /* http://msdn.microsoft.com/en-us/library/373ak2y1%28VS.71%29.aspx                                                 */
 +-    /* #include <crtdefs.h>                                                                                             */
 +-    /* #define CL_ALIGNED(_x)          _CRT_ALIGN(_x)                                                                   */
 +-    #define CL_ALIGNED(_x)
 +-#else
 +-   #warning  Need to implement some method to align data here
 +-   #define  CL_ALIGNED(_x)
 +-#endif
 +-
 +-/* Indicate whether .xyzw, .s0123 and .hi.lo are supported */
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-    /* .xyzw and .s0123...{f|F} are supported */
 +-    #define CL_HAS_NAMED_VECTOR_FIELDS 1
 +-    /* .hi and .lo are supported */
 +-    #define CL_HAS_HI_LO_VECTOR_FIELDS 1
 +-#endif
 +-
 +-/* Define cl_vector types */
 +-
 +-/* ---- cl_charn ---- */
 +-typedef union
 +-{
 +-    cl_char  CL_ALIGNED(2) s[2];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_char  x, y; };
 +-   __extension__ struct{ cl_char  s0, s1; };
 +-   __extension__ struct{ cl_char  lo, hi; };
 +-#endif
 +-#if defined( __CL_CHAR2__) 
 +-    __cl_char2     v2;
 +-#endif
 +-}cl_char2;
 +-
 +-typedef union
 +-{
 +-    cl_char  CL_ALIGNED(4) s[4];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_char  x, y, z, w; };
 +-   __extension__ struct{ cl_char  s0, s1, s2, s3; };
 +-   __extension__ struct{ cl_char2 lo, hi; };
 +-#endif
 +-#if defined( __CL_CHAR2__) 
 +-    __cl_char2     v2[2];
 +-#endif
 +-#if defined( __CL_CHAR4__) 
 +-    __cl_char4     v4;
 +-#endif
 +-}cl_char4;
 +-
 +-/* cl_char3 is identical in size, alignment and behavior to cl_char4. See section 6.1.5. */
 +-typedef  cl_char4  cl_char3;
 +-
 +-typedef union
 +-{
 +-    cl_char   CL_ALIGNED(8) s[8];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_char  x, y, z, w; };
 +-   __extension__ struct{ cl_char  s0, s1, s2, s3, s4, s5, s6, s7; };
 +-   __extension__ struct{ cl_char4 lo, hi; };
 +-#endif
 +-#if defined( __CL_CHAR2__) 
 +-    __cl_char2     v2[4];
 +-#endif
 +-#if defined( __CL_CHAR4__) 
 +-    __cl_char4     v4[2];
 +-#endif
 +-#if defined( __CL_CHAR8__ )
 +-    __cl_char8     v8;
 +-#endif
 +-}cl_char8;
 +-
 +-typedef union
 +-{
 +-    cl_char  CL_ALIGNED(16) s[16];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_char  x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
 +-   __extension__ struct{ cl_char  s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
 +-   __extension__ struct{ cl_char8 lo, hi; };
 +-#endif
 +-#if defined( __CL_CHAR2__) 
 +-    __cl_char2     v2[8];
 +-#endif
 +-#if defined( __CL_CHAR4__) 
 +-    __cl_char4     v4[4];
 +-#endif
 +-#if defined( __CL_CHAR8__ )
 +-    __cl_char8     v8[2];
 +-#endif
 +-#if defined( __CL_CHAR16__ )
 +-    __cl_char16    v16;
 +-#endif
 +-}cl_char16;
 +-
 +-
 +-/* ---- cl_ucharn ---- */
 +-typedef union
 +-{
 +-    cl_uchar  CL_ALIGNED(2) s[2];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_uchar  x, y; };
 +-   __extension__ struct{ cl_uchar  s0, s1; };
 +-   __extension__ struct{ cl_uchar  lo, hi; };
 +-#endif
 +-#if defined( __cl_uchar2__) 
 +-    __cl_uchar2     v2;
 +-#endif
 +-}cl_uchar2;
 +-
 +-typedef union
 +-{
 +-    cl_uchar  CL_ALIGNED(4) s[4];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_uchar  x, y, z, w; };
 +-   __extension__ struct{ cl_uchar  s0, s1, s2, s3; };
 +-   __extension__ struct{ cl_uchar2 lo, hi; };
 +-#endif
 +-#if defined( __CL_UCHAR2__) 
 +-    __cl_uchar2     v2[2];
 +-#endif
 +-#if defined( __CL_UCHAR4__) 
 +-    __cl_uchar4     v4;
 +-#endif
 +-}cl_uchar4;
 +-
 +-/* cl_uchar3 is identical in size, alignment and behavior to cl_uchar4. See section 6.1.5. */
 +-typedef  cl_uchar4  cl_uchar3;
 +-
 +-typedef union
 +-{
 +-    cl_uchar   CL_ALIGNED(8) s[8];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_uchar  x, y, z, w; };
 +-   __extension__ struct{ cl_uchar  s0, s1, s2, s3, s4, s5, s6, s7; };
 +-   __extension__ struct{ cl_uchar4 lo, hi; };
 +-#endif
 +-#if defined( __CL_UCHAR2__) 
 +-    __cl_uchar2     v2[4];
 +-#endif
 +-#if defined( __CL_UCHAR4__) 
 +-    __cl_uchar4     v4[2];
 +-#endif
 +-#if defined( __CL_UCHAR8__ )
 +-    __cl_uchar8     v8;
 +-#endif
 +-}cl_uchar8;
 +-
 +-typedef union
 +-{
 +-    cl_uchar  CL_ALIGNED(16) s[16];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_uchar  x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
 +-   __extension__ struct{ cl_uchar  s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
 +-   __extension__ struct{ cl_uchar8 lo, hi; };
 +-#endif
 +-#if defined( __CL_UCHAR2__) 
 +-    __cl_uchar2     v2[8];
 +-#endif
 +-#if defined( __CL_UCHAR4__) 
 +-    __cl_uchar4     v4[4];
 +-#endif
 +-#if defined( __CL_UCHAR8__ )
 +-    __cl_uchar8     v8[2];
 +-#endif
 +-#if defined( __CL_UCHAR16__ )
 +-    __cl_uchar16    v16;
 +-#endif
 +-}cl_uchar16;
 +-
 +-
 +-/* ---- cl_shortn ---- */
 +-typedef union
 +-{
 +-    cl_short  CL_ALIGNED(4) s[2];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_short  x, y; };
 +-   __extension__ struct{ cl_short  s0, s1; };
 +-   __extension__ struct{ cl_short  lo, hi; };
 +-#endif
 +-#if defined( __CL_SHORT2__) 
 +-    __cl_short2     v2;
 +-#endif
 +-}cl_short2;
 +-
 +-typedef union
 +-{
 +-    cl_short  CL_ALIGNED(8) s[4];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_short  x, y, z, w; };
 +-   __extension__ struct{ cl_short  s0, s1, s2, s3; };
 +-   __extension__ struct{ cl_short2 lo, hi; };
 +-#endif
 +-#if defined( __CL_SHORT2__) 
 +-    __cl_short2     v2[2];
 +-#endif
 +-#if defined( __CL_SHORT4__) 
 +-    __cl_short4     v4;
 +-#endif
 +-}cl_short4;
 +-
 +-/* cl_short3 is identical in size, alignment and behavior to cl_short4. See section 6.1.5. */
 +-typedef  cl_short4  cl_short3;
 +-
 +-typedef union
 +-{
 +-    cl_short   CL_ALIGNED(16) s[8];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_short  x, y, z, w; };
 +-   __extension__ struct{ cl_short  s0, s1, s2, s3, s4, s5, s6, s7; };
 +-   __extension__ struct{ cl_short4 lo, hi; };
 +-#endif
 +-#if defined( __CL_SHORT2__) 
 +-    __cl_short2     v2[4];
 +-#endif
 +-#if defined( __CL_SHORT4__) 
 +-    __cl_short4     v4[2];
 +-#endif
 +-#if defined( __CL_SHORT8__ )
 +-    __cl_short8     v8;
 +-#endif
 +-}cl_short8;
 +-
 +-typedef union
 +-{
 +-    cl_short  CL_ALIGNED(32) s[16];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_short  x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
 +-   __extension__ struct{ cl_short  s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
 +-   __extension__ struct{ cl_short8 lo, hi; };
 +-#endif
 +-#if defined( __CL_SHORT2__) 
 +-    __cl_short2     v2[8];
 +-#endif
 +-#if defined( __CL_SHORT4__) 
 +-    __cl_short4     v4[4];
 +-#endif
 +-#if defined( __CL_SHORT8__ )
 +-    __cl_short8     v8[2];
 +-#endif
 +-#if defined( __CL_SHORT16__ )
 +-    __cl_short16    v16;
 +-#endif
 +-}cl_short16;
 +-
 +-
 +-/* ---- cl_ushortn ---- */
 +-typedef union
 +-{
 +-    cl_ushort  CL_ALIGNED(4) s[2];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_ushort  x, y; };
 +-   __extension__ struct{ cl_ushort  s0, s1; };
 +-   __extension__ struct{ cl_ushort  lo, hi; };
 +-#endif
 +-#if defined( __CL_USHORT2__) 
 +-    __cl_ushort2     v2;
 +-#endif
 +-}cl_ushort2;
 +-
 +-typedef union
 +-{
 +-    cl_ushort  CL_ALIGNED(8) s[4];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_ushort  x, y, z, w; };
 +-   __extension__ struct{ cl_ushort  s0, s1, s2, s3; };
 +-   __extension__ struct{ cl_ushort2 lo, hi; };
 +-#endif
 +-#if defined( __CL_USHORT2__) 
 +-    __cl_ushort2     v2[2];
 +-#endif
 +-#if defined( __CL_USHORT4__) 
 +-    __cl_ushort4     v4;
 +-#endif
 +-}cl_ushort4;
 +-
 +-/* cl_ushort3 is identical in size, alignment and behavior to cl_ushort4. See section 6.1.5. */
 +-typedef  cl_ushort4  cl_ushort3;
 +-
 +-typedef union
 +-{
 +-    cl_ushort   CL_ALIGNED(16) s[8];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_ushort  x, y, z, w; };
 +-   __extension__ struct{ cl_ushort  s0, s1, s2, s3, s4, s5, s6, s7; };
 +-   __extension__ struct{ cl_ushort4 lo, hi; };
 +-#endif
 +-#if defined( __CL_USHORT2__) 
 +-    __cl_ushort2     v2[4];
 +-#endif
 +-#if defined( __CL_USHORT4__) 
 +-    __cl_ushort4     v4[2];
 +-#endif
 +-#if defined( __CL_USHORT8__ )
 +-    __cl_ushort8     v8;
 +-#endif
 +-}cl_ushort8;
 +-
 +-typedef union
 +-{
 +-    cl_ushort  CL_ALIGNED(32) s[16];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_ushort  x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
 +-   __extension__ struct{ cl_ushort  s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
 +-   __extension__ struct{ cl_ushort8 lo, hi; };
 +-#endif
 +-#if defined( __CL_USHORT2__) 
 +-    __cl_ushort2     v2[8];
 +-#endif
 +-#if defined( __CL_USHORT4__) 
 +-    __cl_ushort4     v4[4];
 +-#endif
 +-#if defined( __CL_USHORT8__ )
 +-    __cl_ushort8     v8[2];
 +-#endif
 +-#if defined( __CL_USHORT16__ )
 +-    __cl_ushort16    v16;
 +-#endif
 +-}cl_ushort16;
 +-
 +-/* ---- cl_intn ---- */
 +-typedef union
 +-{
 +-    cl_int  CL_ALIGNED(8) s[2];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_int  x, y; };
 +-   __extension__ struct{ cl_int  s0, s1; };
 +-   __extension__ struct{ cl_int  lo, hi; };
 +-#endif
 +-#if defined( __CL_INT2__) 
 +-    __cl_int2     v2;
 +-#endif
 +-}cl_int2;
 +-
 +-typedef union
 +-{
 +-    cl_int  CL_ALIGNED(16) s[4];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_int  x, y, z, w; };
 +-   __extension__ struct{ cl_int  s0, s1, s2, s3; };
 +-   __extension__ struct{ cl_int2 lo, hi; };
 +-#endif
 +-#if defined( __CL_INT2__) 
 +-    __cl_int2     v2[2];
 +-#endif
 +-#if defined( __CL_INT4__) 
 +-    __cl_int4     v4;
 +-#endif
 +-}cl_int4;
 +-
 +-/* cl_int3 is identical in size, alignment and behavior to cl_int4. See section 6.1.5. */
 +-typedef  cl_int4  cl_int3;
 +-
 +-typedef union
 +-{
 +-    cl_int   CL_ALIGNED(32) s[8];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_int  x, y, z, w; };
 +-   __extension__ struct{ cl_int  s0, s1, s2, s3, s4, s5, s6, s7; };
 +-   __extension__ struct{ cl_int4 lo, hi; };
 +-#endif
 +-#if defined( __CL_INT2__) 
 +-    __cl_int2     v2[4];
 +-#endif
 +-#if defined( __CL_INT4__) 
 +-    __cl_int4     v4[2];
 +-#endif
 +-#if defined( __CL_INT8__ )
 +-    __cl_int8     v8;
 +-#endif
 +-}cl_int8;
 +-
 +-typedef union
 +-{
 +-    cl_int  CL_ALIGNED(64) s[16];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_int  x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
 +-   __extension__ struct{ cl_int  s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
 +-   __extension__ struct{ cl_int8 lo, hi; };
 +-#endif
 +-#if defined( __CL_INT2__) 
 +-    __cl_int2     v2[8];
 +-#endif
 +-#if defined( __CL_INT4__) 
 +-    __cl_int4     v4[4];
 +-#endif
 +-#if defined( __CL_INT8__ )
 +-    __cl_int8     v8[2];
 +-#endif
 +-#if defined( __CL_INT16__ )
 +-    __cl_int16    v16;
 +-#endif
 +-}cl_int16;
 +-
 +-
 +-/* ---- cl_uintn ---- */
 +-typedef union
 +-{
 +-    cl_uint  CL_ALIGNED(8) s[2];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_uint  x, y; };
 +-   __extension__ struct{ cl_uint  s0, s1; };
 +-   __extension__ struct{ cl_uint  lo, hi; };
 +-#endif
 +-#if defined( __CL_UINT2__) 
 +-    __cl_uint2     v2;
 +-#endif
 +-}cl_uint2;
 +-
 +-typedef union
 +-{
 +-    cl_uint  CL_ALIGNED(16) s[4];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_uint  x, y, z, w; };
 +-   __extension__ struct{ cl_uint  s0, s1, s2, s3; };
 +-   __extension__ struct{ cl_uint2 lo, hi; };
 +-#endif
 +-#if defined( __CL_UINT2__) 
 +-    __cl_uint2     v2[2];
 +-#endif
 +-#if defined( __CL_UINT4__) 
 +-    __cl_uint4     v4;
 +-#endif
 +-}cl_uint4;
 +-
 +-/* cl_uint3 is identical in size, alignment and behavior to cl_uint4. See section 6.1.5. */
 +-typedef  cl_uint4  cl_uint3;
 +-
 +-typedef union
 +-{
 +-    cl_uint   CL_ALIGNED(32) s[8];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_uint  x, y, z, w; };
 +-   __extension__ struct{ cl_uint  s0, s1, s2, s3, s4, s5, s6, s7; };
 +-   __extension__ struct{ cl_uint4 lo, hi; };
 +-#endif
 +-#if defined( __CL_UINT2__) 
 +-    __cl_uint2     v2[4];
 +-#endif
 +-#if defined( __CL_UINT4__) 
 +-    __cl_uint4     v4[2];
 +-#endif
 +-#if defined( __CL_UINT8__ )
 +-    __cl_uint8     v8;
 +-#endif
 +-}cl_uint8;
 +-
 +-typedef union
 +-{
 +-    cl_uint  CL_ALIGNED(64) s[16];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_uint  x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
 +-   __extension__ struct{ cl_uint  s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
 +-   __extension__ struct{ cl_uint8 lo, hi; };
 +-#endif
 +-#if defined( __CL_UINT2__) 
 +-    __cl_uint2     v2[8];
 +-#endif
 +-#if defined( __CL_UINT4__) 
 +-    __cl_uint4     v4[4];
 +-#endif
 +-#if defined( __CL_UINT8__ )
 +-    __cl_uint8     v8[2];
 +-#endif
 +-#if defined( __CL_UINT16__ )
 +-    __cl_uint16    v16;
 +-#endif
 +-}cl_uint16;
 +-
 +-/* ---- cl_longn ---- */
 +-typedef union
 +-{
 +-    cl_long  CL_ALIGNED(16) s[2];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_long  x, y; };
 +-   __extension__ struct{ cl_long  s0, s1; };
 +-   __extension__ struct{ cl_long  lo, hi; };
 +-#endif
 +-#if defined( __CL_LONG2__) 
 +-    __cl_long2     v2;
 +-#endif
 +-}cl_long2;
 +-
 +-typedef union
 +-{
 +-    cl_long  CL_ALIGNED(32) s[4];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_long  x, y, z, w; };
 +-   __extension__ struct{ cl_long  s0, s1, s2, s3; };
 +-   __extension__ struct{ cl_long2 lo, hi; };
 +-#endif
 +-#if defined( __CL_LONG2__) 
 +-    __cl_long2     v2[2];
 +-#endif
 +-#if defined( __CL_LONG4__) 
 +-    __cl_long4     v4;
 +-#endif
 +-}cl_long4;
 +-
 +-/* cl_long3 is identical in size, alignment and behavior to cl_long4. See section 6.1.5. */
 +-typedef  cl_long4  cl_long3;
 +-
 +-typedef union
 +-{
 +-    cl_long   CL_ALIGNED(64) s[8];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_long  x, y, z, w; };
 +-   __extension__ struct{ cl_long  s0, s1, s2, s3, s4, s5, s6, s7; };
 +-   __extension__ struct{ cl_long4 lo, hi; };
 +-#endif
 +-#if defined( __CL_LONG2__) 
 +-    __cl_long2     v2[4];
 +-#endif
 +-#if defined( __CL_LONG4__) 
 +-    __cl_long4     v4[2];
 +-#endif
 +-#if defined( __CL_LONG8__ )
 +-    __cl_long8     v8;
 +-#endif
 +-}cl_long8;
 +-
 +-typedef union
 +-{
 +-    cl_long  CL_ALIGNED(128) s[16];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_long  x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
 +-   __extension__ struct{ cl_long  s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
 +-   __extension__ struct{ cl_long8 lo, hi; };
 +-#endif
 +-#if defined( __CL_LONG2__) 
 +-    __cl_long2     v2[8];
 +-#endif
 +-#if defined( __CL_LONG4__) 
 +-    __cl_long4     v4[4];
 +-#endif
 +-#if defined( __CL_LONG8__ )
 +-    __cl_long8     v8[2];
 +-#endif
 +-#if defined( __CL_LONG16__ )
 +-    __cl_long16    v16;
 +-#endif
 +-}cl_long16;
 +-
 +-
 +-/* ---- cl_ulongn ---- */
 +-typedef union
 +-{
 +-    cl_ulong  CL_ALIGNED(16) s[2];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_ulong  x, y; };
 +-   __extension__ struct{ cl_ulong  s0, s1; };
 +-   __extension__ struct{ cl_ulong  lo, hi; };
 +-#endif
 +-#if defined( __CL_ULONG2__) 
 +-    __cl_ulong2     v2;
 +-#endif
 +-}cl_ulong2;
 +-
 +-typedef union
 +-{
 +-    cl_ulong  CL_ALIGNED(32) s[4];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_ulong  x, y, z, w; };
 +-   __extension__ struct{ cl_ulong  s0, s1, s2, s3; };
 +-   __extension__ struct{ cl_ulong2 lo, hi; };
 +-#endif
 +-#if defined( __CL_ULONG2__) 
 +-    __cl_ulong2     v2[2];
 +-#endif
 +-#if defined( __CL_ULONG4__) 
 +-    __cl_ulong4     v4;
 +-#endif
 +-}cl_ulong4;
 +-
 +-/* cl_ulong3 is identical in size, alignment and behavior to cl_ulong4. See section 6.1.5. */
 +-typedef  cl_ulong4  cl_ulong3;
 +-
 +-typedef union
 +-{
 +-    cl_ulong   CL_ALIGNED(64) s[8];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_ulong  x, y, z, w; };
 +-   __extension__ struct{ cl_ulong  s0, s1, s2, s3, s4, s5, s6, s7; };
 +-   __extension__ struct{ cl_ulong4 lo, hi; };
 +-#endif
 +-#if defined( __CL_ULONG2__) 
 +-    __cl_ulong2     v2[4];
 +-#endif
 +-#if defined( __CL_ULONG4__) 
 +-    __cl_ulong4     v4[2];
 +-#endif
 +-#if defined( __CL_ULONG8__ )
 +-    __cl_ulong8     v8;
 +-#endif
 +-}cl_ulong8;
 +-
 +-typedef union
 +-{
 +-    cl_ulong  CL_ALIGNED(128) s[16];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_ulong  x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
 +-   __extension__ struct{ cl_ulong  s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
 +-   __extension__ struct{ cl_ulong8 lo, hi; };
 +-#endif
 +-#if defined( __CL_ULONG2__) 
 +-    __cl_ulong2     v2[8];
 +-#endif
 +-#if defined( __CL_ULONG4__) 
 +-    __cl_ulong4     v4[4];
 +-#endif
 +-#if defined( __CL_ULONG8__ )
 +-    __cl_ulong8     v8[2];
 +-#endif
 +-#if defined( __CL_ULONG16__ )
 +-    __cl_ulong16    v16;
 +-#endif
 +-}cl_ulong16;
 +-
 +-
 +-/* --- cl_floatn ---- */
 +-
 +-typedef union
 +-{
 +-    cl_float  CL_ALIGNED(8) s[2];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_float  x, y; };
 +-   __extension__ struct{ cl_float  s0, s1; };
 +-   __extension__ struct{ cl_float  lo, hi; };
 +-#endif
 +-#if defined( __CL_FLOAT2__) 
 +-    __cl_float2     v2;
 +-#endif
 +-}cl_float2;
 +-
 +-typedef union
 +-{
 +-    cl_float  CL_ALIGNED(16) s[4];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_float   x, y, z, w; };
 +-   __extension__ struct{ cl_float   s0, s1, s2, s3; };
 +-   __extension__ struct{ cl_float2  lo, hi; };
 +-#endif
 +-#if defined( __CL_FLOAT2__) 
 +-    __cl_float2     v2[2];
 +-#endif
 +-#if defined( __CL_FLOAT4__) 
 +-    __cl_float4     v4;
 +-#endif
 +-}cl_float4;
 +-
 +-/* cl_float3 is identical in size, alignment and behavior to cl_float4. See section 6.1.5. */
 +-typedef  cl_float4  cl_float3;
 +-
 +-typedef union
 +-{
 +-    cl_float   CL_ALIGNED(32) s[8];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_float   x, y, z, w; };
 +-   __extension__ struct{ cl_float   s0, s1, s2, s3, s4, s5, s6, s7; };
 +-   __extension__ struct{ cl_float4  lo, hi; };
 +-#endif
 +-#if defined( __CL_FLOAT2__) 
 +-    __cl_float2     v2[4];
 +-#endif
 +-#if defined( __CL_FLOAT4__) 
 +-    __cl_float4     v4[2];
 +-#endif
 +-#if defined( __CL_FLOAT8__ )
 +-    __cl_float8     v8;
 +-#endif
 +-}cl_float8;
 +-
 +-typedef union
 +-{
 +-    cl_float  CL_ALIGNED(64) s[16];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_float  x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
 +-   __extension__ struct{ cl_float  s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
 +-   __extension__ struct{ cl_float8 lo, hi; };
 +-#endif
 +-#if defined( __CL_FLOAT2__) 
 +-    __cl_float2     v2[8];
 +-#endif
 +-#if defined( __CL_FLOAT4__) 
 +-    __cl_float4     v4[4];
 +-#endif
 +-#if defined( __CL_FLOAT8__ )
 +-    __cl_float8     v8[2];
 +-#endif
 +-#if defined( __CL_FLOAT16__ )
 +-    __cl_float16    v16;
 +-#endif
 +-}cl_float16;
 +-
 +-/* --- cl_doublen ---- */
 +-
 +-typedef union
 +-{
 +-    cl_double  CL_ALIGNED(16) s[2];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_double  x, y; };
 +-   __extension__ struct{ cl_double s0, s1; };
 +-   __extension__ struct{ cl_double lo, hi; };
 +-#endif
 +-#if defined( __CL_DOUBLE2__) 
 +-    __cl_double2     v2;
 +-#endif
 +-}cl_double2;
 +-
 +-typedef union
 +-{
 +-    cl_double  CL_ALIGNED(32) s[4];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_double  x, y, z, w; };
 +-   __extension__ struct{ cl_double  s0, s1, s2, s3; };
 +-   __extension__ struct{ cl_double2 lo, hi; };
 +-#endif
 +-#if defined( __CL_DOUBLE2__) 
 +-    __cl_double2     v2[2];
 +-#endif
 +-#if defined( __CL_DOUBLE4__) 
 +-    __cl_double4     v4;
 +-#endif
 +-}cl_double4;
 +-
 +-/* cl_double3 is identical in size, alignment and behavior to cl_double4. See section 6.1.5. */
 +-typedef  cl_double4  cl_double3;
 +-
 +-typedef union
 +-{
 +-    cl_double   CL_ALIGNED(64) s[8];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_double  x, y, z, w; };
 +-   __extension__ struct{ cl_double  s0, s1, s2, s3, s4, s5, s6, s7; };
 +-   __extension__ struct{ cl_double4 lo, hi; };
 +-#endif
 +-#if defined( __CL_DOUBLE2__) 
 +-    __cl_double2     v2[4];
 +-#endif
 +-#if defined( __CL_DOUBLE4__) 
 +-    __cl_double4     v4[2];
 +-#endif
 +-#if defined( __CL_DOUBLE8__ )
 +-    __cl_double8     v8;
 +-#endif
 +-}cl_double8;
 +-
 +-typedef union
 +-{
 +-    cl_double  CL_ALIGNED(128) s[16];
 +-#if defined( __GNUC__) && ! defined( __STRICT_ANSI__ )
 +-   __extension__ struct{ cl_double  x, y, z, w, __spacer4, __spacer5, __spacer6, __spacer7, __spacer8, __spacer9, sa, sb, sc, sd, se, sf; };
 +-   __extension__ struct{ cl_double  s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, sA, sB, sC, sD, sE, sF; };
 +-   __extension__ struct{ cl_double8 lo, hi; };
 +-#endif
 +-#if defined( __CL_DOUBLE2__) 
 +-    __cl_double2     v2[8];
 +-#endif
 +-#if defined( __CL_DOUBLE4__) 
 +-    __cl_double4     v4[4];
 +-#endif
 +-#if defined( __CL_DOUBLE8__ )
 +-    __cl_double8     v8[2];
 +-#endif
 +-#if defined( __CL_DOUBLE16__ )
 +-    __cl_double16    v16;
 +-#endif
 +-}cl_double16;
 +-
 +-/* Macro to facilitate debugging 
 +- * Usage:
 +- *   Place CL_PROGRAM_STRING_DEBUG_INFO on the line before the first line of your source. 
 +- *   The first line ends with:   CL_PROGRAM_STRING_DEBUG_INFO \"
 +- *   Each line thereafter of OpenCL C source must end with: \n\
 +- *   The last line ends in ";
 +- *
 +- *   Example:
 +- *
 +- *   const char *my_program = CL_PROGRAM_STRING_DEBUG_INFO "\
 +- *   kernel void foo( int a, float * b )             \n\
 +- *   {                                               \n\
 +- *      // my comment                                \n\
 +- *      *b[ get_global_id(0)] = a;                   \n\
 +- *   }                                               \n\
 +- *   ";
 +- *
 +- * This should correctly set up the line, (column) and file information for your source 
 +- * string so you can do source level debugging.
 +- */
 +-#define  __CL_STRINGIFY( _x )               # _x
 +-#define  _CL_STRINGIFY( _x )                __CL_STRINGIFY( _x )
 +-#define  CL_PROGRAM_STRING_DEBUG_INFO       "#line "  _CL_STRINGIFY(__LINE__) " \"" __FILE__ "\" \n\n" 
 +-  
 +-#ifdef __cplusplus
 +-}
 +-#endif
 +-
 +-#endif  /* __CL_PLATFORM_H  */
 ++#include_next <CL/cl_platform.h>
- Index: beignet-0.1+git20130514+19e9c58/include/CL/cl_gl.h
++Index: beignet-0.1+git20130521+a7ea35c/include/CL/cl_gl.h
 +===================================================================
- --- beignet-0.1+git20130514+19e9c58.orig/include/CL/cl_gl.h	2013-05-14 20:04:50.338033844 +0200
- +++ beignet-0.1+git20130514+19e9c58/include/CL/cl_gl.h	2013-05-14 20:04:53.678033695 +0200
++--- beignet-0.1+git20130521+a7ea35c.orig/include/CL/cl_gl.h	2013-05-21 10:38:37.207948335 +0200
+++++ beignet-0.1+git20130521+a7ea35c/include/CL/cl_gl.h	2013-05-21 10:41:03.327941820 +0200
 +@@ -1,161 +1 @@
 +-/**********************************************************************************
 +- * Copyright (c) 2008 - 2012 The Khronos Group Inc.
 +- *
 +- * Permission is hereby granted, free of charge, to any person obtaining a
 +- * copy of this software and/or associated documentation files (the
 +- * "Materials"), to deal in the Materials without restriction, including
 +- * without limitation the rights to use, copy, modify, merge, publish,
 +- * distribute, sublicense, and/or sell copies of the Materials, and to
 +- * permit persons to whom the Materials are furnished to do so, subject to
 +- * the following conditions:
 +- *
 +- * The above copyright notice and this permission notice shall be included
 +- * in all copies or substantial portions of the Materials.
 +- *
 +- * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 +- * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 +- * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
 +- * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
 +- * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
 +- * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
 +- * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
 +- **********************************************************************************/
 +-
 +-#ifndef __OPENCL_CL_GL_H
 +-#define __OPENCL_CL_GL_H
 +-
 +-#ifdef __APPLE__
 +-#include <OpenCL/cl.h>
 +-#else
 +-#include <CL/cl.h>
 +-#endif	
 +-
 +-#ifdef __cplusplus
 +-extern "C" {
 +-#endif
 +-
 +-typedef cl_uint     cl_gl_object_type;
 +-typedef cl_uint     cl_gl_texture_info;
 +-typedef cl_uint     cl_gl_platform_info;
 +-typedef struct __GLsync *cl_GLsync;
 +-
 +-/* cl_gl_object_type = 0x2000 - 0x200F enum values are currently taken           */
 +-#define CL_GL_OBJECT_BUFFER                     0x2000
 +-#define CL_GL_OBJECT_TEXTURE2D                  0x2001
 +-#define CL_GL_OBJECT_TEXTURE3D                  0x2002
 +-#define CL_GL_OBJECT_RENDERBUFFER               0x2003
 +-#define CL_GL_OBJECT_TEXTURE2D_ARRAY            0x200E
 +-#define CL_GL_OBJECT_TEXTURE1D                  0x200F
 +-#define CL_GL_OBJECT_TEXTURE1D_ARRAY            0x2010
 +-#define CL_GL_OBJECT_TEXTURE_BUFFER             0x2011
 +-
 +-/* cl_gl_texture_info           */
 +-#define CL_GL_TEXTURE_TARGET                    0x2004
 +-#define CL_GL_MIPMAP_LEVEL                      0x2005
 +-
 +-
 +-extern CL_API_ENTRY cl_mem CL_API_CALL
 +-clCreateFromGLBuffer(cl_context     /* context */,
 +-                     cl_mem_flags   /* flags */,
 +-                     cl_GLuint      /* bufobj */,
 +-                     int *          /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_mem CL_API_CALL
 +-clCreateFromGLTexture(cl_context      /* context */,
 +-                      cl_mem_flags    /* flags */,
 +-                      cl_GLenum       /* target */,
 +-                      cl_GLint        /* miplevel */,
 +-                      cl_GLuint       /* texture */,
 +-                      cl_int *        /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;
 +-    
 +-extern CL_API_ENTRY cl_mem CL_API_CALL
 +-clCreateFromGLRenderbuffer(cl_context   /* context */,
 +-                           cl_mem_flags /* flags */,
 +-                           cl_GLuint    /* renderbuffer */,
 +-                           cl_int *     /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetGLObjectInfo(cl_mem                /* memobj */,
 +-                  cl_gl_object_type *   /* gl_object_type */,
 +-                  cl_GLuint *           /* gl_object_name */) CL_API_SUFFIX__VERSION_1_0;
 +-                  
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetGLTextureInfo(cl_mem               /* memobj */,
 +-                   cl_gl_texture_info   /* param_name */,
 +-                   size_t               /* param_value_size */,
 +-                   void *               /* param_value */,
 +-                   size_t *             /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueAcquireGLObjects(cl_command_queue      /* command_queue */,
 +-                          cl_uint               /* num_objects */,
 +-                          const cl_mem *        /* mem_objects */,
 +-                          cl_uint               /* num_events_in_wait_list */,
 +-                          const cl_event *      /* event_wait_list */,
 +-                          cl_event *            /* event */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clEnqueueReleaseGLObjects(cl_command_queue      /* command_queue */,
 +-                          cl_uint               /* num_objects */,
 +-                          const cl_mem *        /* mem_objects */,
 +-                          cl_uint               /* num_events_in_wait_list */,
 +-                          const cl_event *      /* event_wait_list */,
 +-                          cl_event *            /* event */) CL_API_SUFFIX__VERSION_1_0;
 +-
 +-
 +-// Deprecated OpenCL 1.1 APIs
 +-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
 +-clCreateFromGLTexture2D(cl_context      /* context */,
 +-                        cl_mem_flags    /* flags */,
 +-                        cl_GLenum       /* target */,
 +-                        cl_GLint        /* miplevel */,
 +-                        cl_GLuint       /* texture */,
 +-                        cl_int *        /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
 +-    
 +-extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
 +-clCreateFromGLTexture3D(cl_context      /* context */,
 +-                        cl_mem_flags    /* flags */,
 +-                        cl_GLenum       /* target */,
 +-                        cl_GLint        /* miplevel */,
 +-                        cl_GLuint       /* texture */,
 +-                        cl_int *        /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
 +-    
 +-/* cl_khr_gl_sharing extension  */
 +-    
 +-#define cl_khr_gl_sharing 1
 +-    
 +-typedef cl_uint     cl_gl_context_info;
 +-    
 +-/* Additional Error Codes  */
 +-#define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR  -1000
 +-    
 +-/* cl_gl_context_info  */
 +-#define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR    0x2006
 +-#define CL_DEVICES_FOR_GL_CONTEXT_KHR           0x2007
 +-    
 +-/* Additional cl_context_properties  */
 +-#define CL_GL_CONTEXT_KHR                       0x2008
 +-#define CL_EGL_DISPLAY_KHR                      0x2009
 +-#define CL_GLX_DISPLAY_KHR                      0x200A
 +-#define CL_WGL_HDC_KHR                          0x200B
 +-#define CL_CGL_SHAREGROUP_KHR                   0x200C
 +-    
 +-extern CL_API_ENTRY cl_int CL_API_CALL
 +-clGetGLContextInfoKHR(const cl_context_properties * /* properties */,
 +-                      cl_gl_context_info            /* param_name */,
 +-                      size_t                        /* param_value_size */,
 +-                      void *                        /* param_value */,
 +-                      size_t *                      /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
 +-    
 +-typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)(
 +-    const cl_context_properties * properties,
 +-    cl_gl_context_info            param_name,
 +-    size_t                        param_value_size,
 +-    void *                        param_value,
 +-    size_t *                      param_value_size_ret);
 +-
 +-#ifdef __cplusplus
 +-}
 +-#endif
 +-
 +-#endif  /* __OPENCL_CL_GL_H */
 ++#include_next <CL/cl_gl.h>
diff --cc debian/patches/private
index 0000000,0000000..81f26a0
new file mode 100644
--- /dev/null
+++ b/debian/patches/private
@@@ -1,0 -1,0 +1,35 @@@
++Description: Install as private library
++Author: Simon Richter <sjr at debian.org>
++Last-Update: 2013-05-21
++
++Index: beignet-0.1+git20130521+a7ea35c/backend/src/CMakeLists.txt
++===================================================================
++--- beignet-0.1+git20130521+a7ea35c.orig/backend/src/CMakeLists.txt	2013-05-21 10:38:35.571948408 +0200
+++++ beignet-0.1+git20130521+a7ea35c/backend/src/CMakeLists.txt	2013-05-21 10:44:32.000000000 +0200
++@@ -120,6 +120,6 @@
++                       ${CMAKE_THREAD_LIBS_INIT}
++                       ${CMAKE_DL_LIBS})
++ 
++-install (TARGETS gbe LIBRARY DESTINATION lib)
+++install (TARGETS gbe LIBRARY DESTINATION lib/beignet)
++ install (FILES backend/program.h DESTINATION include/gen)
++ 
++Index: beignet-0.1+git20130521+a7ea35c/src/CMakeLists.txt
++===================================================================
++--- beignet-0.1+git20130521+a7ea35c.orig/src/CMakeLists.txt	2013-05-21 10:38:35.571948408 +0200
+++++ beignet-0.1+git20130521+a7ea35c/src/CMakeLists.txt	2013-05-21 10:45:20.603930350 +0200
++@@ -47,6 +47,8 @@
++ 
++ SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bsymbolic")
++ 
+++SET(CMAKE_INSTALL_RPATH /usr/lib/beignet)
+++
++ link_directories (${LLVM_LIBRARY_DIR})
++ add_library(cl SHARED ${OPENCL_SRC})
++ target_link_libraries(
++@@ -60,4 +62,4 @@
++                       ${OPENGL_LIBRARIES}
++                       ${OPTIONAL_EGL_LIBRARY}
++                       ${OPTIONAL_GBM_LIBRARY})
++-install (TARGETS cl LIBRARY DESTINATION lib)
+++install (TARGETS cl LIBRARY DESTINATION lib/beignet)
diff --cc debian/patches/series
index 2d64b61,0000000..f33ca92
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,21 -1,0 +1,11 @@@
++debug
++flags
 +khronos
- verbose
- missing-header
- soname
- respect-flags
- const64
++private
 +0001-Generate-all-supported-as_-functions.patch
 +0002-Define-all-convert_-functions.patch
 +0003-Add-long-and-ulong-types-to-conversions.patch
- 0004-Make-libgbm-optional-without-EGL-support.patch
- 0005-Define-clamp-value-lower-upper.patch
- 0006-Add-clGetDeviceInfo-.-CL_BUILT_IN_KERNELS.patch
- 0007-Correct-type-of-device-properties.patch
- 0008-Update-gitignore-files.patch
- 0009-GBE-refine-the-sampler-implementation-to-comply-with.patch
- 0010-CL-Support-kernel-side-defined-samplers.patch
- 0011-utests-Add-one-test-cases-for-sampler-support.patch
- 0012-GBE-remove-sampler-address-space.patch
- 0013-GBE-add-scalar-register-support-in-loadImmInstructio.patch
- 0014-GBE-concentrate-all-samplers-allocation-at-compile-t.patch
- 0015-GBE-Runtime-Optimize-Sample-TypedWrite-instruction.patch
++0004-Add-vector-argument-test-case.patch
++0005-Add-more-get-image-info-functions.patch
++0006-utests-extent-get_image_size-cases-to-other-informat.patch
++0007-Change-clang-system-call-to-libclang-api-call.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/beignet.git



More information about the Pkg-opencl-devel mailing list