func PlanDft1d(in, out []complex64, dir Direction, flag Flag) *Plan { // TODO: check that len(in) == len(out) fftw_in := (*C.fftwf_complex)((unsafe.Pointer)(&in[0])) fftw_out := (*C.fftwf_complex)((unsafe.Pointer)(&out[0])) p := C.fftwf_plan_dft_1d((C.int)(len(in)), fftw_in, fftw_out, C.int(dir), C.uint(flag)) return newPlan(p) }
func NewPlan(in, out *Array, dir Direction, flag Flag) *Plan { // TODO: check that len(in) == len(out) n := in.Len() var ( n_ = C.int(n) in_ = (*C.fftwf_complex)(unsafe.Pointer(in.ptr())) out_ = (*C.fftwf_complex)(unsafe.Pointer(out.ptr())) dir_ = C.int(dir) flag_ = C.uint(flag) ) p := C.fftwf_plan_dft_1d(n_, in_, out_, dir_, flag_) return &Plan{p} }