Mercurial > hg > Members > kono > Cerium
diff Renderer/Test/spe/ChainInit.cc @ 965:1089f24bc86a
removing user task from Renderer Engine
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 06 Aug 2010 19:59:23 +0900 |
parents | Renderer/Engine/spe/ChainInit.cc@716d8bd95503 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Renderer/Test/spe/ChainInit.cc Fri Aug 06 19:59:23 2010 +0900 @@ -0,0 +1,33 @@ +#include <stdio.h> +#include <string.h> +#include "ChainInit.h" +#include "Func.h" + +/* これは必須 */ +SchedDefineTask(ChainInit); + +/* + spe の global 領域に MemList を生成する + */ + +typedef struct { + double x, y, next_x, next_y; + double vx, vy, next_vx, next_vy; + int can_move; + uint32 parent; +} CHAIN_VARS; + + +static int +run(SchedTask *s,void *rbuf, void *wbuf) +{ + /* + CHAIN_VARS* idata = (CHAIN_VARS*)s->get_input(rbuf, 0); + uint32 chain_len = (unsigned long)s->get_param(0); + + // property は spe 上で allocate している(global) + CHAIN_VARS *property = (CHAIN_VARS*)s->global_alloc(DATA_ID, sizeof(CHAIN_VARS)*chain_len); + memcpy(property, idata, sizeof(CHAIN_VARS)*chain_len); + */ + return 0; +}