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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
e66ea5014aa1 first commit. But It move "Bulk".
tkaito
parents:
diff changeset
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
e66ea5014aa1 first commit. But It move "Bulk".
tkaito
parents:
diff changeset
3 #include "Twice.h"
e66ea5014aa1 first commit. But It move "Bulk".
tkaito
parents:
diff changeset
4 #include "Func.h"
e66ea5014aa1 first commit. But It move "Bulk".
tkaito
parents:
diff changeset
5
e66ea5014aa1 first commit. But It move "Bulk".
tkaito
parents:
diff changeset
6 /* これは必須 */
1
7dc2d920fc7c local update. xml,image, blender add. ppe/move, ppe/coll add.
tkaito
parents: 0
diff changeset
7 SchedDefineTask(Twice);
0
e66ea5014aa1 first commit. But It move "Bulk".
tkaito
parents:
diff changeset
8
e66ea5014aa1 first commit. But It move "Bulk".
tkaito
parents:
diff changeset
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
e66ea5014aa1 first commit. But It move "Bulk".
tkaito
parents:
diff changeset
11 {
e66ea5014aa1 first commit. But It move "Bulk".
tkaito
parents:
diff changeset
12 int *i_data;
e66ea5014aa1 first commit. But It move "Bulk".
tkaito
parents:
diff changeset
13 int *o_data;
e66ea5014aa1 first commit. But It move "Bulk".
tkaito
parents:
diff changeset
14 long length;
e66ea5014aa1 first commit. But It move "Bulk".
tkaito
parents:
diff changeset
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
e66ea5014aa1 first commit. But It move "Bulk".
tkaito
parents:
diff changeset
22 }
e66ea5014aa1 first commit. But It move "Bulk".
tkaito
parents:
diff changeset
23
e66ea5014aa1 first commit. But It move "Bulk".
tkaito
parents:
diff changeset
24 return 0;
e66ea5014aa1 first commit. But It move "Bulk".
tkaito
parents:
diff changeset
25 }