109
|
1 #include <stdio.h>
|
|
2 #include <string.h>
|
|
3 #include "Load.h"
|
|
4 #include "Func.h"
|
|
5
|
298
|
6 /* これは必須 */
|
109
|
7 SchedDefineTask(Load);
|
|
8
|
|
9 int
|
|
10 Load::run(void *rbuf, void *wbuf)
|
|
11 {
|
|
12 int *idata = (int*)get_input(rbuf, 0);
|
|
13 int *odata;
|
|
14 int length = get_param(0);
|
|
15
|
298
|
16 // SPU LS 内に領域確保し、データをコピー
|
109
|
17 odata = (int*)global_alloc(DATA_ID, sizeof(int)*length);
|
|
18 memcpy(odata, idata, sizeof(int)*length);
|
|
19
|
|
20 printf("[TASK_LOAD] ");
|
|
21 for (int i = 0; i < length; i++) {
|
|
22 printf("%03d ", odata[i]);
|
|
23 }
|
|
24 printf("\n");
|
|
25
|
|
26 return 0;
|
|
27 }
|