comparison Renderer/Test/spe/ChainInit.cc @ 0:04e28d8d3c6f

first commit
author Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp>
date Mon, 08 Nov 2010 01:23:25 +0900
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:04e28d8d3c6f
1 #include <stdio.h>
2 #include <string.h>
3 #include "ChainInit.h"
4 #include "Func.h"
5
6 /* これは必須 */
7 SchedDefineTask(ChainInit);
8
9 /*
10 spe の global 領域に MemList を生成する
11 */
12
13 typedef struct {
14 double x, y, next_x, next_y;
15 double vx, vy, next_vx, next_vy;
16 int can_move;
17 uint32 parent;
18 } CHAIN_VARS;
19
20
21 static int
22 run(SchedTask *s,void *rbuf, void *wbuf)
23 {
24 /*
25 CHAIN_VARS* idata = (CHAIN_VARS*)s->get_input(rbuf, 0);
26 uint32 chain_len = (unsigned long)s->get_param(0);
27
28 // property は spe 上で allocate している(global)
29 CHAIN_VARS *property = (CHAIN_VARS*)s->global_alloc(DATA_ID, sizeof(CHAIN_VARS)*chain_len);
30 memcpy(property, idata, sizeof(CHAIN_VARS)*chain_len);
31 */
32 return 0;
33 }