Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals

dhfwt_.F

Go to the documentation of this file.
00001 c dhfwt_.F
00002 c*********************************************************************
00003 c*          (c) Copyright 1994-2002 Brown Deer Technology, LLC.
00004 c*                        All rights reserved.
00005 c*********************************************************************
00006 
00007         subroutine dhfwt(Sizef,ns,size,sdata,wdata,iflag)
00008 
00009         implicit none
00010 
00011 c       ****************************************
00012 c       ***** COMMON BLOCKS AND PARAMETERS *****
00013 c       ****************************************
00014 
00015 #include "stormdef.h"
00016         double precision INVSQRT2
00017         parameter( INVSQRT2 = STORMDEF_MATHCONST_INVSQRT2d0 )
00018 
00019 c       *******************************
00020 c       ***** VARIABLES EXCHANGED *****
00021 c       *******************************
00022 
00023         integer Sizef
00024         integer ns
00025         integer size
00026         double precision sdata(Sizef)
00027         double precision wdata(Sizef)
00028         integer iflag
00029 
00030 c       ***************************
00031 c       ***** LOCAL VARIABLES *****
00032 c       ***************************
00033 
00034         integer i,j,size1,size2
00035         double precision xx(Sizef)
00036 
00037 c       ******************************
00038 c       ***** EXTERNAL FUNCTIONS *****
00039 c       ******************************
00040 
00041 #ifdef STORM_FWT_FCHECKUSAGE
00042         if (size.lt.ns) then
00043            iflag=1
00044            return
00045         endif
00046 #endif
00047 
00048         do i=1,size
00049            wdata(i)=sdata(i)
00050         enddo
00051 
00052         if (size.eq.ns) then
00053            iflag=0
00054            return
00055         endif
00056 
00057         size1=size
00058 
00059 10      continue
00060         size2=size1/2
00061         do i = 1, size2
00062            j = 2*i - 1
00063            xx(i) = ( wdata(j) + wdata(j+1) ) * INVSQRT2
00064            xx(size2+i) = ( wdata(j) - wdata(j+1) ) * INVSQRT2
00065         enddo
00066         do i=1,size1
00067            wdata(i)=xx(i)
00068         enddo
00069         size1=size2
00070 
00071         if (size1.gt.ns) then
00072            goto 10
00073         endif
00074 
00075 #ifdef STORM_FWT_FCHECKUSAGE
00076         if (size1.lt.ns) then
00077            iflag=2
00078            return
00079         endif
00080 #endif
00081 
00082         iflag=0
00083 
00084         return
00085         end
00086 

Generated on Mon May 31 21:38:45 2004 for SR2k4 Assembler by doxygen 1.3.6