Mercurial > hg > Members > e085722 > Cerium
comparison 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 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:04e28d8d3c6f |
---|---|
1 #include <stdio.h> | |
2 #include "DataUpdate.h" | |
3 #include "Func.h" | |
4 #include "string.h" | |
5 | |
6 /* これは必須 */ | |
7 SchedDefineTask(DataUpdate); | |
8 | |
9 static int | |
10 run(SchedTask *s, void *rbuf, void *wbuf) | |
11 { | |
12 | |
13 long count = (long)s->get_param(0); | |
14 long id_base = (long)s->get_param(1); | |
15 for(int i=0; i<count; i++) { | |
16 void *idata = (void*)s->get_input(rbuf, i); | |
17 long size = (long)s->get_inputSize(i); | |
18 void *global_data = (void*)s->global_get(id_base+i); | |
19 memcpy(global_data,idata,size); | |
20 } | |
21 | |
22 return 0; | |
23 } |