Mercurial > hg > Members > tkaito > task_dandy
comparison ppe/Twice.cc @ 1:7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
author | tkaito |
---|---|
date | Tue, 15 Jun 2010 11:14:36 +0900 |
parents | e66ea5014aa1 |
children |
comparison
equal
deleted
inserted
replaced
0:e66ea5014aa1 | 1:7dc2d920fc7c |
---|---|
1 #include <stdio.h> | 1 #include <stdio.h> |
2 #include "SchedTaskArray.h" | 2 #include "SchedTask.h" |
3 #include "Twice.h" | 3 #include "Twice.h" |
4 #include "Func.h" | 4 #include "Func.h" |
5 | 5 |
6 /* これは必須 */ | 6 /* これは必須 */ |
7 SchedDefineTask1(Twice,twice_run); | 7 SchedDefineTask(Twice); |
8 | 8 |
9 static int | 9 static int |
10 twice_run(SchedTask *s,void *rbuf, void *wbuf) | 10 run(SchedTask *s,void *rbuf, void *wbuf) |
11 { | 11 { |
12 // SchedTaskArray *a = (SchedTaskArray *)s; | |
13 | |
14 int *i_data; | 12 int *i_data; |
15 int *o_data; | 13 int *o_data; |
16 long length; | 14 long length; |
17 long count = (long)s->get_param(0); | |
18 | 15 |
19 for(int j = 0; j<count; j++) { | 16 i_data = (int*)s->get_input(rbuf, 0); |
20 i_data = (int*)s->get_input(rbuf, j); | 17 o_data = (int*)s->get_output(wbuf, 0); |
21 o_data = (int*)s->get_output(wbuf, j); | 18 length = (long)s->get_param(0); |
22 length = (long)s->get_param(j+1); | 19 |
23 | 20 for (int i = 0; i < length; i++) { |
24 for (int i = 0; i < length; i++) { | 21 o_data[i] = i_data[i] * 2; |
25 o_data[i] = i_data[i] * 2; | |
26 } | |
27 } | 22 } |
28 | 23 |
29 return 0; | 24 return 0; |
30 } | 25 } |