view Renderer/Engine/task/DataUpdate.cc @ 751:8b45afad160f

add task/DataLoad task/DataUpdate
author hiroki
date Mon, 25 Jan 2010 19:25:40 +0900
parents
children 4455e7b0caf3
line wrap: on
line source

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

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

static int
run(SchedTask *s, void *rbuf, void *wbuf)
{
  void *idata = (void*)s->get_input(rbuf, 0);
  int size = (int)s->get_param(0);
  int load_id = (int)s->get_param(1);
  void *global_data = (void*)s->global_get(load_id);
  
  memcpy(global_data,idata,size);

  return 0;
}