comparison twice.cl @ 0:4d6463c84338

Twice example on OpenCL
author Yuuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
date Wed, 11 Apr 2012 20:59:20 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:4d6463c84338
1 __kernel void
2 twice(__global int *input_data,
3 __global int *output_data,
4 __global int *data_count)
5 {
6 int count = *data_count;
7 for (int i = 0; i<count; i++) {
8 output_data[i] = input_data[i] * 2;
9 }
10
11 }