title: How to get kernel information
body: <p>I want to get following information about compiled OpenCL kernels - list of types, params order (if possible - with memory and access classifiers). Kernels are build from the sources during run time of app.</p>
  
  <p>Actually, in OpenCL 1.2 already exists appropriate functions for such query - <code>clGetKernelArgInfo</code>, but due to project restrictions I have to find way to achieve such functionality using pure OpenCL 1.0 without any extensions.</p>
  
  <p>At present, I am thinking about three approaches:</p>
  
  <ol>
  <li>write simple Ansi C parser to get info about kernel's signature directly from OpenCL kernel's source</li>
  <li>using macros in OpenCL code to mark kernel's arguments for simple in-app parsing (by extending <a href="http://pimiddy.wordpress.com/2012/02/19/assigning-opencl-parameters-by-name/" rel="nofollow">this idea</a>)</li>
  <li>define list of the most possible combination of kernel's arguments using macros and class-helpers (due to my project's constrains it is possible to operate under 3-5 common arg-types)</li>
  </ol>
  
  <p>My question: is there any other ways to get info about compiled kernel?</p>
  
  <p>I want to use this info to decrease amount of OpenCL routine in client code by encapsulate calls to <code>clCreateBuffer</code>, <code>clEnqueueWrite</code>/Read, <code>clSetKernelArg</code> in small wrapper, which should check provided params, allocate device side ptrs, copy data from/to hosts and so on.</p>