Mercurial > hg > Members > tkaito > task_dandy
annotate 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 |
rev | line source |
---|---|
0 | 1 #include <stdio.h> |
1
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
0
diff
changeset
|
2 #include "SchedTask.h" |
0 | 3 #include "Twice.h" |
4 #include "Func.h" | |
5 | |
6 /* これは必須 */ | |
1
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
0
diff
changeset
|
7 SchedDefineTask(Twice); |
0 | 8 |
9 static int | |
1
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
0
diff
changeset
|
10 run(SchedTask *s,void *rbuf, void *wbuf) |
0 | 11 { |
12 int *i_data; | |
13 int *o_data; | |
14 long length; | |
15 | |
1
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
0
diff
changeset
|
16 i_data = (int*)s->get_input(rbuf, 0); |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
0
diff
changeset
|
17 o_data = (int*)s->get_output(wbuf, 0); |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
0
diff
changeset
|
18 length = (long)s->get_param(0); |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
0
diff
changeset
|
19 |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
0
diff
changeset
|
20 for (int i = 0; i < length; i++) { |
7dc2d920fc7c
local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents:
0
diff
changeset
|
21 o_data[i] = i_data[i] * 2; |
0 | 22 } |
23 | |
24 return 0; | |
25 } |