view example/dependency_task/ppe/Exec.cc @ 1020:58b284d6506f draft

create_pp_task fix. not done.
author tkaito
date Sun, 07 Nov 2010 04:24:24 +0900
parents 94d82f2c842f
children
line wrap: on
line source

#include <stdio.h>
#include "Exec.h"
#include "Func.h"

/* これは必須 */
SchedDefineTask(Exec);

static int
run(SchedTask *s, void *rbuf, void *wbuf)
{
    int *idata = (int*)s->get_input(rbuf, 0);
    int *odata = (int*)s->get_output(wbuf, 0);
    long length = (long)s->get_param(0);
    long calnum = (long)s->get_param(1);

    for (int i = 0; i < length; i++) {
	odata[i] = idata[i] + calnum;
    }

    return 0;
}