title: Parameters to CUDA kernels
body: <p>When invoking a CUDA kernel for a specific thread configuration, are there any strict rules on 
  which memory space (device/host) kernel parameters should reside in and what type they should be? </p>
  
  <p>Suppose I launch a 1-D grid of threads with </p>
  
  <pre><code>kernel&lt;&lt;&lt;numblocks, threadsperblock &gt;&gt;&gt; (/*parameters*/)
  </code></pre>
  
  <p>Can I pass an integer parameter <code>int foo</code> which is a <strong>host</strong>-integer variable, 
  directly to the CUDA kernel? Or should I <code>cudaMalloc</code> memory for a single integer say <code>dev_foo</code> and then <code>cudaMemcpy</code> <code>foo</code> into <code>devfoo</code> and then pass <code>devfoo</code> as a kernel parameter?  </p>