ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/OpenCL/h_extract
(Generate patch)

Comparing OpenCL/h_extract (file contents):
Revision 1.5 by root, Sat May 5 13:07:19 2012 UTC vs.
Revision 1.6 by root, Sat May 5 13:30:07 2012 UTC

2 2
3# extracts various bits of data form OpenCL heder files, which are expected to 3# extracts various bits of data form OpenCL heder files, which are expected to
4# be in CL/ 4# be in CL/
5 5
6# constants 6# constants
7(
8 echo '// autogenerated by h_extract'
7cat CL/cl.h CL/cl_ext.h CL/cl_gl.h CL/cl_gl_ext.h CL/cl_d3d10.h | 9 cat CL/cl.h CL/cl_ext.h CL/cl_gl.h CL/cl_gl_ext.h CL/cl_d3d10.h |
8 perl -ne 'print "#ifdef CL_$1\nconst_iv($1)\n#endif\n" if /^#define CL_(\S+)/' >constiv.h 10 perl -ne 'print "const_iv($1)\n" if /^#define CL_(\S+)/'
11) >constiv.h
9 12
10# constants that look like enum values 13# constants that look like enum values
14(
15 echo '// autogenerated by h_extract'
11cat CL/cl.h CL/cl_ext.h CL/cl_gl.h CL/cl_gl_ext.h CL/cl_d3d10.h | 16 cat CL/cl.h CL/cl_ext.h CL/cl_gl.h CL/cl_gl_ext.h CL/cl_d3d10.h |
12 perl -ne 'print "#ifdef CL_$1\nconst_iv($1)\n#endif\n" if /^#define CL_(\S+)\s+0x[0-9a-fA-F]{4}/' >enumstr.h 17 perl -ne 'print "const_iv($1)\n" if /^#define CL_(\S+)\s+0x[0-9a-fA-F]{4}/'
18) >enumstr.h
19
20# error codes
21(
22 echo '// autogenerated by h_extract'
23 echo "const_iv(SUCCESS)"
24 cat CL/cl.h CL/cl_ext.h CL/cl_gl.h CL/cl_gl_ext.h CL/cl_d3d10.h |
25 perl -ne 'print "const_iv($1)\n" if !/#define CL_BUILD_(?:NONE|ERROR|IN_PROGRESS)/ && /^#define CL_(\S+)\s+-\d+\s*$/'
26) >errstr.h
27
28# default constant values to -1
29(
30 echo '// autogenerated by h_extract'
31 cat constiv.h enumstr.h errstr.h |
32 perl -ne '/const_iv\((.*)\)/ or next; print "#ifndef CL_$1\n#define CL_$1 -1\n#endif\n"'
33) >default.h
13 34
14# *glGet*Info 35# *glGet*Info
15( 36(
16 <CL/cl.hpp perl -ne 'print "$1\n" if /^\s*F\((.*)\)\s*\\?\s*$/' 37 <CL/cl.hpp perl -ne 'print "$1\n" if /^\s*F\((.*)\)\s*\\?\s*$/'
17 # DEVICE_DOUBLE_FP_CONFIG 38 # DEVICE_DOUBLE_FP_CONFIG
37cl_kernel_arg_info, CL_KERNEL_ARG_TYPE_QUALIFIER, cl_kernel_arg_type_qualifier 58cl_kernel_arg_info, CL_KERNEL_ARG_TYPE_QUALIFIER, cl_kernel_arg_type_qualifier
38cl_kernel_arg_info, CL_KERNEL_ARG_NAME, STRING_CLASS 59cl_kernel_arg_info, CL_KERNEL_ARG_NAME, STRING_CLASS
39EOF 60EOF
40) >getinfo.txt 61) >getinfo.txt
41 62
42# error codes
43(
44 echo "const_iv(SUCCESS)"
45 cat CL/cl.h CL/cl_ext.h CL/cl_gl.h CL/cl_gl_ext.h CL/cl_d3d10.h |
46 perl -ne 'print "#ifdef CL_$1\nconst_iv($1)\n#endif\n" if !/#define CL_BUILD_(?:NONE|ERROR|IN_PROGRESS)/ && /^#define CL_(\S+)\s+-\d+\s*$/'
47) >errstr.h
48

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines