title: OpenCL - Initializing program-scope variables from the host?
body: <p>I have some general parameters declared as a global (__constant) struct, like so:</p>
  
  <pre><code>typedef struct
  {
      int a;
      int b;
      float c;
      /// blah blah
  
  } SomeParams;
  
  __constant SomeParams Parameters;
  </code></pre>
  
  <p>in the kernel, I need to use it like so:</p>
  
  <pre><code>__kernel void Foo()
  {
      int a = Parameters.a;
      /// do something useful...
  }
  </code></pre>
  
  <p>I'm not sure how I can initialize the value of Parameters from the host before I execute the kernel.</p>
  
  <p>I have no problem creating buffers, etc for kernel arguments, but since this isn't a kernel argument, what do I need to do?</p>
  
  <p>I'm using the Cloo C#/OpenCL bindings, but even a raw CL API would be helpful.</p>