Mercurial > hg > Members > kono > Cerium
view Renderer/Engine/spe/DataAllocate.cc @ 1032:8892d0ea7985
merge
author | Yutaka_Kinjyo |
---|---|
date | Tue, 16 Nov 2010 14:59:28 +0900 |
parents | 0b6f8c82625a |
children |
line wrap: on
line source
#include <stdio.h> #include <string.h> #include "DataAllocate.h" #include "Func.h" /* これは必須 */ SchedDefineTask(DataAllocate); static int run(SchedTask *s, void *rbuf, void *wbuf) { int count = (int)s->get_param(0); for(int i=0;i<count;i++) { void *idata = s->get_input(rbuf, i); long size = (long)s->get_param(i*2+1); long load_id = (long)s->get_param(i*2+2); void *buff = s->global_alloc(load_id, size); if (idata != NULL) { memcpy(buff,idata,size); } } return 0; }