kernel void update(float s, float r, float b, float dt, __global float4* buffer){ size_t i = get_global_id(0); const float4 w = buffer[i]; float4 v = w; v.x += dt * s * (w.y - w.x); v.y += dt * (w.x * (r - w.z) - w.y); v.z += dt * (w.x * w.y - b * w.z); buffer[i] = v; }