alloc_fftw3_real Subroutine

private subroutine alloc_fftw3_real(long, larg)

Note

Allocation of the memory needed by the transformations, forward and backward, for the real case. 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_real~~CallsGraph proc~alloc_fftw3_real alloc_fftw3_real interface~fftw_alloc_complex fftw_alloc_complex proc~alloc_fftw3_real->interface~fftw_alloc_complex interface~fftw_alloc_real fftw_alloc_real proc~alloc_fftw3_real->interface~fftw_alloc_real

Called by

proc~~alloc_fftw3_real~~CalledByGraph proc~alloc_fftw3_real alloc_fftw3_real proc~init_fftw3_real init_fftw3_real proc~init_fftw3_real->proc~alloc_fftw3_real proc~calc_fftw3_real_bwd calc_fftw3_real_bwd proc~calc_fftw3_real_bwd->proc~init_fftw3_real proc~calc_fftw3_real_fwd calc_fftw3_real_fwd proc~calc_fftw3_real_fwd->proc~init_fftw3_real program~test_fftw3 test_fftw3 program~test_fftw3->proc~init_fftw3_real program~test_fftw3->proc~calc_fftw3_real_bwd program~test_fftw3->proc~calc_fftw3_real_fwd

Source Code

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

      ! forward
      p_f_i = fftw_alloc_real(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, rea_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_real(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, rea_b_o, (/long,larg/))

   return
   endsubroutine alloc_fftw3_real