Mercurial > hg > Game > Cerium
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 (diff) 8bc038529958 (current diff) |
children | 7ee76065ec12 981b36f38333 e92f00ed2fc0 |
files | example/Miller_Rabin/Makefile.def example/Prime/ppe/PrintTask.cc example/Prime/spe/PrintTask.cc |
diffstat | 5 files changed, 6 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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;
--- 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;
--- 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; }
--- 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; }