Mercurial > hg > Members > kono > Cerium
comparison example/Bulk/ppe/Twice.cc @ 685:b386522827ae
Bulk task on going.
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 07 Dec 2009 00:32:34 +0900 |
parents | 458a1ad91427 |
children | 7e937a1cd121 |
comparison
equal
deleted
inserted
replaced
684:458a1ad91427 | 685:b386522827ae |
---|---|
1 #include <stdio.h> | 1 #include <stdio.h> |
2 #include "SchedTask.h" | 2 #include "SchedTaskArray.h" |
3 #include "Twice.h" | 3 #include "Twice.h" |
4 #include "Func.h" | 4 #include "Func.h" |
5 | 5 |
6 /* これは必須 */ | 6 /* これは必須 */ |
7 SchedDefineTask(Twice); | 7 SchedDefineTask(Twice); |
8 | 8 |
9 static int | 9 static int |
10 run(SchedTask *s,void *rbuf, void *wbuf) | 10 run(SchedTask *s,void *rbuf, void *wbuf) |
11 { | 11 { |
12 #if 0 | 12 SchedTaskArray *a = (SchedTaskArray *)s; |
13 | |
13 int *i_data; | 14 int *i_data; |
14 int *o_data; | 15 int *o_data; |
15 long length; | 16 long length; |
16 | 17 |
17 i_data = (int*)s->get_input(rbuf, 0); | 18 i_data = (int*)s->get_input(rbuf, 0); |
19 length = (long)s->get_param(0); | 20 length = (long)s->get_param(0); |
20 | 21 |
21 for (int i = 0; i < length; i++) { | 22 for (int i = 0; i < length; i++) { |
22 o_data[i] = i_data[i] * 2; | 23 o_data[i] = i_data[i] * 2; |
23 } | 24 } |
24 #endif | |
25 | 25 |
26 return 0; | 26 return 0; |
27 } | 27 } |