… | |
… | |
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 | |
12 | perl -ne 'print "const_iv($1)\n" if /^#define CL_(\S+)/' |
12 | perl -ne 'print "const_iv($1)\n" if /^#define CL_(\S+)/' |
|
|
13 | cat CL/cl_platform.h | |
|
|
14 | perl -ne 'print "const_iv($1)\n" if /^#define CL_(\S+)\s+[^.]+\s*$/' | |
|
|
15 | sort | uniq | |
|
|
16 | perl -ne 'print unless /const_iv\((?:MAXFLOAT|INFINITY|NAN|HUGE_VALF?)\)/' |
13 | ) >constiv.h |
17 | ) >constiv.h |
|
|
18 | |
|
|
19 | # fp constants |
|
|
20 | ( |
|
|
21 | echo '// autogenerated by h_extract' |
|
|
22 | cat CL/cl_platform.h | |
|
|
23 | perl -ne 'print "const_nv($1)\n" if /^#define\s+CL_(\S+)\s+.*\..*\s*$/' |
|
|
24 | echo "const_nv(MAXFLOAT)" |
|
|
25 | echo "const_nv(INFINITY)" |
|
|
26 | echo "const_nv(HUGE_VAL)" |
|
|
27 | echo "const_nv(HUGE_VALF)" |
|
|
28 | ) >constnv.h |
14 | |
29 | |
15 | # constants that look like enum values |
30 | # constants that look like enum values |
16 | ( |
31 | ( |
17 | echo '// autogenerated by h_extract' |
32 | echo '// autogenerated by h_extract' |
18 | cat $ALL_H | |
33 | cat $ALL_H | |
… | |
… | |
30 | # default constant values to -1 |
45 | # default constant values to -1 |
31 | ( |
46 | ( |
32 | echo '// autogenerated by h_extract' |
47 | echo '// autogenerated by h_extract' |
33 | cat constiv.h | |
48 | cat constiv.h | |
34 | 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 -1\n#endif\n"' |
35 | ) | sort >default.h |
50 | ) >default.h |
36 | |
51 | |
37 | # *glGet*Info |
52 | # *glGet*Info |
38 | ( |
53 | ( |
39 | <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*$/' |
40 | # DEVICE_DOUBLE_FP_CONFIG |
55 | # DEVICE_DOUBLE_FP_CONFIG |