annotate example/OpenCL/twice.cl @ 1699:0a70abda2ab6 draft

profile for gpu
author kkb
date Fri, 04 Oct 2013 20:05:17 +0900
parents 99ea7b932470
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1455
2b886dcc0e7d add OpenCL example
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
1 __kernel void
1507
7abad41d12af minor fix OpenCL example
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1506
diff changeset
2 twice(__global int *data_count,
7abad41d12af minor fix OpenCL example
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1506
diff changeset
3 __global int *input_data,
7abad41d12af minor fix OpenCL example
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1506
diff changeset
4 __global int *output_data)
1455
2b886dcc0e7d add OpenCL example
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents:
diff changeset
5 {
1507
7abad41d12af minor fix OpenCL example
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1506
diff changeset
6 long count = (long)data_count[0];
1508
0e1318e7caed create sort test
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1507
diff changeset
7 for (int i = 0; i<count; i++) {
1514
99ea7b932470 create OpenCL test
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1508
diff changeset
8 output_data[i] = input_data[i]*2;
1508
0e1318e7caed create sort test
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1507
diff changeset
9 }
1506
a7895ab4d0e3 add flip flag and NDRange flag
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents: 1482
diff changeset
10 }