From: <mic...@us...> - 2011-12-09 09:17:56
|
Revision: 9323 http://octave.svn.sourceforge.net/octave/?rev=9323&view=rev Author: michelemartone Date: 2011-12-09 09:17:50 +0000 (Fri, 09 Dec 2011) Log Message: ----------- sparsersb: removed the obsolete librsbench.m listing; updated sparsersbbench.m with a preliminary sp rand-matrix-generating benchmarking snippet Modified Paths: -------------- trunk/octave-forge/main/sparsersb/src/sparsersbbench.m Removed Paths: ------------- trunk/octave-forge/main/sparsersb/src/librsbench.m Deleted: trunk/octave-forge/main/sparsersb/src/librsbench.m =================================================================== --- trunk/octave-forge/main/sparsersb/src/librsbench.m 2011-12-09 09:17:32 UTC (rev 9322) +++ trunk/octave-forge/main/sparsersb/src/librsbench.m 2011-12-09 09:17:50 UTC (rev 9323) @@ -1,72 +0,0 @@ -#!/usr/bin/octave -q - -function rsbb_sum(A,B) - tic - C=A+B; - toc -end - -function rsbb_mul(A,B) - tic - C=A*B; - toc -end - -function rsbb_spmm(A,nrhs) - X=ones(size(A,2),nrhs); - T=100; - tic - for t=1,T; - Y=A*X; - end - toc -end - -function rsbb_scale(A) - T=100; - alpha=1.1; - tic - for t=1,T; - A.*=alpha; - end - toc -end - -function rsbb_spmv(A) - rsbb_spmm(A,1) -end - -function rsbb_diag(A) - tic - d=diag(A); - toc -end - -#n=2000; -#n=200; -n=800; -th=.4; -oA=sparse(rand(n)>th); -oB=sparse(rand(n)>th); -rA=sparsersb(oA); -rB=sparsersb(oB); - -rsbb_spmv(oA) -rsbb_spmv(rA) - -rsbb_spmm(oA,10) -rsbb_spmm(rA,10) - -rsbb_mul(oA,oB) -rsbb_mul(rA,rB) - -rsbb_sum(oA,oB) -rsbb_sum(rA,rB) - -rsbb_diag(oA) -rsbb_diag(rA) - -rsbb_scale(oA) -rsbb_scale(rA) - - Modified: trunk/octave-forge/main/sparsersb/src/sparsersbbench.m =================================================================== --- trunk/octave-forge/main/sparsersb/src/sparsersbbench.m 2011-12-09 09:17:32 UTC (rev 9322) +++ trunk/octave-forge/main/sparsersb/src/sparsersbbench.m 2011-12-09 09:17:50 UTC (rev 9323) @@ -89,12 +89,15 @@ #is=sprintf("ones(%d)",dim); cmul=sprintf("(1+i*%d)",cadd); - is=sprintf("ones(%d).*%s",dim,cmul); + #is=sprintf("ones(%d).*%s",dim,cmul); + #sparsersbbench_battery(is,btime) + #is=sprintf("tril(ones(%d).*%s)",dim,cmul); + #sparsersbbench_battery(is,btime) + #is=sprintf("diag(ones(%d,1)).*%s",dim,cmul); + #sparsersbbench_battery(is,btime) + is=sprintf("(diag(ones(%d,1))+sprand(%d,%d,0.1)).*%s",dim,dim,dim,cmul); # FIXME: non repeatable experiment :) sparsersbbench_battery(is,btime) - is=sprintf("tril(ones(%d).*%s)",dim,cmul); - sparsersbbench_battery(is,btime) - is=sprintf("diag(ones(%d,1)).*%s",dim,cmul); - sparsersbbench_battery(is,btime) + # FIXME: need a non-square matrices testing-benchmarking snippet end end This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |