// Simple OpenCL kernel that squares an input array. // Kernel block. // 1 kernel void square( // 2 const global float* const restrict input, // 3 global float* const restrict output) { size_t i = get_global_id(0); output[i] = input[i] * input[i]; }