view example/share_task/ppe/Exec.cc @ 298:58fd16298954

from EUC to UTF-8
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Sun, 07 Jun 2009 15:17:41 +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*)global_get(DATA_ID);
    int length = get_param(0);
    int number = get_param(1);
    int calnum = get_param(2);

    printf("[TASK_EXEC %02d] ", number);
    for (int i = 0; i < length; i++) {
	idata[i] += calnum;
	printf("%03d ", idata[i]);
    }
    printf("\n");

    return 0;
}