view example/share_task/spe/Exec.cc @ 839:1001c4bea1a0 draft

if unnecessary
author Yutaka_Kinjyo
date Fri, 28 May 2010 03:24:52 +0900
parents 0e91ddaad798
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->global_get(DATA_ID);
    int length = (long)s->get_param(0);
    int number = (long)s->get_param(1);
    int calnum = (long)s->get_param(2);

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

    return 0;
}