title: "Can't convert between vector values of different size"
body: <p>I'm trying to run a Runge-Kutta 4 on C language. The code is as follows:</p>
  
  <pre><code>__kernel void updade_state( __global float8 *q,__global float8 *qm, __global float8 *v){
  
  const int gid = get_global_id(0);
  float8 qs;
  
  
  //k1
  f( q, v);
  qs = q[gid] + dt * v[gid]/6.0;
  qm[gid] = q[gid] + 0.5 * dt * v[gid];
  
  //k2
  f(qm, v);
  qs +=  dt * v[gid]/3.0;
  qm[gid] = q[gid] + 0.5 * dt * v[gid];
  
  //k3
  f( qm, v);
  qs +=  dt * v[gid]/3.0;
  qm[gid] = q[gid] + dt * v[gid];
  
  //k4
  f( qm, v);
  qs +=  dt * v[gid]/6.0;
  
  //update particle
  q[gid] = qs;
  </code></pre>
  
  <p>}</p>
  
  <p>I'm using pyopencl module to access my graphics card ("<strong>gid</strong>") in order to run a simulation of multiple particles much more efficiently.</p>
  
  <p>Apart from the function <strong>f</strong> that is being called in the kernel, the rest of the kernel is being built in a python program, through which it is added the constant value of <strong>dt</strong>, present in my Runge-Kutta code.</p>
  
  <p>However, when I run the whole thing, the following error message shows:</p>
  
  <pre><code>&lt;kernel&gt;:52:22: error: can't convert between vector values of different size ('double' and 'float8')
      qs = q[gid] + dt * v[gid]/6.0;
                    ~~ ^ ~~~~~~
  &lt;kernel&gt;:53:33: error: can't convert between vector values of different size ('double' and 'float8')
      qm[gid] = q[gid] + 0.5 * dt * v[gid];
                         ~~~~~~~~ ^ ~~~~~~
  &lt;kernel&gt;:57:15: error: can't convert between vector values of different size ('double' and 'float8')
      qs +=  dt * v[gid]/3.0;
             ~~ ^ ~~~~~~
  &lt;kernel&gt;:58:33: error: can't convert between vector values of different size ('double' and 'float8')
      qm[gid] = q[gid] + 0.5 * dt * v[gid];
                         ~~~~~~~~ ^ ~~~~~~
  &lt;kernel&gt;:62:15: error: can't convert between vector values of different size ('double' and 'float8')
      qs +=  dt * v[gid]/3.0;
             ~~ ^ ~~~~~~
  &lt;kernel&gt;:63:27: error: can't convert between vector values of different size ('double' and 'float8')
      qm[gid] = q[gid] + dt * v[gid];
                         ~~ ^ ~~~~~~
  &lt;kernel&gt;:67:15: error: can't convert between vector values of different size ('double' and 'float8')
      qs +=  dt * v[gid]/6.0;
  </code></pre>
  
  <p>Cheers</p>