From 5ee9715c5cb9694f0af6aa580ec9855b052d6d9b Mon Sep 17 00:00:00 2001 From: "Timothy B.B Terriberry" Date: Sun, 21 Sep 2008 15:10:58 -0400 Subject: Change cwrsi() to operate on rows of U instead of columns. It is no slower with a large number of pulses, and as much as 30% faster with a large number of dimensions. --- tests/cwrs32-test.c | 8 ++++---- tests/cwrs64-test.c | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'tests') diff --git a/tests/cwrs32-test.c b/tests/cwrs32-test.c index 6b193e3..e97ba64 100644 --- a/tests/cwrs32-test.c +++ b/tests/cwrs32-test.c @@ -13,7 +13,7 @@ int main(int _argc,char **_argv){ for(n=2;n<=NMAX;n++){ int m; for(m=1;m<=MMAX;m++){ - celt_uint32_t uu[NMAX]; + celt_uint32_t uu[MMAX+2]; celt_uint32_t inc; celt_uint32_t nc; celt_uint32_t i; @@ -21,12 +21,12 @@ int main(int _argc,char **_argv){ inc=nc/10000; if(inc<1)inc=1; for(i=0;iMMAX+2?NMAX:MMAX+2]; + celt_uint32_t u[MMAX+2]; int y[NMAX]; celt_uint32_t v; int k; - memcpy(u,uu,n*sizeof(*u)); - cwrsi32(n,m,i,nc,y,u); + memcpy(u,uu,(m+2)*sizeof(*u)); + cwrsi32(n,m,i,y,u); /*printf("%6u of %u:",i,nc); for(k=0;k");*/ diff --git a/tests/cwrs64-test.c b/tests/cwrs64-test.c index e699deb..548fa22 100644 --- a/tests/cwrs64-test.c +++ b/tests/cwrs64-test.c @@ -14,7 +14,7 @@ int main(int _argc,char **_argv){ for(n=2;n<=NMAX;n+=3){ int m; for(m=1;m<=MMAX;m++){ - celt_uint64_t uu[NMAX]; + celt_uint64_t uu[MMAX+2]; celt_uint64_t inc; celt_uint64_t nc; celt_uint64_t i; @@ -24,12 +24,12 @@ int main(int _argc,char **_argv){ if(inc<1)inc=1; /*printf("%d/%d: %llu",n,m, nc);*/ for(i=0;iMMAX+2?NMAX:MMAX+2]; + celt_uint64_t u[MMAX+2]; int y[NMAX]; celt_uint64_t v; int k; - memcpy(u,uu,n*sizeof(*u)); - cwrsi64(n,m,i,nc,y,u); + memcpy(u,uu,(m+2)*sizeof(*u)); + cwrsi64(n,m,i,y,u); /*printf("%llu of %llu:",i,nc); for(k=0;k");*/ -- cgit v1.2.3