You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
9 lines
313 B
9 lines
313 B
11 years ago
|
|
||
|
kernel void square(global float* input, size_t width, global float* output){
|
||
|
size_t x = get_global_id(0);
|
||
|
size_t y = get_global_id(1);
|
||
|
float i = 2.0 * (input[x + width*y] - 0.5);
|
||
|
output[x + width*y] = 0.5 + 0.5*sin((1.0 - i) * sin(i*i + 6.2*float(x)/width) + cos(1.0/i + 6.2*float(y)/width));
|
||
|
}
|
||
|
|