[Beignet] [PATCH] Generate most of the vector builtin functions automatically
Zhigang Gong
zhigang.gong at linux.intel.com
Fri Jul 19 02:41:07 PDT 2013
Hi,
As Beignet is using the SOA model, and we need to lower down all
the vector builtin functions to the scalar version. This type of
thing is ideal to use a script to generate all the code according
to the OpenCL's spec. I just copy/paste most of the prototypes from
the OpenCL spec and put them into builtin_vector_proto.def. Then
I wrote a python script to parse the spec and generate all the
vector inline functions and I removed all existing duplicate
functions in ocl_stdlib.h.
Now we have three parts of auto-generated code, the as/convert and
this vector related functions. The amount of these three parts are
much more than the other code in ocl_stdlib.h. To make the maintainance
easier, I split the auto-generated code out of the ocl_stdlib.h, and
refine the build process to generate one blob header file at build time.
Then I also made a new patch based on Junyan's PCH patch to accelerate
the cl kernel build speed.
As this patchset is handling tons of those auto-generated code, the
patch is relatively big. I just attached the compressed tar ball rather
than embed them directly.
Waiting for your comments. Thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: autogen-vector-patchset.tgz
Type: application/x-gtar-compressed
Size: 121543 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/beignet/attachments/20130719/c8bce231/attachment-0001.bin>
More information about the Beignet
mailing list