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

hifwt.h File Reference

Go to the source code of this file.

Functions

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


Function Documentation

int hifwt const int Sizef,
const int ns,
const int size,
const int wdata,
int sdata,
int ws
 

Definition at line 271 of file hifwt.cpp.

References ihifwtws_(), sdata(), size1, and wdata().

00278   { 
00279 
00280 #ifdef STORM_USEF
00281 
00282    int iflag;
00283    ihifwtws_( &Sizef, &ns, &size, wdata, sdata, ws, &iflag );
00284    return iflag;
00285 
00286 #else
00287 
00288    int size2;
00289    int size1 = ns;
00290 
00291    if ( size < ns ) return 1;
00292 
00293    if ( size == ns ) {
00294       for( int i = 0; i < size; i++ ) { sdata[i] = wdata[i]; }
00295       return 0; 
00296    }
00297    for( int i = 0; i < size; i++ ) { ws[i] = wdata[i]; }
00298    while ( size1 < size ) {
00299       size2 = size1;
00300       size1 = 2 * size1;
00301       for( int i = 0; i < size2; i++ ) {
00302          sdata[2*i] = ( ws[i] + ws[size2+i] ) / 2;
00303          sdata[2*i+1] = ws[i] - ws[size2+i];
00304       }
00305       for( int i = 0; i < size1; i++ ) { ws[i] = sdata[i]; }
00306    }
00307 
00308 #ifdef STORM_FWT_CCHECKUSAGE
00309    if ( size1 != size ) return 2;
00310 #endif
00311 
00312    return 0;
00313 
00314 #endif
00315 
00316 } 

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

Definition at line 221 of file hifwt.cpp.

References dhifwtws_(), INVSQRT2, sdata(), size1, and wdata().

00228   { 
00229 
00230 #ifdef STORM_USEF
00231 
00232    int iflag;
00233    dhifwtws_( &Sizef, &ns, &size, wdata, sdata, ws, &iflag );
00234    return iflag;
00235 
00236 #else
00237 
00238    int size2;
00239    int size1 = ns;
00240 
00241 #ifdef STORM_FWT_CCHECKUSAGE
00242    if ( size < ns ) return 1;
00243 #endif
00244 
00245    if ( size == ns ) {
00246       for( int i = 0; i < size; i++ ) { sdata[i] = wdata[i]; }
00247       return 0;
00248    }
00249    for( int i = 0; i < size; i++ ) { ws[i] = wdata[i]; }
00250    while ( size1 < size ) {
00251       size2 = size1; 
00252       size1 = 2 * size1;
00253       for( int i = 0; i < size2; i++ ) {
00254          sdata[2*i] = ( ws[i] + ws[size2+i] ) * INVSQRT2;
00255          sdata[2*i+1] = ( ws[i] - ws[size2+i] ) * INVSQRT2;
00256       }
00257       for( int i = 0; i < size1; i++ ) { ws[i] = sdata[i]; }
00258    }
00259 
00260 #ifdef STORM_FWT_CCHECKUSAGE
00261    if ( size1 != size ) return 2;
00262 #endif
00263 
00264    return 0;
00265 
00266 #endif
00267 
00268 } 

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

Definition at line 171 of file hifwt.cpp.

References hifwtws_(), INVSQRT2, sdata(), size1, and wdata().

00178   { 
00179 
00180 #ifdef STORM_USEF
00181 
00182    int iflag;
00183    hifwtws_( &Sizef, &ns, &size, wdata, sdata, ws, &iflag );
00184    return iflag;
00185 
00186 #else
00187 
00188    int size2;
00189    int size1 = ns;
00190 
00191 #ifdef STORM_FWT_CCHECKUSAGE
00192    if ( size < ns ) return 1;
00193 #endif
00194 
00195    if ( size == ns ) {
00196       for( int i = 0; i < size; i++ ) { sdata[i] = wdata[i]; }
00197       return 0; 
00198    }
00199    for( int i = 0; i < size; i++ ) { ws[i] = wdata[i]; }
00200    while ( size1 < size ) {
00201       size2 = size1;
00202       size1 = 2 * size1;
00203       for( int i = 0; i < size2; i++ ) {
00204          sdata[2*i] = ( ws[i] + ws[size2+i] ) * INVSQRT2;
00205          sdata[2*i+1] = ( ws[i] - ws[size2+i] ) * INVSQRT2;
00206       }
00207       for( int i = 0; i < size1; i++ ) { ws[i] = sdata[i]; }
00208    }
00209 
00210 #ifdef STORM_FWT_CCHECKUSAGE
00211    if ( size1 != size ) return 2;
00212 #endif
00213 
00214    return 0;
00215 
00216 #endif
00217 
00218 } 

int hifwt const int Sizef,
const int ns,
const int size,
const int wdata,
int sdata
 

Definition at line 120 of file hifwt.cpp.

References ihifwt_(), sdata(), size1, and wdata().

00126   { 
00127 
00128 #ifdef STORM_USEF
00129 
00130    int iflag;
00131    ihifwt_( &Sizef, &ns, &size, wdata, sdata, &iflag );
00132    return iflag;
00133 
00134 #else
00135 
00136    int size2;
00137    int size1 = ns;
00138    int *xx = new int[Sizef];
00139 
00140 #ifdef STORM_FWT_CCHECKUSAGE
00141    if ( size < ns ) return 1;
00142 #endif
00143 
00144    if ( size == ns ) {
00145       for( int i = 0; i < size; i++ ) { sdata[i] = wdata[i]; }
00146       return 0; 
00147    }
00148    for( int i = 0; i < size; i++ ) { xx[i] = wdata[i]; }
00149    while ( size1 < size ) {
00150       size2 = size1;
00151       size1 = 2 * size1;
00152       for( int i = 0; i < size2; i++ ) {
00153          sdata[2*i] = ( xx[i] + xx[size2+i] ) / 2;
00154          sdata[2*i+1] = xx[i] - xx[size2+i];
00155       }
00156       for( int i = 0; i < size1; i++ ) { xx[i] = sdata[i]; }
00157    }
00158    delete [] xx;
00159 
00160 #ifdef STORM_FWT_CCHECKUSAGE
00161    if ( size1 != size ) return 2;
00162 #endif
00163 
00164    return 0;
00165 
00166 #endif
00167 
00168 } 

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

Definition at line 69 of file hifwt.cpp.

References dhifwt_(), INVSQRT2, sdata(), size1, and wdata().

00075   { 
00076 
00077 #ifdef STORM_USEF
00078 
00079    int iflag;
00080    dhifwt_( &Sizef, &ns, &size, wdata, sdata, &iflag );
00081    return iflag;
00082 
00083 #else
00084 
00085    int size2;
00086    int size1 = ns;
00087    double *xx = new double[Sizef];
00088 
00089 #ifdef STORM_FWT_CCHECKUSAGE
00090    if ( size < ns ) return 1;
00091 #endif
00092 
00093    if ( size == ns ) {
00094       for( int i = 0; i < size; i++ ) { sdata[i] = wdata[i]; }
00095       return 0;
00096    }
00097    for( int i = 0; i < size; i++ ) { xx[i] = wdata[i]; }
00098    while ( size1 < size ) {
00099       size2 = size1; 
00100       size1 = 2 * size1;
00101       for( int i = 0; i < size2; i++ ) {
00102          sdata[2*i] = ( xx[i] + xx[size2+i] ) * INVSQRT2;
00103          sdata[2*i+1] = ( xx[i] - xx[size2+i] ) * INVSQRT2;
00104       }
00105       for( int i = 0; i < size1; i++ ) { xx[i] = sdata[i]; }
00106    }
00107    delete [] xx;
00108 
00109 #ifdef STORM_FWT_CCHECKUSAGE
00110    if ( size1 != size ) return 2;
00111 #endif
00112 
00113    return 0;
00114 
00115 #endif
00116 
00117 } 

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

Definition at line 19 of file hifwt.cpp.

References hifwt_(), INVSQRT2, sdata(), size1, and wdata().

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


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