changeset 1248:d2f70da2aa19 draft

merge
author Daichi Toma <toma@cr.ie.u-ryukyu.ac.jp>
date Sat, 12 Nov 2011 15:32:41 +0900
parents 163207b736c5 (current diff) 8bc038529958 (diff)
children 7ee76065ec12 981b36f38333 e92f00ed2fc0
files example/Miller_Rabin/Makefile.def example/Prime/ppe/PrintTask.cc example/Prime/spe/PrintTask.cc
diffstat 7 files changed, 23 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Sat Nov 12 15:28:14 2011 +0900
+++ b/.hgtags	Sat Nov 12 15:32:41 2011 +0900
@@ -8,3 +8,4 @@
 b2b4a1243961a6e6c78c51fbc9d036a24dd52a68 simple-task-regression
 89689d1fb8cc40ce1ae57dd8ea19f5358200e714 before-simple-task
 7763f03a94e1ad475710eac4f5c2210e7db649ea before-dma-manager
+cd50c48f45e7696f3a9767b15ba4f5760958eb47 real_matrix
--- a/Renderer/Engine/task/CreatePolygon.cc	Sat Nov 12 15:28:14 2011 +0900
+++ b/Renderer/Engine/task/CreatePolygon.cc	Sat Nov 12 15:32:41 2011 +0900
@@ -1,5 +1,9 @@
 #include "CreatePolygon.h"
 
+/*
+ * This program is not used 2011/11/11
+ */
+
 SchedDefineTask(CreatePolygon);
 
 static void
--- a/Renderer/Engine/task/CreatePolygon.h	Sat Nov 12 15:28:14 2011 +0900
+++ b/Renderer/Engine/task/CreatePolygon.h	Sat Nov 12 15:32:41 2011 +0900
@@ -1,3 +1,7 @@
+/*
+ * This program is not used 2011/11/11
+ */
+
 #ifndef INCLUDED_CREATE_SPAN
 #define INCLUDED_CREATE_SPAN
 
--- a/Renderer/Engine/task/CreatePolygonFromSceneGraph.cc	Sat Nov 12 15:28:14 2011 +0900
+++ b/Renderer/Engine/task/CreatePolygonFromSceneGraph.cc	Sat Nov 12 15:32:41 2011 +0900
@@ -1,4 +1,7 @@
 /**
+ * SceneGraphを読み込んでpolygonの座標に変換行列を掛けて
+ * 実座標のpolygonを生成する。
+ *
  * SceneGraph が増えてくると動かなくなるかもしれない。
  * 一応 mainMem とかで動くようになるとは思うけど。
  * だめだったら、そこら辺が怪しいと思うべき
@@ -10,7 +13,7 @@
 
 #define  STATUS_NUM 3
 
-SchedDefineTask(CreatePolygonFromSceneGraph);
+SchedDefineTask1(CreatePolygonFromSceneGraph,createPolygon);
 
 /**
  *  ベクトルに行列を乗算する
@@ -62,7 +65,7 @@
 
 
 static int 
-run(SchedTask *smanager, void *rbuf, void *wbuf)
+createPolygon(SchedTask *smanager, void *rbuf, void *wbuf)
 {
 
     /*
@@ -78,7 +81,11 @@
     //pp, matrix, real_matrix を受け取る
     PolygonPackPtr in_pp      = (PolygonPackPtr)smanager->get_input(rbuf, 0);
     float *matrix             = (float*)smanager->get_input(rbuf, 1);
-    float *real_matrix        = (float*)smanager->get_input(rbuf, 2);
+    float real_matrix[16]; //        = (float*)smanager->get_input(rbuf, 2);
+
+    for (int i = 0; i<16; i++) real_matrix[i]=matrix[i];
+    real_matrix[4*0+3]=real_matrix[4*1+3]=real_matrix[4*2+3]=0;
+     
     texture_list *tritexinfo  = (texture_list*)smanager->get_input(rbuf, 3);
     
     PolygonPackPtr next = (PolygonPackPtr)smanager->get_param(0);
--- a/example/Miller_Rabin/Makefile.def	Sat Nov 12 15:28:14 2011 +0900
+++ b/example/Miller_Rabin/Makefile.def	Sat Nov 12 15:32:41 2011 +0900
@@ -8,8 +8,8 @@
 CERIUM = ../../../Cerium
 
 CC      = g++
-#CFLAGS  = -O9 -Wall
-CFLAGS  = -g -Wall
+CFLAGS  = -O9 -Wall
+#CFLAGS  = -g -Wall
 
 INCLUDE = -I${CERIUM}/include/TaskManager -I. -I..
 LIBS = -L${CERIUM}/TaskManager
--- a/example/Prime/ppe/PrintTask.cc	Sat Nov 12 15:28:14 2011 +0900
+++ b/example/Prime/ppe/PrintTask.cc	Sat Nov 12 15:32:41 2011 +0900
@@ -23,9 +23,8 @@
 	/* 素数の判定結果が1ならば出力する */
 	for (long i = 0; i < length; i++) {
 		if ( input[i] == true ) {
-			printf("%ld ",i);
+			printf("%ld\n",i);
 		}
 	}
-	printf("\n");
 	return 0;
 }
--- a/example/Prime/spe/PrintTask.cc	Sat Nov 12 15:28:14 2011 +0900
+++ b/example/Prime/spe/PrintTask.cc	Sat Nov 12 15:32:41 2011 +0900
@@ -23,9 +23,8 @@
 	/* 素数の判定結果が1ならば出力する */
 	for (long i = 0; i < length; i++) {
 		if ( input[i] == true ) {
-			printf("%ld ",i);
+			printf("%ld\n",i);
 		}
 	}
-	printf("\n");
 	return 0;
 }