alloc_fftw3 Subroutine

private subroutine alloc_fftw3(long, larg)

Note

Allocation of the memory needed by the transformations, forward and backward. 1 FFT distributed on several threads

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~~alloc_fftw3~~CallsGraph proc~alloc_fftw3 alloc_fftw3 interface~fftw_alloc_complex fftw_alloc_complex proc~alloc_fftw3->interface~fftw_alloc_complex

Called by

proc~~alloc_fftw3~~CalledByGraph proc~alloc_fftw3 alloc_fftw3 proc~init_fftw3 init_fftw3 proc~init_fftw3->proc~alloc_fftw3 proc~calc_fftw3 calc_fftw3 proc~calc_fftw3->proc~init_fftw3 program~test_fftw3 test_fftw3 program~test_fftw3->proc~init_fftw3 program~test_fftw3->proc~calc_fftw3

Source Code

   subroutine 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*

      ! forward
      p_f_i = fftw_alloc_complex(int(long*larg, C_SIZE_T))
      p_f_o = fftw_alloc_complex(int(long*larg, C_SIZE_T))
      call c_f_pointer(p_f_i, cmp_f_i, (/long,larg/))
      call c_f_pointer(p_f_o, cmp_f_o, (/long,larg/))

      ! backward
      p_b_i = fftw_alloc_complex(int(long*larg, C_SIZE_T))
      p_b_o = fftw_alloc_complex(int(long*larg, C_SIZE_T))
      call c_f_pointer(p_b_i, cmp_b_i, (/long,larg/))
      call c_f_pointer(p_b_o, cmp_b_o, (/long,larg/))

   return
   endsubroutine alloc_fftw3