Mercurial > hg > Game > Cerium
view example/add/ppe/Add.cc @ 1927:4eefec26e3e2 draft
add file
author | Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 31 Jan 2014 07:15:07 +0900 |
parents | 7d307bac94a6 |
children |
line wrap: on
line source
#include <stdio.h> #include "SchedTask.h" #include "Add.h" #include "Func.h" /* これは必須 */ SchedDefineTask(Add); 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); *C=*A+*B; return 0; }