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

Comparing OpenCL/h_extract (file contents):
Revision 1.9 by root, Sat May 5 14:49:52 2012 UTC vs.
Revision 1.12 by root, Mon May 7 01:00:31 2012 UTC

1#!/bin/sh 1#!/bin/sh
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
6ALL_H="CL/cl.h CL/cl_ext.h CL/cl_gl.h CL/cl_gl_ext.h CL11/cl_d3d9.h CL/cl_d3d10.h CL12/cl_d3d11.h CL/cl_dx9_media_sharing.h" 6ALL_H="CL/cl.h CL/cl_ext.h CL/cl_gl.h CL/cl_gl_ext.h CL/cl_d3d10.h CL12/cl_d3d11.h CL/cl_dx9_media_sharing.h"
7 7
8# constants 8# constants
9( 9(
10 echo '// autogenerated by h_extract' 10 echo '// autogenerated by h_extract'
11 cat $ALL_H | 11 cat $ALL_H |
40 echo "const_iv(SUCCESS)" 40 echo "const_iv(SUCCESS)"
41 cat $ALL_H | 41 cat $ALL_H |
42 perl -ne 'print "const_iv($1)\n" if !/#define CL_BUILD_(?:NONE|ERROR|IN_PROGRESS)/ && /^#define CL_(\S+)\s+-\d+\s*$/' 42 perl -ne 'print "const_iv($1)\n" if !/#define CL_BUILD_(?:NONE|ERROR|IN_PROGRESS)/ && /^#define CL_(\S+)\s+-\d+\s*$/'
43) >errstr.h 43) >errstr.h
44 44
45# default constant values to -1 45# default constant values to 0
46( 46(
47 echo '// autogenerated by h_extract' 47 echo '// autogenerated by h_extract'
48 cat constiv.h | 48 cat constiv.h |
49 perl -ne '/const_iv\((.*)\)/ or next; print "#ifndef CL_$1\n#define CL_$1 -1\n#endif\n"' 49 perl -ne '/const_iv\((.*)\)/ or next; print "#ifndef CL_$1\n#define CL_$1 0\n#endif\n"'
50) >default.h 50) >default.h
51 51
52# *glGet*Info 52# *glGet*Info
53( 53(
54 <CL/cl.hpp perl -ne 'print "$1\n" if /^\s*F\((.*)\)\s*\\?\s*$/' 54 <CL/cl.hpp perl -ne 'print "$1\n" if /^\s*F\((.*)\)\s*\\?\s*$/'
73cl_kernel_arg_info, CL_KERNEL_ARG_ACCESS_QUALIFIER, cl_kernel_arg_access_qualifier 73cl_kernel_arg_info, CL_KERNEL_ARG_ACCESS_QUALIFIER, cl_kernel_arg_access_qualifier
74cl_kernel_arg_info, CL_KERNEL_ARG_TYPE_NAME, STRING_CLASS 74cl_kernel_arg_info, CL_KERNEL_ARG_TYPE_NAME, STRING_CLASS
75cl_kernel_arg_info, CL_KERNEL_ARG_TYPE_QUALIFIER, cl_kernel_arg_type_qualifier 75cl_kernel_arg_info, CL_KERNEL_ARG_TYPE_QUALIFIER, cl_kernel_arg_type_qualifier
76cl_kernel_arg_info, CL_KERNEL_ARG_NAME, STRING_CLASS 76cl_kernel_arg_info, CL_KERNEL_ARG_NAME, STRING_CLASS
77EOF 77EOF
78) | sort >getinfo.txt 78) >getinfo.txt
79 79

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines