Code Library Of Others/sgtlaugh/FFT Extended + OP.cpp
void transform_unrolled(complx *in, complx *out, complx* ar){
	    for (int i = 0; i < len; i++) out[i] = in[rev[i]];
	    for (int k = 1; k < len; k <<= 1){
            for (int i = 0; i < len; i += (k << 1)){
                complx z, *a = out + i, *b = out + i + k, *c = ar + k;
                if (k == 1){
                    z = (*b) * (*c);
                    *b = *a - z, *a = *a + z;
                }

                for (int j = 0; j < k && k > 1; j += 2, a++, b++, c++){
                    z = (*b) * (*c);
                    *b = *a - z, *a = *a + z;
                    a++, b++, c++;
                    z = (*b) * (*c);
                    *b = *a - z, *a = *a + z;
                }
            }
	    }
	}
/// Fast Fourier Transformation, iterative divide and conquer unrolled and optimized
Fast Fourier Transformation, iterative divide and conquer unrolled and optimized
Fast Fourier Transformation iterative divide and conquer unrolled and optimized
void transform_unrolled(complx *in, complx *out, complx* ar){
	    for (int i = 0; i < len; i++) out[i] = in[rev[i]];
	    for (int k = 1; k < len; k <<= 1){
            for (int i = 0; i < len; i += (k << 1)){
                complx z, *a = out + i, *b = out + i + k, *c = ar + k;
                if (k == 1){
                    z = (*b) * (*c);
                    *b = *a - z, *a = *a + z;
                }
                for (int j = 0; j < k && k > 1; j += 2, a++, b++, c++){
                    z = (*b) * (*c);
                    *b = *a - z, *a = *a + z;
                    a++, b++, c++;
                    z = (*b) * (*c);
                    *b = *a - z, *a = *a + z;
                }
            }
	    }
	}
void transform_unrolled ( complx * in , complx * out , complx * ar ) { for ( int i = 0 ; i < len ; i ++ ) out [ i ] = in [ rev [ i ] ] ; for ( int k = 1 ; k < len ; k <<= 1 ) { for ( int i = 0 ; i < len ; i += ( k << 1 ) ) { complx z , * a = out + i , * b = out + i + k , * c = ar + k ; if ( k == 1 ) { z = ( * b ) * ( * c ) ; * b = * a - z , * a = * a + z ; } for ( int j = 0 ; j < k && k > 1 ; j += 2 , a ++ , b ++ , c ++ ) { z = ( * b ) * ( * c ) ; * b = * a - z , * a = * a + z ; a ++ , b ++ , c ++ ; z = ( * b ) * ( * c ) ; * b = * a - z , * a = * a + z ; } } } }
Fast Fourier Transformation, iterative divide and conquer unrolled and optimized
Fast Fourier Transformation iterative divide and conquer unrolled and optimized