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

Comparing OpenCL/h_extract (file contents):
Revision 1.1 by root, Sun Nov 20 01:09:48 2011 UTC vs.
Revision 1.5 by root, Sat May 5 13:07:19 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
7cat CL/cl.h CL/cl_ext.h | 7cat 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
11cat 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
15(
14<CL/cl.hpp perl -ne 'print "$1\n" if /^\s*F\((.*)\)\s*\\?\s*$/' >getinfo.txt 16 <CL/cl.hpp perl -ne 'print "$1\n" if /^\s*F\((.*)\)\s*\\?\s*$/'
15# DEVICE_DOUBLE_FP_CONFIG 17 # DEVICE_DOUBLE_FP_CONFIG
16# DEVICE_HALF_FP_CONFIG 18 # DEVICE_HALF_FP_CONFIG
17# PLATFORM_ICD_SUFFIX_KHR 19 # PLATFORM_ICD_SUFFIX_KHR
18# PLATFORM_NOT_FOUND_KHR 20 # PLATFORM_NOT_FOUND_KHR
19# DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 21 # DEVICE_COMPUTE_CAPABILITY_MAJOR_NV
20# DEVICE_COMPUTE_CAPABILITY_MINOR_NV 22 # DEVICE_COMPUTE_CAPABILITY_MINOR_NV
21# DEVICE_REGISTERS_PER_BLOCK_NV 23 # DEVICE_REGISTERS_PER_BLOCK_NV
22# DEVICE_WARP_SIZE_NV 24 # DEVICE_WARP_SIZE_NV
23# DEVICE_GPU_OVERLAP_NV 25 # DEVICE_GPU_OVERLAP_NV
24# DEVICE_KERNEL_EXEC_TIMEOUT_NV 26 # DEVICE_KERNEL_EXEC_TIMEOUT_NV
25# DEVICE_INTEGRATED_MEMORY_NV 27 # DEVICE_INTEGRATED_MEMORY_NV
26# DEVICE_PROFILING_TIMER_OFFSET_AMD 28 # DEVICE_PROFILING_TIMER_OFFSET_AMD
27 29
30 cat <<EOF
31cl_program_build_info, CL_PROGRAM_BINARY_TYPE, cl_program_binary_type
32cl_gl_texture_info, CL_GL_TEXTURE_TARGET, cl_GLenum
33cl_gl_texture_info, CL_GL_MIPMAP_LEVEL, cl_GLint
34cl_kernel_arg_info, CL_KERNEL_ARG_ADDRESS_QUALIFIER, cl_kernel_arg_address_qualifier
35cl_kernel_arg_info, CL_KERNEL_ARG_ACCESS_QUALIFIER, cl_kernel_arg_access_qualifier
36cl_kernel_arg_info, CL_KERNEL_ARG_TYPE_NAME, STRING_CLASS
37cl_kernel_arg_info, CL_KERNEL_ARG_TYPE_QUALIFIER, cl_kernel_arg_type_qualifier
38cl_kernel_arg_info, CL_KERNEL_ARG_NAME, STRING_CLASS
39EOF
40) >getinfo.txt
41
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