view example/dependency_task/ppe/Print.cc @ 757:5238f3e854fc

Test/create_task , create SPE task from application.
author hiroki
date Fri, 29 Jan 2010 14:34:30 +0900
parents 60aa3f241b10
children
line wrap: on
line source

#include <stdio.h>
#include <string.h>
#include "Print.h"
#include "Func.h"

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

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

    s->printf("[TASK_PRINT]\n");
    for (int i = 0; i < length; i++) {
	s->printf("%2d ", idata[i]);
    }
    s->printf("\n");

    return 0;
}