__kernel void scale ( __global float *in, __global float *out, const float factor ) { const int idx = get_global_id(0); const int idy = get_global_id(1); const int index = idy * get_global_size(0) + idx; out[index] = in[index] * factor; }