Mercurial > hg > Game > Cerium
view TaskManager/test/UtilizationTest/ppe/Multi.cc @ 1737:6bd9a57eb44d draft
minor fix
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 02 Nov 2013 17:34:40 +0900 |
parents | 7673e2ad2623 |
children | 537707f376c8 |
line wrap: on
line source
#include <stdio.h> #include "SchedTask.h" #include "Multi.h" #include "Func.h" #include "GpuScheduler.h" /* これは必須 */ SchedDefineTask(Multiply); long current_task_id = -1; static int run(SchedTask *s,void *rbuf, void *wbuf) { float *A,*B,*C; A = (float*)s->get_input(rbuf, 0); B = (float*)s->get_input(rbuf, 1); C = (float*)s->get_output(wbuf, 0); long task_id = (long)s->get_param(0); current_task_id = task_id; long i = s->x; // for(int i=0; i<DATA_NUM; i++) { C[i]=A[i]*B[i]; // } if(current_task_id != task_id) fprintf(stderr,"duplicate task %ld %ld\n",current_task_id,task_id); return 0; }