view ppe/CollDataReflect.cc @ 57:978097c6427a

bug fix.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Sat, 29 Jan 2011 22:43:17 +0900
parents
children
line wrap: on
line source

#include <string.h>
#include "task_base.h"
#include "task_object.h"


SchedDefineTask1(CollDataReflect, coll_reflect);

static int
coll_reflect(SchedTask *smanager, void *rbuf, void *wbuf)
{
    long load_id = (long)smanager->get_param(0);

    void* odata = smanager->get_output(wbuf, 0);
    long size = (long)smanager->get_outputSize(0);

    void *global_data = (void*)smanager->global_get(load_id);
    memcpy(odata, global_data, size);
    
    return 0;
}