Mercurial > hg > Game > Cerium
changeset 1669:724fd3c1ac92 draft
debugging iterate
author | kono |
---|---|
date | Thu, 18 Jul 2013 07:53:26 +0900 |
parents | 805f60a3e9f9 |
children | 56eb3babc8b9 |
files | example/basic/check.pl example/basic/main.cc example/basic/ppe/Twice.cc example/fft/main.cc example/fft/output.pgm example/fft/ppe/bitReverse.cc example/fft/ppe/butterfly.cc example/fft/ppe/norm.cc example/multiply/Makefile.macosx |
diffstat | 9 files changed, 31 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/example/basic/check.pl Thu Jul 18 07:53:26 2013 +0900 @@ -0,0 +1,16 @@ +#!/usr/bin/perl +$i = 0; +while(<>) { + if(/i= (\d+) /) { + if(defined $line{$1}) { + print"duplicate\n$_$line{$1}"; + } + $line{$1}=$_; + } +} +for($i=0;$i<1000;$i++) { + my $s = sprintf("%04d",$i); + if(!defined $line{$s}){ + print"missing $s\n"; + } +}
--- a/example/basic/main.cc Wed Jul 17 18:18:01 2013 +0900 +++ b/example/basic/main.cc Thu Jul 18 07:53:26 2013 +0900 @@ -96,7 +96,6 @@ // add Active Queue twice->set_post(twice_result, (void*)data, 0); twice->iterate(length); - } int
--- a/example/basic/ppe/Twice.cc Wed Jul 17 18:18:01 2013 +0900 +++ b/example/basic/ppe/Twice.cc Thu Jul 18 07:53:26 2013 +0900 @@ -16,8 +16,9 @@ i_data = (int*)s->get_input(rbuf, 0); o_data = (int*)s->get_output(wbuf, 0); i = (long)s->get_param(0); - o_data[i] = i_data[i] * 2; - + printf("i= %04ld ,id=%d,mincpu=%d,maxcpu=%d,lx=%ld,ly=%ld\n" + ,i,s->scheduler->id,s->scheduler->min_cpu(),s->scheduler->max_cpu() + ,s->list->x,s->list->y); return 0; }
--- a/example/fft/main.cc Wed Jul 17 18:18:01 2013 +0900 +++ b/example/fft/main.cc Thu Jul 18 07:53:26 2013 +0900 @@ -290,8 +290,8 @@ void TMend(TaskManager *manager) { + ed_time = getTime(); output(); - ed_time = getTime(); fprintf(stdout, "image out put succeeded.\n"); printf("Time: %0.6f\n",ed_time-st_time); }
--- a/example/fft/ppe/bitReverse.cc Wed Jul 17 18:18:01 2013 +0900 +++ b/example/fft/ppe/bitReverse.cc Thu Jul 18 07:53:26 2013 +0900 @@ -20,7 +20,9 @@ unsigned long m = (unsigned long)s->get_param(3); unsigned long n = (unsigned long)s->get_param(4); unsigned int j = gid; - + if(nid == 100) { + printf("bitReverse nid=%ld,gid=%ld,n=%ld\n",nid,gid,n); + } j = (j & 0x55555555) << 1 | (j & 0xAAAAAAAA) >> 1; j = (j & 0x33333333) << 2 | (j & 0xCCCCCCCC) >> 2; j = (j & 0x0F0F0F0F) << 4 | (j & 0xF0F0F0F0) >> 4;
--- a/example/fft/ppe/butterfly.cc Wed Jul 17 18:18:01 2013 +0900 +++ b/example/fft/ppe/butterfly.cc Thu Jul 18 07:53:26 2013 +0900 @@ -30,11 +30,13 @@ int a = nid * n + butterflyGrpBase + butterflyGrpOffset; int b = a + butterflySize; - + int l = butterflyGrpNum * butterflyGrpOffset; cl_float2 xa, xb, xbxx, xbyy, wab, wayx, wbyx, resa, resb; - + if(nid == 100) { + printf("butterfly nid=%ld,gid=%ld,n=%ld,iter=%ld\n",nid,gid,n,iter); + } xa = x_in[a]; xb = x_in[b]; xbxx.x = xbxx.y = xb.x;
--- a/example/fft/ppe/norm.cc Wed Jul 17 18:18:01 2013 +0900 +++ b/example/fft/ppe/norm.cc Thu Jul 18 07:53:26 2013 +0900 @@ -18,7 +18,9 @@ unsigned long nid = (unsigned long)s->get_param(1); long n = (long)s->get_param(3); - + if(nid == 100) { + printf("norm nid=%ld,gid=%ld,n=%ld\n",nid,gid,n); + } out_x[nid*n+gid].x = in_x[nid*n+gid].x / (float)n; out_x[nid*n+gid].y = in_x[nid*n+gid].y / (float)n;
--- a/example/multiply/Makefile.macosx Wed Jul 17 18:18:01 2013 +0900 +++ b/example/multiply/Makefile.macosx Thu Jul 18 07:53:26 2013 +0900 @@ -12,7 +12,7 @@ TASK_SRCS = $(filter-out $(TASK_DIR)/$(TASK_SRCS_EXCLUDE),$(TASK_SRCS_TMP)) TASK_OBJS = $(TASK_SRCS:.cc=.o) -LIBS += -lParallelManager `sdl-config --libs` +LIBS += -lFifoManager `sdl-config --libs` CC += -m$(ABIBIT) .SUFFIXES: .cc .o