summaryrefslogtreecommitdiff
path: root/AutoImagesGPU.cl
blob: b8c10dbd57de6f21983566f470e98df461041dc4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

__kernel void AutoImage(__global float *output)
{
	
	unsigned int id;
	int width;
	int xInt;
	int yInt;
	float x;
	float y;
	int channel;
	
	id = get_global_id(0);
	width = <WIDTH>;
	
	xInt = (id/3) % width;
	yInt = (id/3) / width;
	
	x = (float)xInt;
	y = (float)yInt;
	
	

	channel = id % 3;
	
	if (channel == 0)
		output[id] = <RFUNCTION>;
	else if (channel == 1)
		output[id] = <GFUNCTION>;
	else
		output[id] = <BFUNCTION>;
	
}