view example/add/ppe/Add.cc @ 1637:a0014faececa draft

fix conflict set cpu
author Yuhi TOMARI <yuhi@cr.ie.u-ryukyu.ac.jp>
date Tue, 18 Jun 2013 13:18:37 +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;
}