Mercurial > hg > Members > e085722 > Cerium
view Renderer/Engine/task/DataAllocate.cc @ 4:b5b462ac9b3b
Cerium Blender ball_bound
author | Daiki KINJYO <e085722@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 29 Nov 2010 16:42:42 +0900 |
parents | 04e28d8d3c6f |
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 = (long)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; }