Mercurial > hg > Papers > 2016 > kkb-master
comparison paper/src/twice_cerium.cc @ 16:958634b9fa32
make paper directory
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 17 Feb 2016 16:59:46 +0900 |
parents | src/twice_cerium.cc@12d1c2f53258 |
children |
comparison
equal
deleted
inserted
replaced
15:94c9c506bba9 | 16:958634b9fa32 |
---|---|
1 static int | |
2 twice(SchedTask *s,void *rbuf, void *wbuf) | |
3 { | |
4 /** | |
5 * Get Input Data | |
6 * get_input(input data buffer, index) | |
7 */ | |
8 int* input = (int*)s->get_input(rbuf, 0); | |
9 | |
10 /** | |
11 * Get Output Data | |
12 * get_output(output data buffer, index) | |
13 */ | |
14 int* output = (int*)s->get_output(wbuf, 0); | |
15 | |
16 /** | |
17 * Get index(x, y, z) | |
18 * SchedTask member | |
19 * x : SchedTask->x | |
20 * y : SchedTask->y | |
21 * z : SchedTask->z | |
22 */ | |
23 long i = s->x; | |
24 | |
25 output[i] = input[i]*2; | |
26 | |
27 return 0; | |
28 } |