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

g1fwt.cpp File Reference

#include "stormdef.h"

Include dependency graph for g1fwt.cpp:

Include dependency graph

Go to the source code of this file.

Defines

#define H00   STORMDEF_MATHCONST_GHB1H00
#define H10   STORMDEF_MATHCONST_GHB1H10
#define H11   STORMDEF_MATHCONST_GHB1H11

Functions

int g1fwt (const int &Sizef, const int &ns, const int &size, const double *sdata, double *wdata, double *ws)
int g1fwt (const int &Sizef, const int &ns, const int &size, const float *sdata, float *wdata, float *ws)
int g1fwt (const int &Sizef, const int &ns, const int &size, const double *sdata, double *wdata)
int g1fwt (const int &Sizef, const int &ns, const int &size, const float *sdata, float *wdata)


Define Documentation

#define H00   STORMDEF_MATHCONST_GHB1H00
 

Definition at line 15 of file g1fwt.cpp.

Referenced by g1fwt(), g1fwt2ds(), g1fwt3ds(), g1ifwt(), g1ifwt2ds(), and g1ifwt3ds().

#define H10   STORMDEF_MATHCONST_GHB1H10
 

Definition at line 16 of file g1fwt.cpp.

Referenced by g1fwt(), g1fwt2ds(), g1fwt3ds(), g1ifwt(), g1ifwt2ds(), and g1ifwt3ds().

#define H11   STORMDEF_MATHCONST_GHB1H11
 

Definition at line 17 of file g1fwt.cpp.

Referenced by g1fwt(), g1fwt2ds(), g1fwt3ds(), g1ifwt(), g1ifwt2ds(), and g1ifwt3ds().


Function Documentation

int g1fwt const int Sizef,
const int ns,
const int size,
const double *  sdata,
double *  wdata,
double *  ws
 

Definition at line 193 of file g1fwt.cpp.

00200   { 
00201 
00202 #ifdef STORM_USEF
00203 
00204    int iflag;
00205    dg1fwtws_( &Sizef, &ns, &size, sdata, wdata, ws, &iflag );
00206    return iflag;
00207 
00208 #else
00209 
00210    int j,size2;
00211    int size1 = size;
00212 
00213 #ifdef STORM_FWT_CCHECKUSAGE
00214    if ( size1 < ns ) return 1;
00215 #endif
00216 
00217    for( int i = 0; i < 2*size; i++ ) { 
00218       wdata[i] = sdata[i]; 
00219    }
00220    if ( size1 == ns ) return 0;
00221    while ( size1 > ns ) {
00222       size2 = size1 / 2;
00223       for( int i = 0; i < size2; i++ ) {
00224          j = 2 * i;
00225          ws[2*i] = H00 * ( wdata[2*j] + wdata[2*j+2] );
00226          ws[2*i+1] = H10 * ( wdata[2*j] - wdata[2*j+2] )
00227                    + H11 * ( wdata[2*j+1] + wdata[2*j+3] );
00228          ws[2*(size2+i)] = H11 * ( wdata[2*j] - wdata[2*j+2] )
00229                        - H10 * ( wdata[2*j+1] + wdata[2*j+3] );
00230          ws[2*(size2+i)+1]= H00 * ( wdata[2*j+1] - wdata[2*j+3]);
00231       }
00232       for( int i = 0; i < 2*size1; i++ ) { 
00233          wdata[i] = ws[i]; 
00234       }
00235       size1 = size2;
00236    }
00237 
00238 #ifdef STORM_FWT_CCHECKUSAGE
00239    if ( size1 < ns ) return 2;
00240 #endif
00241 
00242    return 0;
00243 
00244 #endif
00245 
00246 } 

int g1fwt const int Sizef,
const int ns,
const int size,
const float *  sdata,
float *  wdata,
float *  ws
 

Definition at line 136 of file g1fwt.cpp.

00143   { 
00144 
00145 #ifdef STORM_USEF
00146 
00147    int iflag;
00148    g1fwtws_( &Sizef, &ns, &size, sdata, wdata, ws, &iflag );
00149    return iflag;
00150 
00151 #else
00152 
00153    int j,size2;
00154    int size1 = size;
00155 
00156 #ifdef STORM_FWT_CCHECKUSAGE
00157    if ( size1 < ns ) return 1;
00158 #endif
00159 
00160    for( int i = 0; i < 2*size; i++ ) { 
00161       wdata[i] = sdata[i]; 
00162    }
00163    if ( size1 == ns ) return 0;
00164    while ( size1 > ns ) {
00165       size2 = size1 / 2;
00166       for( int i = 0; i < size2; i++ ) {
00167          j = 2 * i;
00168          ws[2*i] = H00 * ( wdata[2*j] + wdata[2*j+2] );
00169          ws[2*i+1] = H10 * ( wdata[2*j] - wdata[2*j+2] )
00170                    + H11 * ( wdata[2*j+1] + wdata[2*j+3] );
00171          ws[2*(size2+i)] = H11 * ( wdata[2*j] - wdata[2*j+2] )
00172                        - H10 * ( wdata[2*j+1] + wdata[2*j+3] );
00173          ws[2*(size2+i)+1]= H00 * ( wdata[2*j+1] - wdata[2*j+3]);
00174       }
00175       for( int i = 0; i < 2*size1; i++ ) { 
00176          wdata[i] = ws[i]; 
00177       }
00178       size1 = size2;
00179    }
00180 
00181 #ifdef STORM_FWT_CCHECKUSAGE
00182    if ( size1 < ns ) return 2;
00183 #endif
00184 
00185    return 0;
00186 
00187 #endif
00188 
00189 } 

int g1fwt const int Sizef,
const int ns,
const int size,
const double *  sdata,
double *  wdata
 

Definition at line 77 of file g1fwt.cpp.

00083   { 
00084 
00085 #ifdef STORM_USEF
00086 
00087    int iflag;
00088    dg1fwt_( &Sizef, &ns, &size, sdata, wdata, &iflag );
00089 
00090    return iflag;
00091 
00092 #else
00093 
00094    int j,size2;
00095    int size1 = size;
00096 
00097 #ifdef STORM_FWT_CCHECKUSAGE
00098    if ( size1 < ns ) return 1;
00099 #endif
00100 
00101    for( int i = 0; i < 2*size; i++ ) { 
00102       wdata[i] = sdata[i]; 
00103    }
00104    if ( size1 == ns ) return 0;
00105    double *xx = new double[Sizef*2];
00106    while ( size1 > ns ) {
00107       size2 = size1 / 2;
00108       for( int i = 0; i < size2; i++ ) {
00109          j = 2 * i;
00110          xx[2*i] = H00 * ( wdata[2*j] + wdata[2*j+2] );
00111          xx[2*i+1] = H10 * ( wdata[2*j] - wdata[2*j+2] )
00112                    + H11 * ( wdata[2*j+1] + wdata[2*j+3] );
00113          xx[2*(size2+i)] = H11 * ( wdata[2*j] - wdata[2*j+2] )
00114                        - H10 * ( wdata[2*j+1] + wdata[2*j+3] );
00115          xx[2*(size2+i)+1]= H00 * ( wdata[2*j+1] - wdata[2*j+3]);
00116       }
00117       for( int i = 0; i < 2*size1; i++ ) { 
00118          wdata[i] = xx[i]; 
00119       }
00120       size1 = size2;
00121    }
00122    delete [] xx;
00123 
00124 #ifdef STORM_FWT_CCHECKUSAGE
00125    if ( size1 < ns ) return 2;
00126 #endif
00127 
00128    return 0;
00129 
00130 #endif
00131 
00132 } 

int g1fwt const int Sizef,
const int ns,
const int size,
const float *  sdata,
float *  wdata
 

Definition at line 19 of file g1fwt.cpp.

00025   { 
00026 
00027 #ifdef STORM_USEF
00028 
00029    int iflag;
00030    g1fwt_( &Sizef, &ns, &size, sdata, wdata, &iflag );
00031    return iflag;
00032 
00033 #else
00034 
00035    int j,size2;
00036    int size1 = size;
00037 
00038 #ifdef STORM_FWT_CCHECKUSAGE
00039    if ( size1 < ns ) return 1;
00040 #endif
00041 
00042    for( int i = 0; i < 2*size; i++ ) { 
00043       wdata[i] = sdata[i]; 
00044    }
00045    if ( size1 == ns ) return 0;
00046    float *xx = new float[2*Sizef];
00047    while ( size1 > ns ) {
00048       size2 = size1 / 2;
00049       for( int i = 0; i < size2; i++ ) {
00050          j = 2 * i;
00051          xx[2*i] = H00 * ( wdata[2*j] + wdata[2*j+2] );
00052          xx[2*i+1] = H10 * ( wdata[2*j] - wdata[2*j+2] )
00053                    + H11 * ( wdata[2*j+1] + wdata[2*j+3] );
00054          xx[2*(size2+i)] = H11 * ( wdata[2*j] - wdata[2*j+2] )
00055                        - H10 * ( wdata[2*j+1] + wdata[2*j+3] );
00056          xx[2*(size2+i)+1]= H00 * ( wdata[2*j+1] - wdata[2*j+3]);
00057       }
00058       for( int i = 0; i < 2*size1; i++ ) { 
00059          wdata[i] = xx[i]; 
00060       }
00061       size1 = size2;
00062    }
00063    delete [] xx;
00064 
00065 #ifdef STORM_FWT_CCHECKUSAGE
00066    if ( size1 < ns ) return 2;
00067 #endif
00068 
00069    return 0;
00070 
00071 #endif
00072 
00073 } 


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