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.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=I4), | intent(in) | :: | long |
first 2D array dimension |
||
integer(kind=I4), | intent(in) | :: | larg |
second 2D array dimension |
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