view example/basic/ppe/Twice.cc @ 199:1fd0107ebb25 draft

add SceneGraph(ieshoot), add SystemSceneGraph(Camera)
author gongo@gendarme.cr.ie.u-ryukyu.ac.jp
date Mon, 26 Jan 2009 14:02:45 +0900
parents 028ffc9c0375
children 768452fab95e
line wrap: on
line source

#include <stdio.h>
#include "SchedTask.h"
#include "Twice.h"
#include "Func.h"

/* ¤³¤ì¤Ïɬ¿Ü */
SchedDefineTask(Twice);

int
Twice::run(void *rbuf, void *wbuf)
{
    int *i_data;
    int *o_data;
    int length;

    i_data = (int*)get_input(rbuf, 0);
    o_data = (int*)get_output(wbuf, 0);
    length = get_param(0);
    
    for (int i = 0; i < length; i++) {
	o_data[i] = i_data[i] * 2;
    }
    
    return 0;
}