# HG changeset patch # User Daichi Toma # Date 1321079561 -32400 # Node ID d2f70da2aa19750971072019415f3ae9a85bd9b7 # Parent 163207b736c522b5d932ec3e195a39b08d2d1aaa# Parent 8bc0385299587beb714ba7fd80d972bbf60e7be5 merge diff -r 8bc038529958 -r d2f70da2aa19 example/Miller_Rabin/Makefile.def --- a/example/Miller_Rabin/Makefile.def Fri Nov 11 18:01:05 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 diff -r 8bc038529958 -r d2f70da2aa19 example/Miller_Rabin/ppe/Prime.cc --- a/example/Miller_Rabin/ppe/Prime.cc Fri Nov 11 18:01:05 2011 +0900 +++ b/example/Miller_Rabin/ppe/Prime.cc Sat Nov 12 15:32:41 2011 +0900 @@ -16,7 +16,7 @@ U64 result = 1; while (power > 0) { - if ( power & 1 == 1 ) { + if ( (power & 1) == 1 ) { result = (result * base) % mod; } base = ( base * base ) % mod; diff -r 8bc038529958 -r d2f70da2aa19 example/Miller_Rabin/spe/Prime.cc --- a/example/Miller_Rabin/spe/Prime.cc Fri Nov 11 18:01:05 2011 +0900 +++ b/example/Miller_Rabin/spe/Prime.cc Sat Nov 12 15:32:41 2011 +0900 @@ -16,7 +16,7 @@ U64 result = 1; while (power > 0) { - if ( power & 1 == 1 ) { + if ( (power & 1) == 1 ) { result = (result * base) % mod; } base = ( base * base ) % mod; diff -r 8bc038529958 -r d2f70da2aa19 example/Prime/ppe/PrintTask.cc --- a/example/Prime/ppe/PrintTask.cc Fri Nov 11 18:01:05 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; } diff -r 8bc038529958 -r d2f70da2aa19 example/Prime/spe/PrintTask.cc --- a/example/Prime/spe/PrintTask.cc Fri Nov 11 18:01:05 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; }