diff ppe/Twice.cc @ 1:7dc2d920fc7c

local update. xml,image, blender add. ppe/move, ppe/coll add.
author tkaito
date Tue, 15 Jun 2010 11:14:36 +0900
parents e66ea5014aa1
children
line wrap: on
line diff
--- a/ppe/Twice.cc	Tue Jun 15 03:14:31 2010 +0900
+++ b/ppe/Twice.cc	Tue Jun 15 11:14:36 2010 +0900
@@ -1,29 +1,24 @@
 #include <stdio.h>
-#include "SchedTaskArray.h"
+#include "SchedTask.h"
 #include "Twice.h"
 #include "Func.h"
 
 /* これは必須 */
-SchedDefineTask1(Twice,twice_run);
+SchedDefineTask(Twice);
 
 static int
-twice_run(SchedTask *s,void *rbuf, void *wbuf)
+run(SchedTask *s,void *rbuf, void *wbuf)
 {
-    // SchedTaskArray *a = (SchedTaskArray *)s;
-
     int *i_data;
     int *o_data;
     long length;
-    long count = (long)s->get_param(0);
 
-    for(int j = 0; j<count; j++) {
-	i_data = (int*)s->get_input(rbuf, j);
-	o_data = (int*)s->get_output(wbuf, j);
-	length = (long)s->get_param(j+1);
-	
-	for (int i = 0; i < length; i++) {
-	    o_data[i] = i_data[i] * 2;
-	}
+    i_data = (int*)s->get_input(rbuf, 0);
+    o_data = (int*)s->get_output(wbuf, 0);
+    length = (long)s->get_param(0);
+    
+    for (int i = 0; i < length; i++) {
+	o_data[i] = i_data[i] * 2;
     }
     
     return 0;