652
|
1 #include <stdio.h>
|
685
|
2 #include "SchedTaskArray.h"
|
652
|
3 #include "Twice.h"
|
|
4 #include "Func.h"
|
|
5
|
|
6 /* これは必須 */
|
|
7 SchedDefineTask(Twice);
|
|
8
|
|
9 static int
|
|
10 run(SchedTask *s,void *rbuf, void *wbuf)
|
|
11 {
|
699
|
12 // SchedTaskArray *a = (SchedTaskArray *)s;
|
685
|
13
|
652
|
14 int *i_data;
|
|
15 int *o_data;
|
|
16 long length;
|
|
17
|
|
18 i_data = (int*)s->get_input(rbuf, 0);
|
|
19 o_data = (int*)s->get_output(wbuf, 0);
|
|
20 length = (long)s->get_param(0);
|
|
21
|
|
22 for (int i = 0; i < length; i++) {
|
|
23 o_data[i] = i_data[i] * 2;
|
|
24 }
|
|
25
|
|
26 return 0;
|
|
27 }
|