dummy.cl 568 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
// just a dummy OpenCL kernel for testing
// Kaz Yoshii <ky@anl.gov>

__kernel void dummy(__global int *restrict g1,
		    __global int *restrict g2)
{
	int g_idx = get_global_id(0);
	int l_idx = get_local_id(0);

Kazutomo Yoshii's avatar
Kazutomo Yoshii committed
10
11
	g1[g_idx] = g_idx + 10;
	g2[g_idx] = l_idx + 20;
12
13
14
15
16
17
18
19
20

#ifdef EMULATOR
	printf("dummy: dim=%d global_size=%2lu global_id=%2lu local_size=%2lu local_id=%2lu num_groups=%2lu group_id=%2lu\n",
	       get_work_dim(),
	       get_global_size(0), get_global_id(0),
	       get_local_size(0), get_local_id(0),
	       get_num_groups(0), get_group_id(0));
#endif
}