Mercurial > hg > octave-terminal
changeset 10946:1094868ca10d
fix bugs in inner convolution
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Tue, 07 Sep 2010 12:23:01 +0200 |
parents | aa40bdbfa478 |
children | dc74ce93cfc4 |
files | libcruft/ChangeLog libcruft/blas-xtra/cconv2.f libcruft/blas-xtra/csconv2.f libcruft/blas-xtra/dconv2.f libcruft/blas-xtra/sconv2.f libcruft/blas-xtra/zconv2.f libcruft/blas-xtra/zdconv2.f |
diffstat | 7 files changed, 16 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/libcruft/ChangeLog +++ b/libcruft/ChangeLog @@ -1,3 +1,9 @@ +2010-09-07 Jaroslav Hajek <highegg@gmail.com> + + * blas-xtra/cconv2.f, blas-xtra/csconv2.f, blas-xtra/dconv2.f, + blas-xtra/sconv2.f, blas-xtra/zconv2.f, blas-xtra/zdconv2.f: + Fix inner convolution formula. + 2010-07-27 Jaroslav Hajek <highegg@gmail.com> * lapack-xtra/zrsf2csf.f, lapack-xtra/crsf2csf.f: New sources.
--- a/libcruft/blas-xtra/cconv2.f +++ b/libcruft/blas-xtra/cconv2.f @@ -52,7 +52,7 @@ c equivalent to the following: c for i = 1:ma-mb+1 c for j = 1:na-nb+1 -c c(i,j) = sum (sum (a(i:i+mb-1,j:j+nb-1) .* b)) +c c(i,j) = sum (sum (a(i+mb-1:-1:i,j+nb-1:-1:j) .* b)) c endfor c endfor c arguments: @@ -70,7 +70,7 @@ do k = 1,na-nb+1 do j = 1,nb do i = 1,mb - call caxpy(ma-mb+1,b(i,j),a(i,k+j-1),1,c(1,k),1) + call caxpy(ma-mb+1,b(i,j),a(mb+1-i,k+j-1),1,c(1,k),1) end do end do end do
--- a/libcruft/blas-xtra/csconv2.f +++ b/libcruft/blas-xtra/csconv2.f @@ -76,7 +76,7 @@ do j = 1,nb do i = 1,mb btmp = b(i,j) - call caxpy(ma-mb+1,btmp,a(i,k+j-1),1,c(1,k),1) + call caxpy(ma-mb+1,btmp,a(mb+1-i,k+j-1),1,c(1,k),1) end do end do end do
--- a/libcruft/blas-xtra/dconv2.f +++ b/libcruft/blas-xtra/dconv2.f @@ -52,7 +52,7 @@ c equivalent to the following: c for i = 1:ma-mb+1 c for j = 1:na-nb+1 -c c(i,j) = sum (sum (a(i:i+mb-1,j:j+nb-1) .* b)) +c c(i,j) = sum (sum (a(i+mb-1:-1:i,j+nb-1:-1:j) .* b)) c endfor c endfor c arguments: @@ -70,7 +70,7 @@ do k = 1,na-nb+1 do j = 1,nb do i = 1,mb - call daxpy(ma-mb+1,b(i,j),a(i,k+j-1),1,c(1,k),1) + call daxpy(ma-mb+1,b(i,j),a(mb+1-i,k+j-1),1,c(1,k),1) end do end do end do
--- a/libcruft/blas-xtra/sconv2.f +++ b/libcruft/blas-xtra/sconv2.f @@ -52,7 +52,7 @@ c equivalent to the following: c for i = 1:ma-mb+1 c for j = 1:na-nb+1 -c c(i,j) = sum (sum (a(i:i+mb-1,j:j+nb-1) .* b)) +c c(i,j) = sum (sum (a(i+mb-1:-1:i,j+nb-1:-1:j) .* b)) c endfor c endfor c arguments: @@ -70,7 +70,7 @@ do k = 1,na-nb+1 do j = 1,nb do i = 1,mb - call saxpy(ma-mb+1,b(i,j),a(i,k+j-1),1,c(1,k),1) + call saxpy(ma-mb+1,b(i,j),a(mb+1-i,k+j-1),1,c(1,k),1) end do end do end do
--- a/libcruft/blas-xtra/zconv2.f +++ b/libcruft/blas-xtra/zconv2.f @@ -52,7 +52,7 @@ c equivalent to the following: c for i = 1:ma-mb+1 c for j = 1:na-nb+1 -c c(i,j) = sum (sum (a(i:i+mb-1,j:j+nb-1) .* b)) +c c(i,j) = sum (sum (a(i+mb-1:-1:i,j+nb-1:-1:j) .* b)) c endfor c endfor c arguments: @@ -70,7 +70,7 @@ do k = 1,na-nb+1 do j = 1,nb do i = 1,mb - call zaxpy(ma-mb+1,b(i,j),a(i,k+j-1),1,c(1,k),1) + call zaxpy(ma-mb+1,b(i,j),a(mb+1-i,k+j-1),1,c(1,k),1) end do end do end do