Mercurial > hg > Game > Cerium
view example/multiply/ppe/Multi.cc @ 1602:e33e106ca3e0 draft
change default make parallel from fifo
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 06 Apr 2013 17:27:30 +0900 |
parents | f7d35318ea76 |
children | 0e1d40a3474b |
line wrap: on
line source
#include <stdio.h> #include "SchedTask.h" #include "Multi.h" #include "Func.h" #include "GpuScheduler.h" /* これは必須 */ SchedDefineTask(Multiply); 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 i = (long)s->get_param(0); C[i]=A[i]*B[i]; return 0; }