Mercurial > hg > Game > Cerium
annotate example/flip/twice.cl @ 1927:4eefec26e3e2 draft
add file
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 31 Jan 2014 07:15:07 +0900 |
parents | 61164c687b29 |
children | 273de551f726 |
rev | line source |
---|---|
1515 | 1 __kernel void |
2 twice(__constant int *data_count, | |
1546
61164c687b29
fix GpuScheduler flip
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents:
1544
diff
changeset
|
3 __global int *input_data) |
61164c687b29
fix GpuScheduler flip
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents:
1544
diff
changeset
|
4 // __global int *output_data) |
1515 | 5 { |
6 long count = (long)data_count[0]; | |
1544
5c4e3f0d372a
many_task add task array
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents:
1515
diff
changeset
|
7 for (int i = 0; i<count; i++) { |
1546
61164c687b29
fix GpuScheduler flip
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents:
1544
diff
changeset
|
8 // output_data[i] = 2*input_data[i]; |
61164c687b29
fix GpuScheduler flip
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents:
1544
diff
changeset
|
9 input_data[i] *= 2; |
1544
5c4e3f0d372a
many_task add task array
Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
parents:
1515
diff
changeset
|
10 } |
1515 | 11 |
12 } |