686
|
1 #include <stdio.h>
|
|
2 #include "DataUpdate.h"
|
|
3 #include "Func.h"
|
|
4
|
|
5 /* これは必須 */
|
|
6 SchedDefineTask(DataUpdate);
|
|
7
|
|
8 static int
|
|
9 run(SchedTask *s, void *rbuf, void *wbuf)
|
|
10 {
|
|
11
|
|
12 float *idata = (float*)s->get_input(rbuf, 0);
|
|
13 int load_id = (int)s->get_param(0);
|
|
14 float *global_data = (float*)s->global_get(load_id);
|
|
15
|
|
16 global_data[0] = idata[0];
|
|
17 global_data[1] = idata[1];
|
|
18 global_data[2] = idata[2];
|
|
19 global_data[3] = idata[3];
|
|
20
|
|
21 #if 0
|
|
22 s->printf("spe %f ",idata[0]);
|
|
23 s->printf("spe %f ",idata[1]);
|
|
24 s->printf("spe %f\n",idata[2]);
|
|
25 #endif
|
|
26
|
|
27 return 0;
|
|
28 }
|