1 2 3 4 5 6 7 8 9 10 11 12 13 14
__kernel void kernel_arange_f32( __global float * dst, ulong offsetd, int n, float start, float step ) { dst = (global float*)((global char*)dst + offsetd); const int i = get_global_id(0); if (i < n) { dst[i] = start + step * i; } }