… | |
… | |
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 | cat CL/cl.h CL/cl_ext.h | |
7 | 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 "const_iv($1)\n" if /^#define CL_(\S+)/' >constiv.h |
8 | perl -ne 'print "#ifdef CL_$1\nconst_iv($1)\n#endif\n" if /^#define CL_(\S+)/' >constiv.h |
9 | |
9 | |
10 | # constants that look like enum values |
10 | # constants that look like enum values |
|
|
11 | cat CL/cl.h CL/cl_ext.h CL/cl_gl.h CL/cl_gl_ext.h CL/cl_d3d10.h | |
11 | <CL/cl.h perl -ne 'print "const_iv($1)\n" if /^#define CL_(\S+)\s+0x[0-9a-fA-F]{4}/' >enumstr.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 |
12 | |
13 | |
13 | # *glGet*Info |
14 | # *glGet*Info |
14 | <CL/cl.hpp perl -ne 'print "$1\n" if /^\s*F\((.*)\)\s*\\?\s*$/' >getinfo.txt |
15 | <CL/cl.hpp perl -ne 'print "$1\n" if /^\s*F\((.*)\)\s*\\?\s*$/' >getinfo.txt |
15 | # DEVICE_DOUBLE_FP_CONFIG |
16 | # DEVICE_DOUBLE_FP_CONFIG |
16 | # DEVICE_HALF_FP_CONFIG |
17 | # DEVICE_HALF_FP_CONFIG |
… | |
… | |
23 | # DEVICE_GPU_OVERLAP_NV |
24 | # DEVICE_GPU_OVERLAP_NV |
24 | # DEVICE_KERNEL_EXEC_TIMEOUT_NV |
25 | # DEVICE_KERNEL_EXEC_TIMEOUT_NV |
25 | # DEVICE_INTEGRATED_MEMORY_NV |
26 | # DEVICE_INTEGRATED_MEMORY_NV |
26 | # DEVICE_PROFILING_TIMER_OFFSET_AMD |
27 | # DEVICE_PROFILING_TIMER_OFFSET_AMD |
27 | |
28 | |
|
|
29 | # error codes |
|
|
30 | ( |
|
|
31 | echo "const_iv(SUCCESS)" |
|
|
32 | cat CL/cl.h CL/cl_ext.h CL/cl_gl.h CL/cl_gl_ext.h CL/cl_d3d10.h | |
|
|
33 | 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*$/' |
|
|
34 | ) >errstr.h |
|
|
35 | |