Implement a pyton script to auto generate those builtin vector functions.
authorZhigang Gong <zhigang.gong@linux.intel.com>
Wed, 17 Jul 2013 12:36:36 +0000 (20:36 +0800)
committerZhigang Gong <zhigang.gong@linux.intel.com>
Wed, 24 Jul 2013 03:50:18 +0000 (11:50 +0800)
commitb7f29a35f22333eaa778638d0930df0461619bf8
tree42c19b90702b63a038f073b17c2f48979db55a40
parente21251674cfd31228ac91e9bd99403524d67a5e9
Implement a pyton script to auto generate those builtin vector functions.

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.

Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Reviewed-by: He Junyan <junyan.he@inbox.com>
Reviewed-by: Simon Richter <Simon.Richter@hogyros.de>
backend/src/builtin_vector_proto.def [new file with mode: 0644]
backend/src/gen_builtin_vector.py [new file with mode: 0755]
backend/src/ocl_stdlib.h