Mercurial > hg > Members > e085722 > Cerium
diff Renderer/Engine/spe/DataUpdate.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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Renderer/Engine/spe/DataUpdate.cc Mon Nov 08 01:23:25 2010 +0900 @@ -0,0 +1,23 @@ +#include <stdio.h> +#include "DataUpdate.h" +#include "Func.h" +#include "string.h" + +/* これは必須 */ +SchedDefineTask(DataUpdate); + +static int +run(SchedTask *s, void *rbuf, void *wbuf) +{ + + long count = (long)s->get_param(0); + long id_base = (long)s->get_param(1); + for(int i=0; i<count; i++) { + void *idata = (void*)s->get_input(rbuf, i); + long size = (long)s->get_inputSize(i); + void *global_data = (void*)s->global_get(id_base+i); + memcpy(global_data,idata,size); + } + + return 0; +}