Mercurial > hg > Game > Cerium
view example/add/ppe/Add.cc @ 2054:2e7a6f40672f draft
add param(4) in FileMapReduce.cc
author | masa |
---|---|
date | Fri, 29 Jan 2016 15:56:28 +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; }