<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>GNU Radio 3.2.2 C++ API: fft_1d_r2.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript"> $(document).ready(initResizable); </script> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.7.3 --> <div id="top"> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">GNU Radio 3.2.2 C++ API</div> </td> </tr> </tbody> </table> </div> </div> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> initNavTree('fft__1d__r2_8h.html',''); </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <h1>fft_1d_r2.h</h1> </div> </div> <div class="contents"> <a href="fft__1d__r2_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* -------------------------------------------------------------- */</span> <a name="l00002"></a>00002 <span class="comment">/* (C)Copyright 2001,2007, */</span> <a name="l00003"></a>00003 <span class="comment">/* International Business Machines Corporation, */</span> <a name="l00004"></a>00004 <span class="comment">/* Sony Computer Entertainment, Incorporated, */</span> <a name="l00005"></a>00005 <span class="comment">/* Toshiba Corporation, */</span> <a name="l00006"></a>00006 <span class="comment">/* */</span> <a name="l00007"></a>00007 <span class="comment">/* All Rights Reserved. */</span> <a name="l00008"></a>00008 <span class="comment">/* */</span> <a name="l00009"></a>00009 <span class="comment">/* Redistribution and use in source and binary forms, with or */</span> <a name="l00010"></a>00010 <span class="comment">/* without modification, are permitted provided that the */</span> <a name="l00011"></a>00011 <span class="comment">/* following conditions are met: */</span> <a name="l00012"></a>00012 <span class="comment">/* */</span> <a name="l00013"></a>00013 <span class="comment">/* - Redistributions of source code must retain the above copyright*/</span> <a name="l00014"></a>00014 <span class="comment">/* notice, this list of conditions and the following disclaimer. */</span> <a name="l00015"></a>00015 <span class="comment">/* */</span> <a name="l00016"></a>00016 <span class="comment">/* - Redistributions in binary form must reproduce the above */</span> <a name="l00017"></a>00017 <span class="comment">/* copyright notice, this list of conditions and the following */</span> <a name="l00018"></a>00018 <span class="comment">/* disclaimer in the documentation and/or other materials */</span> <a name="l00019"></a>00019 <span class="comment">/* provided with the distribution. */</span> <a name="l00020"></a>00020 <span class="comment">/* */</span> <a name="l00021"></a>00021 <span class="comment">/* - Neither the name of IBM Corporation nor the names of its */</span> <a name="l00022"></a>00022 <span class="comment">/* contributors may be used to endorse or promote products */</span> <a name="l00023"></a>00023 <span class="comment">/* derived from this software without specific prior written */</span> <a name="l00024"></a>00024 <span class="comment">/* permission. */</span> <a name="l00025"></a>00025 <span class="comment">/* */</span> <a name="l00026"></a>00026 <span class="comment">/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND */</span> <a name="l00027"></a>00027 <span class="comment">/* CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, */</span> <a name="l00028"></a>00028 <span class="comment">/* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF */</span> <a name="l00029"></a>00029 <span class="comment">/* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE */</span> <a name="l00030"></a>00030 <span class="comment">/* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR */</span> <a name="l00031"></a>00031 <span class="comment">/* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */</span> <a name="l00032"></a>00032 <span class="comment">/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT */</span> <a name="l00033"></a>00033 <span class="comment">/* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; */</span> <a name="l00034"></a>00034 <span class="comment">/* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) */</span> <a name="l00035"></a>00035 <span class="comment">/* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN */</span> <a name="l00036"></a>00036 <span class="comment">/* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR */</span> <a name="l00037"></a>00037 <span class="comment">/* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, */</span> <a name="l00038"></a>00038 <span class="comment">/* EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */</span> <a name="l00039"></a>00039 <span class="comment">/* -------------------------------------------------------------- */</span> <a name="l00040"></a>00040 <span class="comment">/* PROLOG END TAG zYx */</span> <a name="l00041"></a>00041 <span class="preprocessor">#ifndef _FFT_1D_R2_H_</span> <a name="l00042"></a>00042 <span class="preprocessor"></span><span class="preprocessor">#define _FFT_1D_R2_H_ 1</span> <a name="l00043"></a>00043 <span class="preprocessor"></span> <a name="l00044"></a>00044 <span class="preprocessor">#include "<a class="code" href="fft__1d_8h.html">fft_1d.h</a>"</span> <a name="l00045"></a>00045 <a name="l00046"></a>00046 <span class="comment">/* fft_1d_r2</span> <a name="l00047"></a>00047 <span class="comment"> * ---------</span> <a name="l00048"></a>00048 <span class="comment"> * Performs a single precision, complex Fast Fourier Transform using </span> <a name="l00049"></a>00049 <span class="comment"> * the DFT (Discrete Fourier Transform) with radix-2 decimation in time. </span> <a name="l00050"></a>00050 <span class="comment"> * The input <in> is an array of complex numbers of length (1<<log2_size)</span> <a name="l00051"></a>00051 <span class="comment"> * entries. The result is returned in the array of complex numbers specified</span> <a name="l00052"></a>00052 <span class="comment"> * by <out>. Note: This routine can support an in-place transformation</span> <a name="l00053"></a>00053 <span class="comment"> * by specifying <in> and <out> to be the same array.</span> <a name="l00054"></a>00054 <span class="comment"> *</span> <a name="l00055"></a>00055 <span class="comment"> * This implementation utilizes the Cooley-Tukey algorithm consisting </span> <a name="l00056"></a>00056 <span class="comment"> * of <log2_size> stages. The basic operation is the butterfly.</span> <a name="l00057"></a>00057 <span class="comment"> *</span> <a name="l00058"></a>00058 <span class="comment"> * p --------------------------> P = p + q*Wi</span> <a name="l00059"></a>00059 <span class="comment"> * \ /</span> <a name="l00060"></a>00060 <span class="comment"> * \ /</span> <a name="l00061"></a>00061 <span class="comment"> * \ /</span> <a name="l00062"></a>00062 <span class="comment"> * \/</span> <a name="l00063"></a>00063 <span class="comment"> * /\</span> <a name="l00064"></a>00064 <span class="comment"> * / \</span> <a name="l00065"></a>00065 <span class="comment"> * / \</span> <a name="l00066"></a>00066 <span class="comment"> * ____ / \</span> <a name="l00067"></a>00067 <span class="comment"> * q --| Wi |-----------------> Q = p - q*Wi</span> <a name="l00068"></a>00068 <span class="comment"> * ----</span> <a name="l00069"></a>00069 <span class="comment"> *</span> <a name="l00070"></a>00070 <span class="comment"> * This routine also requires pre-computed twiddle values, W. W is an</span> <a name="l00071"></a>00071 <span class="comment"> * array of single precision complex numbers of length 1<<(log2_size-2) </span> <a name="l00072"></a>00072 <span class="comment"> * and is computed as follows:</span> <a name="l00073"></a>00073 <span class="comment"> *</span> <a name="l00074"></a>00074 <span class="comment"> * for (i=0; i<n/4; i++)</span> <a name="l00075"></a>00075 <span class="comment"> * W[i].real = cos(i * 2*PI/n);</span> <a name="l00076"></a>00076 <span class="comment"> * W[i].imag = -sin(i * 2*PI/n);</span> <a name="l00077"></a>00077 <span class="comment"> * }</span> <a name="l00078"></a>00078 <span class="comment"> *</span> <a name="l00079"></a>00079 <span class="comment"> * This array actually only contains the first half of the twiddle</span> <a name="l00080"></a>00080 <span class="comment"> * factors. Due for symmetry, the second half of the twiddle factors</span> <a name="l00081"></a>00081 <span class="comment"> * are implied and equal:</span> <a name="l00082"></a>00082 <span class="comment"> *</span> <a name="l00083"></a>00083 <span class="comment"> * for (i=0; i<n/4; i++)</span> <a name="l00084"></a>00084 <span class="comment"> * W[i+n/4].real = W[i].imag = sin(i * 2*PI/n);</span> <a name="l00085"></a>00085 <span class="comment"> * W[i+n/4].imag = -W[i].real = -cos(i * 2*PI/n);</span> <a name="l00086"></a>00086 <span class="comment"> * }</span> <a name="l00087"></a>00087 <span class="comment"> *</span> <a name="l00088"></a>00088 <span class="comment"> * Further symmetry allows one to generate the twiddle factor table </span> <a name="l00089"></a>00089 <span class="comment"> * using half the number of trig computations as follows:</span> <a name="l00090"></a>00090 <span class="comment"> *</span> <a name="l00091"></a>00091 <span class="comment"> * W[0].real = 1.0;</span> <a name="l00092"></a>00092 <span class="comment"> * W[0].imag = 0.0;</span> <a name="l00093"></a>00093 <span class="comment"> * for (i=1; i<n/4; i++)</span> <a name="l00094"></a>00094 <span class="comment"> * W[i].real = cos(i * 2*PI/n);</span> <a name="l00095"></a>00095 <span class="comment"> * W[n/4 - i].imag = -W[i].real;</span> <a name="l00096"></a>00096 <span class="comment"> * }</span> <a name="l00097"></a>00097 <span class="comment"> *</span> <a name="l00098"></a>00098 <span class="comment"> * The complex numbers are packed into quadwords as follows:</span> <a name="l00099"></a>00099 <span class="comment"> *</span> <a name="l00100"></a>00100 <span class="comment"> * quadword complex</span> <a name="l00101"></a>00101 <span class="comment"> * array element array elements</span> <a name="l00102"></a>00102 <span class="comment"> * -----------------------------------------------------</span> <a name="l00103"></a>00103 <span class="comment"> * i | real 2*i | imag 2*i | real 2*i+1 | imag 2*i+1 | </span> <a name="l00104"></a>00104 <span class="comment"> * -----------------------------------------------------</span> <a name="l00105"></a>00105 <span class="comment"> *</span> <a name="l00106"></a>00106 <span class="comment"> */</span> <a name="l00107"></a>00107 <a name="l00108"></a>00108 <a name="l00109"></a><a class="code" href="fft__1d__r2_8h.html#adb7e8a704b1ac7da3a8f6408be60979b">00109</a> <span class="keyword">static</span> __inline <span class="keywordtype">void</span> <a class="code" href="fft__1d__r2_8h.html#adb7e8a704b1ac7da3a8f6408be60979b">_fft_1d_r2</a>(vector <span class="keywordtype">float</span> *out, vector <span class="keywordtype">float</span> *in, vector <span class="keywordtype">float</span> *W, <span class="keywordtype">int</span> log2_size) <a name="l00110"></a>00110 { <a name="l00111"></a>00111 <span class="keywordtype">int</span> i, j, k; <a name="l00112"></a>00112 <span class="keywordtype">int</span> stage, offset; <a name="l00113"></a>00113 <span class="keywordtype">int</span> i_rev; <a name="l00114"></a>00114 <span class="keywordtype">int</span> n, n_2, n_4, n_8, n_16, n_3_16; <a name="l00115"></a>00115 <span class="keywordtype">int</span> w_stride, w_2stride, w_3stride, w_4stride; <a name="l00116"></a>00116 <span class="keywordtype">int</span> stride, stride_2, stride_4, stride_3_4; <a name="l00117"></a>00117 vector <span class="keywordtype">float</span> *W0, *W1, *W2, *W3; <a name="l00118"></a>00118 vector <span class="keywordtype">float</span> *re0, *re1, *re2, *re3; <a name="l00119"></a>00119 vector <span class="keywordtype">float</span> *im0, *im1, *im2, *im3; <a name="l00120"></a>00120 vector <span class="keywordtype">float</span> *in0, *in1, *in2, *in3, *in4, *in5, *in6, *in7; <a name="l00121"></a>00121 vector <span class="keywordtype">float</span> *out0, *out1, *out2, *out3; <a name="l00122"></a>00122 vector <span class="keywordtype">float</span> tmp0, tmp1; <a name="l00123"></a>00123 vector <span class="keywordtype">float</span> w0_re, w0_im, w1_re, w1_im; <a name="l00124"></a>00124 vector <span class="keywordtype">float</span> w0, w1, w2, w3; <a name="l00125"></a>00125 vector <span class="keywordtype">float</span> src_lo0, src_lo1, src_lo2, src_lo3; <a name="l00126"></a>00126 vector <span class="keywordtype">float</span> src_hi0, src_hi1, src_hi2, src_hi3; <a name="l00127"></a>00127 vector <span class="keywordtype">float</span> dst_lo0, dst_lo1, dst_lo2, dst_lo3; <a name="l00128"></a>00128 vector <span class="keywordtype">float</span> dst_hi0, dst_hi1, dst_hi2, dst_hi3; <a name="l00129"></a>00129 vector <span class="keywordtype">float</span> out_re_lo0, out_re_lo1, out_re_lo2, out_re_lo3; <a name="l00130"></a>00130 vector <span class="keywordtype">float</span> out_im_lo0, out_im_lo1, out_im_lo2, out_im_lo3; <a name="l00131"></a>00131 vector <span class="keywordtype">float</span> out_re_hi0, out_re_hi1, out_re_hi2, out_re_hi3; <a name="l00132"></a>00132 vector <span class="keywordtype">float</span> out_im_hi0, out_im_hi1, out_im_hi2, out_im_hi3; <a name="l00133"></a>00133 vector <span class="keywordtype">float</span> re_lo0, re_lo1, re_lo2, re_lo3; <a name="l00134"></a>00134 vector <span class="keywordtype">float</span> im_lo0, im_lo1, im_lo2, im_lo3; <a name="l00135"></a>00135 vector <span class="keywordtype">float</span> re_hi0, re_hi1, re_hi2, re_hi3; <a name="l00136"></a>00136 vector <span class="keywordtype">float</span> im_hi0, im_hi1, im_hi2, im_hi3; <a name="l00137"></a>00137 vector <span class="keywordtype">float</span> pq_lo0, pq_lo1, pq_lo2, pq_lo3; <a name="l00138"></a>00138 vector <span class="keywordtype">float</span> pq_hi0, pq_hi1, pq_hi2, pq_hi3; <a name="l00139"></a>00139 vector <span class="keywordtype">float</span> re[<a class="code" href="fft__1d_8h.html#a7e49143d089320690fd74371ce28048b">MAX_FFT_1D_SIZE</a>/4], im[<a class="code" href="fft__1d_8h.html#a7e49143d089320690fd74371ce28048b">MAX_FFT_1D_SIZE</a>/4]; <span class="comment">/* real & imaginary working arrays */</span> <a name="l00140"></a>00140 vector <span class="keywordtype">float</span> ppmm = (vector float) { 1.0f, 1.0f, -1.0f, -1.0f}; <a name="l00141"></a>00141 vector <span class="keywordtype">float</span> pmmp = (vector float) { 1.0f, -1.0f, -1.0f, 1.0f}; <a name="l00142"></a>00142 vector <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> reverse; <a name="l00143"></a>00143 vector <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> shuf_lo = (vector <span class="keywordtype">unsigned</span> char) { <a name="l00144"></a>00144 0, 1, 2, 3, 4, 5, 6, 7, <a name="l00145"></a>00145 16,17,18,19, 20,21,22,23}; <a name="l00146"></a>00146 vector <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> shuf_hi = (vector <span class="keywordtype">unsigned</span> char) { <a name="l00147"></a>00147 8, 9,10,11, 12,13,14,15, <a name="l00148"></a>00148 24,25,26,27, 28,29,30,31}; <a name="l00149"></a>00149 vector <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> shuf_0202 = (vector <span class="keywordtype">unsigned</span> char) { <a name="l00150"></a>00150 0, 1, 2, 3, 8, 9,10,11, <a name="l00151"></a>00151 0, 1, 2, 3, 8, 9,10,11}; <a name="l00152"></a>00152 vector <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> shuf_1313 = (vector <span class="keywordtype">unsigned</span> char) { <a name="l00153"></a>00153 4, 5, 6, 7, 12,13,14,15, <a name="l00154"></a>00154 4, 5, 6, 7, 12,13,14,15}; <a name="l00155"></a>00155 vector <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> shuf_0303 = (vector <span class="keywordtype">unsigned</span> char) { <a name="l00156"></a>00156 0, 1, 2, 3, 12,13,14,15, <a name="l00157"></a>00157 0, 1, 2, 3, 12,13,14,15}; <a name="l00158"></a>00158 vector <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> shuf_1212 = (vector <span class="keywordtype">unsigned</span> char) { <a name="l00159"></a>00159 4, 5, 6, 7, 8, 9,10,11, <a name="l00160"></a>00160 4, 5, 6, 7, 8, 9,10,11}; <a name="l00161"></a>00161 vector <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> shuf_0415 = (vector <span class="keywordtype">unsigned</span> char) { <a name="l00162"></a>00162 0, 1, 2, 3, 16,17,18,19, <a name="l00163"></a>00163 4, 5, 6, 7, 20,21,22,23}; <a name="l00164"></a>00164 vector <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> shuf_2637 = (vector <span class="keywordtype">unsigned</span> char) { <a name="l00165"></a>00165 8, 9,10,11, 24,25,26,27, <a name="l00166"></a>00166 12,13,14,15,28,29,30,31}; <a name="l00167"></a>00167 vector <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> shuf_0246 = (vector <span class="keywordtype">unsigned</span> char) { <a name="l00168"></a>00168 0, 1, 2, 3, 8, 9,10,11, <a name="l00169"></a>00169 16,17,18,19,24,25,26,27}; <a name="l00170"></a>00170 vector <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> shuf_1357 = (vector <span class="keywordtype">unsigned</span> char) { <a name="l00171"></a>00171 4, 5, 6, 7, 12,13,14,15, <a name="l00172"></a>00172 20,21,22,23,28,29,30,31}; <a name="l00173"></a>00173 <a name="l00174"></a>00174 n = 1 << log2_size; <a name="l00175"></a>00175 n_2 = n >> 1; <a name="l00176"></a>00176 n_4 = n >> 2; <a name="l00177"></a>00177 n_8 = n >> 3; <a name="l00178"></a>00178 n_16 = n >> 4; <a name="l00179"></a>00179 <a name="l00180"></a>00180 n_3_16 = n_8 + n_16; <a name="l00181"></a>00181 <a name="l00182"></a>00182 <span class="comment">/* Compute a byte reverse shuffle pattern to be used to produce</span> <a name="l00183"></a>00183 <span class="comment"> * an address bit swap.</span> <a name="l00184"></a>00184 <span class="comment"> */</span> <a name="l00185"></a>00185 reverse = spu_or(spu_slqwbyte(spu_splats((<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>)0x80), log2_size), <a name="l00186"></a>00186 spu_rlmaskqwbyte(((<a class="code" href="gr__vec__types_8h.html#a1f8741a70cf8c4f22873b41e80dc668b">vec_uchar16</a>){15,14,13,12, 11,10,9,8, <a name="l00187"></a>00187 7, 6, 5, 4, 3, 2,1,0}), <a name="l00188"></a>00188 log2_size-16)); <a name="l00189"></a>00189 <a name="l00190"></a>00190 <span class="comment">/* Perform the first 3 stages of the FFT. These stages differs from </span> <a name="l00191"></a>00191 <span class="comment"> * other stages in that the inputs are unscrambled and the data is </span> <a name="l00192"></a>00192 <span class="comment"> * reformated into parallel arrays (ie, seperate real and imaginary</span> <a name="l00193"></a>00193 <span class="comment"> * arrays). The term "unscramble" means the bit address reverse the </span> <a name="l00194"></a>00194 <span class="comment"> * data array. In addition, the first three stages have simple twiddle</span> <a name="l00195"></a>00195 <span class="comment"> * weighting factors.</span> <a name="l00196"></a>00196 <span class="comment"> * stage 1: (1, 0)</span> <a name="l00197"></a>00197 <span class="comment"> * stage 2: (1, 0) and (0, -1)</span> <a name="l00198"></a>00198 <span class="comment"> * stage 3: (1, 0), (0.707, -0.707), (0, -1), (-0.707, -0.707)</span> <a name="l00199"></a>00199 <span class="comment"> *</span> <a name="l00200"></a>00200 <span class="comment"> * The arrays are processed as two halves, simultaneously. The lo (first </span> <a name="l00201"></a>00201 <span class="comment"> * half) and hi (second half). This is done because the scramble </span> <a name="l00202"></a>00202 <span class="comment"> * shares source value between each half of the output arrays.</span> <a name="l00203"></a>00203 <span class="comment"> */</span> <a name="l00204"></a>00204 i = 0; <a name="l00205"></a>00205 i_rev = 0; <a name="l00206"></a>00206 <a name="l00207"></a>00207 in0 = in; <a name="l00208"></a>00208 in1 = in + n_8; <a name="l00209"></a>00209 in2 = in + n_16; <a name="l00210"></a>00210 in3 = in + n_3_16; <a name="l00211"></a>00211 <a name="l00212"></a>00212 in4 = in + n_4; <a name="l00213"></a>00213 in5 = in1 + n_4; <a name="l00214"></a>00214 in6 = in2 + n_4; <a name="l00215"></a>00215 in7 = in3 + n_4; <a name="l00216"></a>00216 <a name="l00217"></a>00217 re0 = re; <a name="l00218"></a>00218 re1 = re + n_8; <a name="l00219"></a>00219 im0 = im; <a name="l00220"></a>00220 im1 = im + n_8; <a name="l00221"></a>00221 <a name="l00222"></a>00222 w0_re = (vector float) { 1.0f, <a class="code" href="fft__1d_8h.html#a00ce1546c572fa40f917142388f0c22a">INV_SQRT_2</a>, 0.0f, -<a class="code" href="fft__1d_8h.html#a00ce1546c572fa40f917142388f0c22a">INV_SQRT_2</a>}; <a name="l00223"></a>00223 w0_im = (vector float) { 0.0f, -<a class="code" href="fft__1d_8h.html#a00ce1546c572fa40f917142388f0c22a">INV_SQRT_2</a>, -1.0f, -<a class="code" href="fft__1d_8h.html#a00ce1546c572fa40f917142388f0c22a">INV_SQRT_2</a>}; <a name="l00224"></a>00224 <a name="l00225"></a>00225 <span class="keywordflow">do</span> { <a name="l00226"></a>00226 src_lo0 = in0[i_rev]; <a name="l00227"></a>00227 src_lo1 = in1[i_rev]; <a name="l00228"></a>00228 src_lo2 = in2[i_rev]; <a name="l00229"></a>00229 src_lo3 = in3[i_rev]; <a name="l00230"></a>00230 <a name="l00231"></a>00231 src_hi0 = in4[i_rev]; <a name="l00232"></a>00232 src_hi1 = in5[i_rev]; <a name="l00233"></a>00233 src_hi2 = in6[i_rev]; <a name="l00234"></a>00234 src_hi3 = in7[i_rev]; <a name="l00235"></a>00235 <a name="l00236"></a>00236 <span class="comment">/* Perform scramble.</span> <a name="l00237"></a>00237 <span class="comment"> */</span> <a name="l00238"></a>00238 dst_lo0 = spu_shuffle(src_lo0, src_hi0, shuf_lo); <a name="l00239"></a>00239 dst_hi0 = spu_shuffle(src_lo0, src_hi0, shuf_hi); <a name="l00240"></a>00240 dst_lo1 = spu_shuffle(src_lo1, src_hi1, shuf_lo); <a name="l00241"></a>00241 dst_hi1 = spu_shuffle(src_lo1, src_hi1, shuf_hi); <a name="l00242"></a>00242 dst_lo2 = spu_shuffle(src_lo2, src_hi2, shuf_lo); <a name="l00243"></a>00243 dst_hi2 = spu_shuffle(src_lo2, src_hi2, shuf_hi); <a name="l00244"></a>00244 dst_lo3 = spu_shuffle(src_lo3, src_hi3, shuf_lo); <a name="l00245"></a>00245 dst_hi3 = spu_shuffle(src_lo3, src_hi3, shuf_hi); <a name="l00246"></a>00246 <a name="l00247"></a>00247 <span class="comment">/* Perform the stage 1 butterfly. The multiplier constant, ppmm,</span> <a name="l00248"></a>00248 <span class="comment"> * is used to control the sign of the operands since a single</span> <a name="l00249"></a>00249 <span class="comment"> * quadword contains both of P and Q valule of the butterfly.</span> <a name="l00250"></a>00250 <span class="comment"> */</span> <a name="l00251"></a>00251 pq_lo0 = spu_madd(ppmm, dst_lo0, spu_rlqwbyte(dst_lo0, 8)); <a name="l00252"></a>00252 pq_hi0 = spu_madd(ppmm, dst_hi0, spu_rlqwbyte(dst_hi0, 8)); <a name="l00253"></a>00253 pq_lo1 = spu_madd(ppmm, dst_lo1, spu_rlqwbyte(dst_lo1, 8)); <a name="l00254"></a>00254 pq_hi1 = spu_madd(ppmm, dst_hi1, spu_rlqwbyte(dst_hi1, 8)); <a name="l00255"></a>00255 pq_lo2 = spu_madd(ppmm, dst_lo2, spu_rlqwbyte(dst_lo2, 8)); <a name="l00256"></a>00256 pq_hi2 = spu_madd(ppmm, dst_hi2, spu_rlqwbyte(dst_hi2, 8)); <a name="l00257"></a>00257 pq_lo3 = spu_madd(ppmm, dst_lo3, spu_rlqwbyte(dst_lo3, 8)); <a name="l00258"></a>00258 pq_hi3 = spu_madd(ppmm, dst_hi3, spu_rlqwbyte(dst_hi3, 8)); <a name="l00259"></a>00259 <a name="l00260"></a>00260 <span class="comment">/* Perfrom the stage 2 butterfly. For this stage, the </span> <a name="l00261"></a>00261 <span class="comment"> * inputs pq are still interleaved (p.real, p.imag, q.real, </span> <a name="l00262"></a>00262 <span class="comment"> * q.imag), so we must first re-order the data into </span> <a name="l00263"></a>00263 <span class="comment"> * parallel arrays as well as perform the reorder </span> <a name="l00264"></a>00264 <span class="comment"> * associated with the twiddle W[n/4], which equals</span> <a name="l00265"></a>00265 <span class="comment"> * (0, -1). </span> <a name="l00266"></a>00266 <span class="comment"> *</span> <a name="l00267"></a>00267 <span class="comment"> * ie. (A, B) * (0, -1) => (B, -A)</span> <a name="l00268"></a>00268 <span class="comment"> */</span> <a name="l00269"></a>00269 re_lo0 = spu_madd(ppmm, <a name="l00270"></a>00270 spu_shuffle(pq_lo1, pq_lo1, shuf_0303), <a name="l00271"></a>00271 spu_shuffle(pq_lo0, pq_lo0, shuf_0202)); <a name="l00272"></a>00272 im_lo0 = spu_madd(pmmp, <a name="l00273"></a>00273 spu_shuffle(pq_lo1, pq_lo1, shuf_1212), <a name="l00274"></a>00274 spu_shuffle(pq_lo0, pq_lo0, shuf_1313)); <a name="l00275"></a>00275 <a name="l00276"></a>00276 re_lo1 = spu_madd(ppmm, <a name="l00277"></a>00277 spu_shuffle(pq_lo3, pq_lo3, shuf_0303), <a name="l00278"></a>00278 spu_shuffle(pq_lo2, pq_lo2, shuf_0202)); <a name="l00279"></a>00279 im_lo1 = spu_madd(pmmp, <a name="l00280"></a>00280 spu_shuffle(pq_lo3, pq_lo3, shuf_1212), <a name="l00281"></a>00281 spu_shuffle(pq_lo2, pq_lo2, shuf_1313)); <a name="l00282"></a>00282 <a name="l00283"></a>00283 <a name="l00284"></a>00284 re_hi0 = spu_madd(ppmm, <a name="l00285"></a>00285 spu_shuffle(pq_hi1, pq_hi1, shuf_0303), <a name="l00286"></a>00286 spu_shuffle(pq_hi0, pq_hi0, shuf_0202)); <a name="l00287"></a>00287 im_hi0 = spu_madd(pmmp, <a name="l00288"></a>00288 spu_shuffle(pq_hi1, pq_hi1, shuf_1212), <a name="l00289"></a>00289 spu_shuffle(pq_hi0, pq_hi0, shuf_1313)); <a name="l00290"></a>00290 <a name="l00291"></a>00291 re_hi1 = spu_madd(ppmm, <a name="l00292"></a>00292 spu_shuffle(pq_hi3, pq_hi3, shuf_0303), <a name="l00293"></a>00293 spu_shuffle(pq_hi2, pq_hi2, shuf_0202)); <a name="l00294"></a>00294 im_hi1 = spu_madd(pmmp, <a name="l00295"></a>00295 spu_shuffle(pq_hi3, pq_hi3, shuf_1212), <a name="l00296"></a>00296 spu_shuffle(pq_hi2, pq_hi2, shuf_1313)); <a name="l00297"></a>00297 <a name="l00298"></a>00298 <a name="l00299"></a>00299 <span class="comment">/* Perform stage 3 butterfly.</span> <a name="l00300"></a>00300 <span class="comment"> */</span> <a name="l00301"></a>00301 <a class="code" href="fft__1d_8h.html#a067eee2bb92825cd01fdb5c4df044c08">FFT_1D_BUTTERFLY</a>(re0[0], im0[0], re0[1], im0[1], re_lo0, im_lo0, re_lo1, im_lo1, w0_re, w0_im); <a name="l00302"></a>00302 <a class="code" href="fft__1d_8h.html#a067eee2bb92825cd01fdb5c4df044c08">FFT_1D_BUTTERFLY</a>(re1[0], im1[0], re1[1], im1[1], re_hi0, im_hi0, re_hi1, im_hi1, w0_re, w0_im); <a name="l00303"></a>00303 <a name="l00304"></a>00304 re0 += 2; <a name="l00305"></a>00305 re1 += 2; <a name="l00306"></a>00306 im0 += 2; <a name="l00307"></a>00307 im1 += 2; <a name="l00308"></a>00308 <a name="l00309"></a>00309 i += 8; <a name="l00310"></a>00310 i_rev = <a class="code" href="fft__1d_8h.html#a67201f8863c0bd71426c8a0d87aef48a">BIT_SWAP</a>(i, reverse) / 2; <a name="l00311"></a>00311 } <span class="keywordflow">while</span> (i < n_2); <a name="l00312"></a>00312 <a name="l00313"></a>00313 <span class="comment">/* Process stages 4 to log2_size-2</span> <a name="l00314"></a>00314 <span class="comment"> */</span> <a name="l00315"></a>00315 <span class="keywordflow">for</span> (stage=4, stride=4; stage<log2_size-1; stage++, stride += stride) { <a name="l00316"></a>00316 w_stride = n_2 >> stage; <a name="l00317"></a>00317 w_2stride = n >> stage; <a name="l00318"></a>00318 w_3stride = w_stride + w_2stride; <a name="l00319"></a>00319 w_4stride = w_2stride + w_2stride; <a name="l00320"></a>00320 <a name="l00321"></a>00321 W0 = W; <a name="l00322"></a>00322 W1 = W + w_stride; <a name="l00323"></a>00323 W2 = W + w_2stride; <a name="l00324"></a>00324 W3 = W + w_3stride; <a name="l00325"></a>00325 <a name="l00326"></a>00326 stride_2 = stride >> 1; <a name="l00327"></a>00327 stride_4 = stride >> 2; <a name="l00328"></a>00328 stride_3_4 = stride_2 + stride_4; <a name="l00329"></a>00329 <a name="l00330"></a>00330 re0 = re; im0 = im; <a name="l00331"></a>00331 re1 = re + stride_2; im1 = im + stride_2; <a name="l00332"></a>00332 re2 = re + stride_4; im2 = im + stride_4; <a name="l00333"></a>00333 re3 = re + stride_3_4; im3 = im + stride_3_4; <a name="l00334"></a>00334 <a name="l00335"></a>00335 <span class="keywordflow">for</span> (i=0, offset=0; i<stride_4; i++, offset += w_4stride) { <a name="l00336"></a>00336 <span class="comment">/* Compute the twiddle factors</span> <a name="l00337"></a>00337 <span class="comment"> */</span> <a name="l00338"></a>00338 w0 = W0[offset]; <a name="l00339"></a>00339 w1 = W1[offset]; <a name="l00340"></a>00340 w2 = W2[offset]; <a name="l00341"></a>00341 w3 = W3[offset]; <a name="l00342"></a>00342 <a name="l00343"></a>00343 tmp0 = spu_shuffle(w0, w2, shuf_0415); <a name="l00344"></a>00344 tmp1 = spu_shuffle(w1, w3, shuf_0415); <a name="l00345"></a>00345 <a name="l00346"></a>00346 w0_re = spu_shuffle(tmp0, tmp1, shuf_0415); <a name="l00347"></a>00347 w0_im = spu_shuffle(tmp0, tmp1, shuf_2637); <a name="l00348"></a>00348 <a name="l00349"></a>00349 j = i; <a name="l00350"></a>00350 k = i + stride; <a name="l00351"></a>00351 <span class="keywordflow">do</span> { <a name="l00352"></a>00352 re_lo0 = re0[j]; im_lo0 = im0[j]; <a name="l00353"></a>00353 re_lo1 = re1[j]; im_lo1 = im1[j]; <a name="l00354"></a>00354 <a name="l00355"></a>00355 re_hi0 = re2[j]; im_hi0 = im2[j]; <a name="l00356"></a>00356 re_hi1 = re3[j]; im_hi1 = im3[j]; <a name="l00357"></a>00357 <a name="l00358"></a>00358 re_lo2 = re0[k]; im_lo2 = im0[k]; <a name="l00359"></a>00359 re_lo3 = re1[k]; im_lo3 = im1[k]; <a name="l00360"></a>00360 <a name="l00361"></a>00361 re_hi2 = re2[k]; im_hi2 = im2[k]; <a name="l00362"></a>00362 re_hi3 = re3[k]; im_hi3 = im3[k]; <a name="l00363"></a>00363 <a name="l00364"></a>00364 <a class="code" href="fft__1d_8h.html#a067eee2bb92825cd01fdb5c4df044c08">FFT_1D_BUTTERFLY</a> (re0[j], im0[j], re1[j], im1[j], re_lo0, im_lo0, re_lo1, im_lo1, w0_re, w0_im); <a name="l00365"></a>00365 <a class="code" href="fft__1d_8h.html#a5eaef4eb58f6867aec999d5d76355e39">FFT_1D_BUTTERFLY_HI</a>(re2[j], im2[j], re3[j], im3[j], re_hi0, im_hi0, re_hi1, im_hi1, w0_re, w0_im); <a name="l00366"></a>00366 <a name="l00367"></a>00367 <a class="code" href="fft__1d_8h.html#a067eee2bb92825cd01fdb5c4df044c08">FFT_1D_BUTTERFLY</a> (re0[k], im0[k], re1[k], im1[k], re_lo2, im_lo2, re_lo3, im_lo3, w0_re, w0_im); <a name="l00368"></a>00368 <a class="code" href="fft__1d_8h.html#a5eaef4eb58f6867aec999d5d76355e39">FFT_1D_BUTTERFLY_HI</a>(re2[k], im2[k], re3[k], im3[k], re_hi2, im_hi2, re_hi3, im_hi3, w0_re, w0_im); <a name="l00369"></a>00369 <a name="l00370"></a>00370 j += 2 * stride; <a name="l00371"></a>00371 k += 2 * stride; <a name="l00372"></a>00372 } <span class="keywordflow">while</span> (j < n_4); <a name="l00373"></a>00373 } <a name="l00374"></a>00374 } <a name="l00375"></a>00375 <a name="l00376"></a>00376 <span class="comment">/* Process stage log2_size-1. This is identical to the stage processing above</span> <a name="l00377"></a>00377 <span class="comment"> * except for this stage the inner loop is only executed once so it is removed</span> <a name="l00378"></a>00378 <span class="comment"> * entirely.</span> <a name="l00379"></a>00379 <span class="comment"> */</span> <a name="l00380"></a>00380 w_stride = n_2 >> stage; <a name="l00381"></a>00381 w_2stride = n >> stage; <a name="l00382"></a>00382 w_3stride = w_stride + w_2stride; <a name="l00383"></a>00383 w_4stride = w_2stride + w_2stride; <a name="l00384"></a>00384 <a name="l00385"></a>00385 stride_2 = stride >> 1; <a name="l00386"></a>00386 stride_4 = stride >> 2; <a name="l00387"></a>00387 <a name="l00388"></a>00388 stride_3_4 = stride_2 + stride_4; <a name="l00389"></a>00389 <a name="l00390"></a>00390 re0 = re; im0 = im; <a name="l00391"></a>00391 re1 = re + stride_2; im1 = im + stride_2; <a name="l00392"></a>00392 re2 = re + stride_4; im2 = im + stride_4; <a name="l00393"></a>00393 re3 = re + stride_3_4; im3 = im + stride_3_4; <a name="l00394"></a>00394 <a name="l00395"></a>00395 <span class="keywordflow">for</span> (i=0, offset=0; i<stride_4; i++, offset += w_4stride) { <a name="l00396"></a>00396 <span class="comment">/* Compute the twiddle factors</span> <a name="l00397"></a>00397 <span class="comment"> */</span> <a name="l00398"></a>00398 w0 = W[offset]; <a name="l00399"></a>00399 w1 = W[offset + w_stride]; <a name="l00400"></a>00400 w2 = W[offset + w_2stride]; <a name="l00401"></a>00401 w3 = W[offset + w_3stride]; <a name="l00402"></a>00402 <a name="l00403"></a>00403 tmp0 = spu_shuffle(w0, w2, shuf_0415); <a name="l00404"></a>00404 tmp1 = spu_shuffle(w1, w3, shuf_0415); <a name="l00405"></a>00405 <a name="l00406"></a>00406 w0_re = spu_shuffle(tmp0, tmp1, shuf_0415); <a name="l00407"></a>00407 w0_im = spu_shuffle(tmp0, tmp1, shuf_2637); <a name="l00408"></a>00408 <a name="l00409"></a>00409 j = i; <a name="l00410"></a>00410 k = i + stride; <a name="l00411"></a>00411 <a name="l00412"></a>00412 re_lo0 = re0[j]; im_lo0 = im0[j]; <a name="l00413"></a>00413 re_lo1 = re1[j]; im_lo1 = im1[j]; <a name="l00414"></a>00414 <a name="l00415"></a>00415 re_hi0 = re2[j]; im_hi0 = im2[j]; <a name="l00416"></a>00416 re_hi1 = re3[j]; im_hi1 = im3[j]; <a name="l00417"></a>00417 <a name="l00418"></a>00418 re_lo2 = re0[k]; im_lo2 = im0[k]; <a name="l00419"></a>00419 re_lo3 = re1[k]; im_lo3 = im1[k]; <a name="l00420"></a>00420 <a name="l00421"></a>00421 re_hi2 = re2[k]; im_hi2 = im2[k]; <a name="l00422"></a>00422 re_hi3 = re3[k]; im_hi3 = im3[k]; <a name="l00423"></a>00423 <a name="l00424"></a>00424 <a class="code" href="fft__1d_8h.html#a067eee2bb92825cd01fdb5c4df044c08">FFT_1D_BUTTERFLY</a> (re0[j], im0[j], re1[j], im1[j], re_lo0, im_lo0, re_lo1, im_lo1, w0_re, w0_im); <a name="l00425"></a>00425 <a class="code" href="fft__1d_8h.html#a5eaef4eb58f6867aec999d5d76355e39">FFT_1D_BUTTERFLY_HI</a>(re2[j], im2[j], re3[j], im3[j], re_hi0, im_hi0, re_hi1, im_hi1, w0_re, w0_im); <a name="l00426"></a>00426 <a name="l00427"></a>00427 <a class="code" href="fft__1d_8h.html#a067eee2bb92825cd01fdb5c4df044c08">FFT_1D_BUTTERFLY</a> (re0[k], im0[k], re1[k], im1[k], re_lo2, im_lo2, re_lo3, im_lo3, w0_re, w0_im); <a name="l00428"></a>00428 <a class="code" href="fft__1d_8h.html#a5eaef4eb58f6867aec999d5d76355e39">FFT_1D_BUTTERFLY_HI</a>(re2[k], im2[k], re3[k], im3[k], re_hi2, im_hi2, re_hi3, im_hi3, w0_re, w0_im); <a name="l00429"></a>00429 } <a name="l00430"></a>00430 <a name="l00431"></a>00431 <a name="l00432"></a>00432 <span class="comment">/* Process the final stage (stage log2_size). For this stage, </span> <a name="l00433"></a>00433 <span class="comment"> * reformat the data from parallel arrays back into </span> <a name="l00434"></a>00434 <span class="comment"> * interleaved arrays,storing the result into <in>.</span> <a name="l00435"></a>00435 <span class="comment"> *</span> <a name="l00436"></a>00436 <span class="comment"> * This loop has been manually unrolled by 2 to improve </span> <a name="l00437"></a>00437 <span class="comment"> * dual issue rates and reduce stalls. This unrolling</span> <a name="l00438"></a>00438 <span class="comment"> * forces a minimum FFT size of 32.</span> <a name="l00439"></a>00439 <span class="comment"> */</span> <a name="l00440"></a>00440 re0 = re; <a name="l00441"></a>00441 re1 = re + n_8; <a name="l00442"></a>00442 re2 = re + n_16; <a name="l00443"></a>00443 re3 = re + n_3_16; <a name="l00444"></a>00444 <a name="l00445"></a>00445 im0 = im; <a name="l00446"></a>00446 im1 = im + n_8; <a name="l00447"></a>00447 im2 = im + n_16; <a name="l00448"></a>00448 im3 = im + n_3_16; <a name="l00449"></a>00449 <a name="l00450"></a>00450 out0 = out; <a name="l00451"></a>00451 out1 = out + n_4; <a name="l00452"></a>00452 out2 = out + n_8; <a name="l00453"></a>00453 out3 = out1 + n_8; <a name="l00454"></a>00454 <a name="l00455"></a>00455 i = n_16; <a name="l00456"></a>00456 <a name="l00457"></a>00457 <span class="keywordflow">do</span> { <a name="l00458"></a>00458 <span class="comment">/* Fetch the twiddle factors</span> <a name="l00459"></a>00459 <span class="comment"> */</span> <a name="l00460"></a>00460 w0 = W[0]; <a name="l00461"></a>00461 w1 = W[1]; <a name="l00462"></a>00462 w2 = W[2]; <a name="l00463"></a>00463 w3 = W[3]; <a name="l00464"></a>00464 <a name="l00465"></a>00465 W += 4; <a name="l00466"></a>00466 <a name="l00467"></a>00467 w0_re = spu_shuffle(w0, w1, shuf_0246); <a name="l00468"></a>00468 w0_im = spu_shuffle(w0, w1, shuf_1357); <a name="l00469"></a>00469 w1_re = spu_shuffle(w2, w3, shuf_0246); <a name="l00470"></a>00470 w1_im = spu_shuffle(w2, w3, shuf_1357); <a name="l00471"></a>00471 <a name="l00472"></a>00472 <span class="comment">/* Fetch the butterfly inputs, reals and imaginaries</span> <a name="l00473"></a>00473 <span class="comment"> */</span> <a name="l00474"></a>00474 re_lo0 = re0[0]; im_lo0 = im0[0]; <a name="l00475"></a>00475 re_lo1 = re1[0]; im_lo1 = im1[0]; <a name="l00476"></a>00476 re_lo2 = re0[1]; im_lo2 = im0[1]; <a name="l00477"></a>00477 re_lo3 = re1[1]; im_lo3 = im1[1]; <a name="l00478"></a>00478 <a name="l00479"></a>00479 re_hi0 = re2[0]; im_hi0 = im2[0]; <a name="l00480"></a>00480 re_hi1 = re3[0]; im_hi1 = im3[0]; <a name="l00481"></a>00481 re_hi2 = re2[1]; im_hi2 = im2[1]; <a name="l00482"></a>00482 re_hi3 = re3[1]; im_hi3 = im3[1]; <a name="l00483"></a>00483 <a name="l00484"></a>00484 re0 += 2; im0 += 2; <a name="l00485"></a>00485 re1 += 2; im1 += 2; <a name="l00486"></a>00486 re2 += 2; im2 += 2; <a name="l00487"></a>00487 re3 += 2; im3 += 2; <a name="l00488"></a>00488 <a name="l00489"></a>00489 <span class="comment">/* Perform the butterflys</span> <a name="l00490"></a>00490 <span class="comment"> */</span> <a name="l00491"></a>00491 <a class="code" href="fft__1d_8h.html#a067eee2bb92825cd01fdb5c4df044c08">FFT_1D_BUTTERFLY</a> (out_re_lo0, out_im_lo0, out_re_lo1, out_im_lo1, re_lo0, im_lo0, re_lo1, im_lo1, w0_re, w0_im); <a name="l00492"></a>00492 <a class="code" href="fft__1d_8h.html#a067eee2bb92825cd01fdb5c4df044c08">FFT_1D_BUTTERFLY</a> (out_re_lo2, out_im_lo2, out_re_lo3, out_im_lo3, re_lo2, im_lo2, re_lo3, im_lo3, w1_re, w1_im); <a name="l00493"></a>00493 <a name="l00494"></a>00494 <a class="code" href="fft__1d_8h.html#a5eaef4eb58f6867aec999d5d76355e39">FFT_1D_BUTTERFLY_HI</a>(out_re_hi0, out_im_hi0, out_re_hi1, out_im_hi1, re_hi0, im_hi0, re_hi1, im_hi1, w0_re, w0_im); <a name="l00495"></a>00495 <a class="code" href="fft__1d_8h.html#a5eaef4eb58f6867aec999d5d76355e39">FFT_1D_BUTTERFLY_HI</a>(out_re_hi2, out_im_hi2, out_re_hi3, out_im_hi3, re_hi2, im_hi2, re_hi3, im_hi3, w1_re, w1_im); <a name="l00496"></a>00496 <a name="l00497"></a>00497 <span class="comment">/* Interleave the results and store them into the output buffers (ie,</span> <a name="l00498"></a>00498 <span class="comment"> * the original input buffers.</span> <a name="l00499"></a>00499 <span class="comment"> */</span> <a name="l00500"></a>00500 out0[0] = spu_shuffle(out_re_lo0, out_im_lo0, shuf_0415); <a name="l00501"></a>00501 out0[1] = spu_shuffle(out_re_lo0, out_im_lo0, shuf_2637); <a name="l00502"></a>00502 out0[2] = spu_shuffle(out_re_lo2, out_im_lo2, shuf_0415); <a name="l00503"></a>00503 out0[3] = spu_shuffle(out_re_lo2, out_im_lo2, shuf_2637); <a name="l00504"></a>00504 <a name="l00505"></a>00505 out1[0] = spu_shuffle(out_re_lo1, out_im_lo1, shuf_0415); <a name="l00506"></a>00506 out1[1] = spu_shuffle(out_re_lo1, out_im_lo1, shuf_2637); <a name="l00507"></a>00507 out1[2] = spu_shuffle(out_re_lo3, out_im_lo3, shuf_0415); <a name="l00508"></a>00508 out1[3] = spu_shuffle(out_re_lo3, out_im_lo3, shuf_2637); <a name="l00509"></a>00509 <a name="l00510"></a>00510 out2[0] = spu_shuffle(out_re_hi0, out_im_hi0, shuf_0415); <a name="l00511"></a>00511 out2[1] = spu_shuffle(out_re_hi0, out_im_hi0, shuf_2637); <a name="l00512"></a>00512 out2[2] = spu_shuffle(out_re_hi2, out_im_hi2, shuf_0415); <a name="l00513"></a>00513 out2[3] = spu_shuffle(out_re_hi2, out_im_hi2, shuf_2637); <a name="l00514"></a>00514 <a name="l00515"></a>00515 out3[0] = spu_shuffle(out_re_hi1, out_im_hi1, shuf_0415); <a name="l00516"></a>00516 out3[1] = spu_shuffle(out_re_hi1, out_im_hi1, shuf_2637); <a name="l00517"></a>00517 out3[2] = spu_shuffle(out_re_hi3, out_im_hi3, shuf_0415); <a name="l00518"></a>00518 out3[3] = spu_shuffle(out_re_hi3, out_im_hi3, shuf_2637); <a name="l00519"></a>00519 <a name="l00520"></a>00520 out0 += 4; <a name="l00521"></a>00521 out1 += 4; <a name="l00522"></a>00522 out2 += 4; <a name="l00523"></a>00523 out3 += 4; <a name="l00524"></a>00524 <a name="l00525"></a>00525 i -= 2; <a name="l00526"></a>00526 } <span class="keywordflow">while</span> (i); <a name="l00527"></a>00527 } <a name="l00528"></a>00528 <a name="l00529"></a>00529 <span class="preprocessor">#endif </span><span class="comment">/* _FFT_1D_R2_H_ */</span> </pre></div></div> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="fft__1d__r2_8h.html">fft_1d_r2.h</a> </li> <li class="footer">Generated on Thu Feb 17 2011 for GNU Radio 3.2.2 C++ API by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </li> </ul> </div> </body> </html>