Mercurial > hg > Game > Cerium
view example/share_task/spe/Load.cc @ 445:efe8584a7b5a draft
test_render error fixed
author | game@henri.cr.ie.u-ryukyu.ac.jp |
---|---|
date | Fri, 25 Sep 2009 07:26:35 +0900 |
parents | 768452fab95e |
children | 839e34d0cc3c |
line wrap: on
line source
#include <stdio.h> #include <string.h> #include "Load.h" #include "Func.h" /* これは必須 */ SchedDefineTask(Load); int Load::run(void *rbuf, void *wbuf) { int *idata = (int*)get_input(rbuf, 0); int *odata; int length = get_param(0); // SPU LS 内に領域確保し、データをコピー odata = (int*)global_alloc(DATA_ID, sizeof(int)*length); memcpy(odata, idata, sizeof(int)*length); printf("[TASK_LOAD] "); for (int i = 0; i < length; i++) { printf("%03d ", odata[i]); } printf("\n"); return 0; }