tab_make_plan_fftw3 Subroutine

private subroutine tab_make_plan_fftw3(long, larg, plan_flag)

Note

Creates forward and backward plans. several FFT on single thread each

Until no more transformation is needed, the plans remain as they are.

Warning

In C, the order line/column is reversed, so the 2nd dimension larg of the array is first provided in fftw_plan_dft_2d

calling from fortran

Arguments

Type IntentOptional Attributes Name
integer(kind=I4), intent(in) :: long

first 2D array dimension

integer(kind=I4), intent(in) :: larg

second 2D array dimension

integer(kind=I4), intent(in) :: plan_flag

planning option, FFTW_ESTIMATE for example


Calls

proc~~tab_make_plan_fftw3~~CallsGraph proc~tab_make_plan_fftw3 tab_make_plan_fftw3 interface~fftw_plan_dft_2d fftw_plan_dft_2d proc~tab_make_plan_fftw3->interface~fftw_plan_dft_2d

Called by

proc~~tab_make_plan_fftw3~~CalledByGraph proc~tab_make_plan_fftw3 tab_make_plan_fftw3 proc~tab_init_fftw3 tab_init_fftw3 proc~tab_init_fftw3->proc~tab_make_plan_fftw3 program~test_fftw3 test_fftw3 program~test_fftw3->proc~tab_init_fftw3

Source Code

   subroutine tab_make_plan_fftw3(long, larg, plan_flag)
   implicit none
   integer(kind=I4), intent(in) :: long         !! *first  2D array dimension*
   integer(kind=I4), intent(in) :: larg         !! *second 2D array dimension*
   integer(kind=I4), intent(in) :: plan_flag    !! *planning option, [[fftw3(module):FFTW_ESTIMATE]] for example*

      integer(kind=I4) :: ithread

      do ithread = 0, NB_THREADS_FFT -1

         ! forward
         tab_plan_f(ithread) = fftw_plan_dft_2d(larg, long, tab_cmp_f_i(ithread)%tab,  &  !
                                                            tab_cmp_f_o(ithread)%tab,  &  !
                                                            FORWARD, plan_flag)       !

         ! backward
         tab_plan_b(ithread) = fftw_plan_dft_2d(larg, long, tab_cmp_b_i(ithread)%tab,  &  !
                                                            tab_cmp_b_o(ithread)%tab,  &  !
                                                            BACKWARD, plan_flag)      !

      enddo

   return
   endsubroutine tab_make_plan_fftw3