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

hfwt.h File Reference

Go to the source code of this file.

Functions

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


Function Documentation

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

Definition at line 262 of file hfwt.cpp.

References ihfwtws_(), j, sdata(), size1, and wdata().

00269   { 
00270 
00271 #ifdef STORM_USEF
00272 
00273    int iflag;
00274    ihfwtws_( &Sizef, &ns, &size, sdata, wdata, ws, &iflag );
00275    return iflag;
00276 
00277 #else
00278 
00279    int j,size2;
00280    int size1 = size;
00281 
00282 #ifdef STORM_FWT_CCHECKUSAGE
00283    if ( size1 < ns ) return 1;
00284 #endif
00285 
00286    for( int i = 0; i < size1; i++ ) { wdata[i] = sdata[i]; }
00287    if ( size1 == ns ) return 0;
00288    while ( size1 > ns ) {
00289       size2 = size1 / 2;
00290       for( int i = 0; i < size2; i++ ) {
00291          j = 2 * i;
00292          ws[i] = ( wdata[j] + wdata[j+1] ) / 2;
00293          ws[size2+i] = wdata[j] - wdata[j+1];
00294       }
00295       for( int i = 0; i < size1; i++ ) { wdata[i] = ws[i]; }
00296       size1 = size2;
00297    }
00298 
00299 #ifdef STORM_FWT_CCHECKUSAGE
00300    if ( size1 != ns ) return 2;
00301 #endif
00302 
00303    return 0;
00304 
00305 #endif
00306 
00307 } 

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

Definition at line 214 of file hfwt.cpp.

References dhfwtws_(), INVSQRT2, j, sdata(), size1, and wdata().

00221   { 
00222 
00223 #ifdef STORM_USEF
00224 
00225    int iflag;
00226    dhfwtws_( &Sizef, &ns, &size, sdata, wdata, ws, &iflag );
00227    return iflag;
00228 
00229 #else
00230 
00231    int j,size2;
00232    int size1 = size;
00233 
00234 #ifdef STORM_FWT_CCHECKUSAGE
00235    if ( size1 < ns ) return 1;
00236 #endif
00237 
00238    for( int i = 0; i < size1; i++ ) { wdata[i] = sdata[i]; }
00239    if ( size1 == ns ) return 0;
00240    while ( size1 > ns ) {
00241       size2 = size1 / 2;
00242       for( int i = 0; i < size2; i++ ) {
00243          j = 2 * i;
00244          ws[i] = ( wdata[j] + wdata[j+1] ) * INVSQRT2;
00245          ws[size2+i] = ( wdata[j] - wdata[j+1] ) * INVSQRT2;
00246       }
00247       for( int i = 0; i < size1; i++ ) { wdata[i] = ws[i]; }
00248       size1 = size2;
00249    }
00250 
00251 #ifdef STORM_FWT_CCHECKUSAGE
00252    if ( size1 != ns ) return 2;
00253 #endif
00254 
00255    return 0;
00256 
00257 #endif
00258 
00259 } 

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

Definition at line 166 of file hfwt.cpp.

References hfwtws_(), INVSQRT2, j, sdata(), size1, and wdata().

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

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

Definition at line 117 of file hfwt.cpp.

References ihfwt_(), j, sdata(), size1, and wdata().

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

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

Definition at line 68 of file hfwt.cpp.

References dhfwt_(), INVSQRT2, j, sdata(), size1, and wdata().

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

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

Definition at line 19 of file hfwt.cpp.

References hfwt_(), INVSQRT2, j, sdata(), size1, and wdata().

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


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