program main
use, intrinsic :: iso_c_binding
implicit none
include 'fftw3.f03'

real(8),dimension(4)       ::   a
type(C_PTR) :: plan01,plan10

double precision, dimension(1:4) :: in,out

a=(/1.0d0,2.0d0,3.0d0,4.0d0/)

!Creat the FFTW plan

plan01 = fftw_plan_r2r_1d(4, in, out, FFTW_DHT, FFTW_PATIENT)

plan10 = fftw_plan_r2r_1d(4, in, out, FFTW_REDFT10, FFTW_PATIENT)

call fftw_execute_r2r(plan01, a(1), out(1))

write(*,*) out

stop
end



