Statistics
| Branch: | Revision:

root / synthbench / euroben-dm / mod2g / .svn / text-base / synhr2d.f.svn-base @ 0:839f52ef7657

History | View | Annotate | Download (1.3 kB)

1
      Subroutine synhr2d( a1, a2, w1, w2, n1, n2, vsize, hsize, ctime )
2
! ---------------------------------------------------------------------
3
! --- 'synhr2d' does a 2-D Haar wavelet synthesis by means of 2 
4
!     sequences of 1-D syntheses. In between a global transpose must
5
!     be done by 'gtrans'. Input array is 'a2'; output array is 'a1'.
6
!     'w1' and 'w2' are output arrays.
7
! ---------------------------------------------------------------------
8
      Use         numerics   
9
      Use         dist_module ! Contains # of proc.s & proc. numbers.
10
      Implicit    None
11
      Include     'mpif.h'
12

    
13
      Integer  :: n1, n2, vsize, hsize
14
      Real(l_) :: a1(n1,hsize), a2(n2,vsize), w1(n1,hsize),
15
     &            w2(n2,vsize)
16
      Real(l_) :: ctime
17

    
18
      Integer  :: i, log2, m
19
      Integer  :: actsiz(0:nodes-1,2), base(0:nodes-1,2)
20
! ---------------------------------------------------------------------
21
      Call sizoff( n2, n1, actsiz, base )
22
      m  = log2( n2 )
23
      Do i = 1, actsiz(me,2)
24
         Call synthr( a2(1,i), w2(1,i), n2, m )
25
      End Do
26
      Call gtrans( w2, w1, n2, n1, hsize, vsize, ctime )
27
      m  = log2( n1 )
28
      Do i = 1, actsiz(me,1)
29
         Call synthr( w1(1,i), a1(1,i), n1, m )
30
      End Do
31
! ---------------------------------------------------------------------
32
      End Subroutine synhr2d