title: Improve speed of very simple OpenCL kernel
body: <p>Tomorrow I have a test covering OpenCL. We have some example test but no solution for this.
  Given is this code:</p>
  
  <pre><code>void scalar_add(int n, double *a, double *b, double *result) {
      for (int i=0; i&lt;n; i++)
          result[i] = a[i] + b[i];
  }
  </code></pre>
  
  <p>The first task is to write an OpenCL kernel. So my solution:</p>
  
  <pre><code>__kernel void scalar_add(
                            __global double *a,
                            __global double *b,
                            __global double *result
  ) {
         size_t i = get_global_id(0;)
         result[i] = a[i] + b[i];
      }
  </code></pre>
  
  <p>For each element I read one time from A, one from B and write one time to C. I don't see how I can use private or local memory to improve the speed.
  The next question is on how to improve the speed with one simple change ("Welche kleine Änderung könnte auf einer Standard-Grafikkarte zu einer deutlichen Leistungssteigerung führen?"). <strong>Is there a way to improve the speed?</strong></p>
  
  <p>The kernel only reads from A and B so maybe this can be used. I tried using "__local" for arguments A and B instead but this won't compile or run.</p>