view Renderer/Engine/task/DataAllocate.cc @ 1048:40cde8c1a6cd default tip

add ScaleXY (not for allExecute...)
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Wed, 08 Dec 2010 06:22:15 +0900
parents 1b018a00cd17
children
line wrap: on
line source

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

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

static int
run(SchedTask *s, void *rbuf, void *wbuf)
{

  int count = (long)s->get_param(0);
  for(int i=0;i<count;i++) {
      void *idata = s->get_input(rbuf, i);
      long size = (long)s->get_param(i*2+1);
      long load_id = (long)s->get_param(i*2+2);

      void *buff = s->global_alloc(load_id, size);
      if (idata != NULL) {
	memcpy(buff,idata,size);
      }
  }

  return 0;
}