view example/dependency_task/ppe/Exec.cc @ 354:81b25e5d5379

add example/get_segment and change spe/DrawSpan.cpp
author koba
date Wed, 15 Jul 2009 17:39:51 +0900
parents 5c194c71eca8
children 44c0bce54dcf
line wrap: on
line source

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

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

int
Exec::run(void *rbuf, void *wbuf)
{
    int *idata = (int*)get_input(rbuf, 0);
    int *odata = (int*)get_output(wbuf, 0);
    int length = get_param(0);
    int calnum = get_param(1);

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

    return 0;
}