1/* 2 * function: kernel_demo 3 * sample code of default kernel arguments 4 * input: image2d_t as read only 5 * output: image2d_t as write only 6 */ 7 8__kernel void kernel_demo (__read_only image2d_t input, __write_only image2d_t output) 9{ 10 int x = get_global_id (0); 11 int y = get_global_id (1); 12 sampler_t sampler = CLK_NORMALIZED_COORDS_FALSE | CLK_ADDRESS_NONE | CLK_FILTER_NEAREST; 13 14 int2 pos = (int2)(x, y); 15 uint4 pixel = read_imageui(input, sampler, pos); 16 write_imageui(output, pos, pixel); 17} 18 19