<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Hi  in Intel® oneAPI Math Kernel Library</title>
    <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Fortran-FFT-with-MKL/m-p/1057296#M21491</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Looks like this page is exactly what you need. 2D FFT examples are found in the middle of the page.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/node/522290#AC30C86F-9E01-4A5F-B086-CE7FBCE2126A&amp;nbsp;" target="_blank"&gt;https://software.intel.com/en-us/node/522290#AC30C86F-9E01-4A5F-B086-CE7FBCE2126A&amp;nbsp;&lt;/A&gt;;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 22 Jan 2015 00:34:03 GMT</pubDate>
    <dc:creator>Zhang_Z_Intel</dc:creator>
    <dc:date>2015-01-22T00:34:03Z</dc:date>
    <item>
      <title>Fortran FFT with MKL</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Fortran-FFT-with-MKL/m-p/1057295#M21490</link>
      <description>&lt;P&gt;I'm currently messing with some code that uses an old F77 looking FFT subroutine full of goto's and other nasty stuff. I have been looking around at using MKL's FFT routines, but I am having trouble finding some examples of how they are used. My current FFT routine uses only double precision data, so I don't need a FFT dealing with complex. Can anyone point me to any example code using a 2D MKL FFT routine? (possibly within /opt/intel/mkl/examples)&lt;/P&gt;

&lt;P&gt;Thanks in advance!&lt;/P&gt;

&lt;P&gt;(For any interested, here is the current FFT routine being used)&lt;/P&gt;

&lt;PRE class="brush:fortran;"&gt;	SUBROUTINE FFT(X,Y,N,ITYPE)
	implicit none
	INTEGER N,M,ITYPE
	real*8 X(*), Y(*)
	INTEGER   I, J, K, N1, N2, N4, IS, ID, I0, I1, I2, I3
	real*8   TWOPI, E, A, A3, CC1, SS1, CC3, SS3
	real*8   R1, R2, S1, S2, S3, XT
	INTRINSIC   SIN, COS
	PARAMETER   ( TWOPI = 6.2831853071795864769 )

       IF ( N .EQ. 1 ) RETURN

	   M=nint(log(real(N))/log(2.0))

       IF ( ITYPE .EQ. -1 ) THEN
	   DO 1, I = 1, N
       Y(I) = - Y(I)
1      CONTINUE
       ENDIF

       N2 = 2 * N
       DO 10, K = 1, M-1
		N2 = N2 / 2
		N4 = N2 / 4
		E = TWOPI / N2
		A = 0.0
		DO 20, J = 1, N4
		A3 = 3 * A
		CC1 = COS( A )
		SS1 = SIN( A )
		CC3 = COS( A3 )
		SS3 = SIN( A3 )
		A = J * E
		IS = J
		ID = 2 * N2
40       DO 30, I0 = IS, N-1, ID
         I1 = I0 + N4
         I2 = I1 + N4
         I3 = I2 + N4
         R1 = X(I0) - X(I2)
         X(I0) = X(I0) + X(I2)
         R2 = X(I1) - X(I3)
         X(I1) = X(I1) + X(I3)
         S1 = Y(I0) - Y(I2)
         Y(I0) = Y(I0) + Y(I2)
         S2 = Y(I1) - Y(I3)
         Y(I1) = Y(I1) + Y(I3)
         S3 = R1 - S2
         R1 = R1 + S2
         S2 = R2 - S1
         R2 = R2 + S1
         X(I2) = R1 * CC1 - S2 * SS1
         Y(I2) = - S2 * CC1 - R1 * SS1
         X(I3) = S3 * CC3 + R2 * SS3
         Y(I3) = R2 * CC3 - S3 * SS3
30       CONTINUE
		IS = 2 * ID - N2 + J
		ID = 4 * ID
		IF ( IS .LT. N ) GOTO 40
20      CONTINUE
10    CONTINUE

!C--------LAST STAGE, LENGTH-2 BUTTERFLY ----------------------C
       IS = 1
       ID = 4
50     DO 60, I0 = IS, N, ID
		I1 = I0 + 1
		R1 = X(I0)
		X(I0) = R1 + X(I1)
		X(I1) = R1 - X(I1)
		R1 = Y(I0)
		Y(I0) = R1 + Y(I1)
		Y(I1) = R1 - Y(I1)
60    CONTINUE
       IS = 2 * ID - 1
       ID = 4 * ID
       IF ( IS .LT. N ) GOTO 50

!C-------BIT REVERSE COUNTER-----------------------------------C
100    J = 1
       N1 = N - 1
       DO 104, I = 1, N1
		IF ( I .GE. J ) GOTO 101
		XT = X(J)
		X(J) = X(I)
		X(I) = XT
		XT = Y(J)
		Y(J) = Y(I)
		Y(I) = XT
101     K = N / 2
102     IF ( K .GE. J ) GOTO 103
		J = J - K
		K = K / 2
		GOTO 102
103     J = J + K
104   CONTINUE

	IF ( ITYPE .EQ. -1 ) THEN
	do I = 1, N
      Y(I) = - Y(I) 
	end do
	else
	do i=1,n
	x(i)=x(i)/n
	y(i)=y(i)/n
	end do
    ENDIF

    RETURN
    END&lt;/PRE&gt;

&lt;P&gt;I am unfamiliar with "length 2 butterfly" and "bit reverse counter" in FFT. If there is any specific MKL FFT routine that performs these same calculations?&lt;/P&gt;</description>
      <pubDate>Wed, 21 Jan 2015 21:37:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Fortran-FFT-with-MKL/m-p/1057295#M21490</guid>
      <dc:creator>Matt_S_</dc:creator>
      <dc:date>2015-01-21T21:37:13Z</dc:date>
    </item>
    <item>
      <title>Hi </title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Fortran-FFT-with-MKL/m-p/1057296#M21491</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Looks like this page is exactly what you need. 2D FFT examples are found in the middle of the page.&lt;/P&gt;

&lt;P&gt;&lt;A href="https://software.intel.com/en-us/node/522290#AC30C86F-9E01-4A5F-B086-CE7FBCE2126A&amp;nbsp;" target="_blank"&gt;https://software.intel.com/en-us/node/522290#AC30C86F-9E01-4A5F-B086-CE7FBCE2126A&amp;nbsp;&lt;/A&gt;;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jan 2015 00:34:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Fortran-FFT-with-MKL/m-p/1057296#M21491</guid>
      <dc:creator>Zhang_Z_Intel</dc:creator>
      <dc:date>2015-01-22T00:34:03Z</dc:date>
    </item>
    <item>
      <title>Zhang, thank you for the link</title>
      <link>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Fortran-FFT-with-MKL/m-p/1057297#M21492</link>
      <description>&lt;P&gt;Zhang, thank you for the link! I have discovered where the FFT currently used came from and it is no standard FFT. I could not replicate the results from any of the MKL FFT routine examples. The FFT used can be found here: &lt;A href="https://github.com/syntheticpp/benchfft/blob/master/benchees/burrus/sffteu.f" target="_blank"&gt;https://github.com/syntheticpp/benchfft/blob/master/benchees/burrus/sffteu.f&lt;/A&gt; and it is described as, "&lt;SPAN class="pl-c"&gt;a slight modification of a complex split radix FFT routine presented by C.S. Burrus." &lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN class="pl-c"&gt;Does anyone know if a variation of MKL's FFT performs anything of the sort?&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN class="pl-c"&gt;Thanks again.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jan 2015 17:04:37 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-oneAPI-Math-Kernel-Library/Fortran-FFT-with-MKL/m-p/1057297#M21492</guid>
      <dc:creator>Matt_S_</dc:creator>
      <dc:date>2015-01-23T17:04:37Z</dc:date>
    </item>
  </channel>
</rss>

