cadencii.fft.cftleaf C# (CSharp) Method

cftleaf() static private method

static private cftleaf ( int n, int isplt, double a, int nw, double w ) : void
n int
isplt int
a double
nw int
w double
return void
        static void cftleaf( int n, int isplt, double* a, int nw, double* w ) {
            //void cftmdl1(int n, double *a, double *w);
            //void cftmdl2(int n, double *a, double *w);
            //void cftf161(double *a, double *w);
            //void cftf162(double *a, double *w);
            //void cftf081(double *a, double *w);
            //void cftf082(double *a, double *w);

            if ( n == 512 ) {
                cftmdl1( 128, a, &w[nw - 64] );
                cftf161( a, &w[nw - 8] );
                cftf162( &a[32], &w[nw - 32] );
                cftf161( &a[64], &w[nw - 8] );
                cftf161( &a[96], &w[nw - 8] );
                cftmdl2( 128, &a[128], &w[nw - 128] );
                cftf161( &a[128], &w[nw - 8] );
                cftf162( &a[160], &w[nw - 32] );
                cftf161( &a[192], &w[nw - 8] );
                cftf162( &a[224], &w[nw - 32] );
                cftmdl1( 128, &a[256], &w[nw - 64] );
                cftf161( &a[256], &w[nw - 8] );
                cftf162( &a[288], &w[nw - 32] );
                cftf161( &a[320], &w[nw - 8] );
                cftf161( &a[352], &w[nw - 8] );
                if ( isplt != 0 ) {
                    cftmdl1( 128, &a[384], &w[nw - 64] );
                    cftf161( &a[480], &w[nw - 8] );
                } else {
                    cftmdl2( 128, &a[384], &w[nw - 128] );
                    cftf162( &a[480], &w[nw - 32] );
                }
                cftf161( &a[384], &w[nw - 8] );
                cftf162( &a[416], &w[nw - 32] );
                cftf161( &a[448], &w[nw - 8] );
            } else {
                cftmdl1( 64, a, &w[nw - 32] );
                cftf081( a, &w[nw - 8] );
                cftf082( &a[16], &w[nw - 8] );
                cftf081( &a[32], &w[nw - 8] );
                cftf081( &a[48], &w[nw - 8] );
                cftmdl2( 64, &a[64], &w[nw - 64] );
                cftf081( &a[64], &w[nw - 8] );
                cftf082( &a[80], &w[nw - 8] );
                cftf081( &a[96], &w[nw - 8] );
                cftf082( &a[112], &w[nw - 8] );
                cftmdl1( 64, &a[128], &w[nw - 32] );
                cftf081( &a[128], &w[nw - 8] );
                cftf082( &a[144], &w[nw - 8] );
                cftf081( &a[160], &w[nw - 8] );
                cftf081( &a[176], &w[nw - 8] );
                if ( isplt != 0 ) {
                    cftmdl1( 64, &a[192], &w[nw - 32] );
                    cftf081( &a[240], &w[nw - 8] );
                } else {
                    cftmdl2( 64, &a[192], &w[nw - 64] );
                    cftf082( &a[240], &w[nw - 8] );
                }
                cftf081( &a[192], &w[nw - 8] );
                cftf082( &a[208], &w[nw - 8] );
                cftf081( &a[224], &w[nw - 8] );
            }
        }