view TaskManager/test/IterateTest/ppe/Multi_.cc @ 1999:278e6ae50b72 draft

add test
author Shohei KOKUBO <e105744@ie.u-ryukyu.ac.jp>
date Fri, 02 May 2014 16:41:31 +0900
parents
children
line wrap: on
line source

#include <stdio.h>
#include "SchedTask.h"
#include "Multi.h"
#include "Func.h"
#include "GpuScheduler.h"

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

static int
run(SchedTask *s,void *rbuf, void *wbuf)
{
    float *A,*B,*C;

    A = (float*)s->get_input(rbuf, 0);
    B = (float*)s->get_input(rbuf, 1);
    C = (float*)s->get_output(wbuf, 0);

    //    long length = (long)s->get_param(0);
    long i = (long)s->x;
    //for(int i=0;i<length;i++) {
    C[i]=A[i]*B[i]+1;
    //}
    return 0;
}