tab_alloc_fftw3_real Subroutine

private subroutine tab_alloc_fftw3_real(long, larg)

Note

Allocation of the memory needed by the transformations, forward and backward, for the real case. several FFT on single thread each

The space remains allocated as long as transformations are needed.

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


Calls

proc~~tab_alloc_fftw3_real~~CallsGraph proc~tab_alloc_fftw3_real tab_alloc_fftw3_real interface~fftw_alloc_complex fftw_alloc_complex proc~tab_alloc_fftw3_real->interface~fftw_alloc_complex interface~fftw_alloc_real fftw_alloc_real proc~tab_alloc_fftw3_real->interface~fftw_alloc_real

Called by

proc~~tab_alloc_fftw3_real~~CalledByGraph proc~tab_alloc_fftw3_real tab_alloc_fftw3_real proc~tab_init_fftw3_real tab_init_fftw3_real proc~tab_init_fftw3_real->proc~tab_alloc_fftw3_real program~test_fftw3 test_fftw3 program~test_fftw3->proc~tab_init_fftw3_real

Source Code

   subroutine tab_alloc_fftw3_real(long, larg)
   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) :: ithread

      ! forward
      do ithread = 0, NB_THREADS_FFT -1

         tab_p_f_i(ithread) = fftw_alloc_real(int(long*larg, C_SIZE_T))
         tab_p_f_o(ithread) = fftw_alloc_complex(int(long*larg, C_SIZE_T))
         call c_f_pointer(tab_p_f_i(ithread), tab_rea_f_i(ithread)%tab, (/long,larg/))
         call c_f_pointer(tab_p_f_o(ithread), tab_cmp_f_o(ithread)%tab, (/long,larg/))

      enddo

      ! backward
      do ithread = 0, NB_THREADS_FFT -1

         tab_p_b_i(ithread) = fftw_alloc_complex(int(long*larg, C_SIZE_T))
         tab_p_b_o(ithread) = fftw_alloc_real(int(long*larg, C_SIZE_T))
         call c_f_pointer(tab_p_b_i(ithread), tab_cmp_b_i(ithread)%tab, (/long,larg/))
         call c_f_pointer(tab_p_b_o(ithread), tab_rea_b_o(ithread)%tab, (/long,larg/))

      enddo

   return
   endsubroutine tab_alloc_fftw3_real