tab_alloc_fftw3 Subroutine

private subroutine tab_alloc_fftw3(long, larg)

Note

Allocation of the memory needed by the transformations, forward and backward. 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~~CallsGraph proc~tab_alloc_fftw3 tab_alloc_fftw3 interface~fftw_alloc_complex fftw_alloc_complex proc~tab_alloc_fftw3->interface~fftw_alloc_complex

Called by

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

Source Code

   subroutine tab_alloc_fftw3(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_complex(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_cmp_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_complex(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_cmp_b_o(ithread)%tab, (/long,larg/))

      enddo

   return
   endsubroutine tab_alloc_fftw3