func PlanDft3d(in, out [][][]complex64, dir Direction, flag Flag) *Plan { // TODO: check that in and out have the same dimensions fftw_in := (*C.fftwf_complex)((unsafe.Pointer)(&in[0][0][0])) fftw_out := (*C.fftwf_complex)((unsafe.Pointer)(&out[0][0][0])) p := C.fftwf_plan_dft_3d((C.int)(len(in)), (C.int)(len(in[0])), (C.int)(len(in[0][0])), fftw_in, fftw_out, C.int(dir), C.uint(flag)) return newPlan(p) }
func NewPlan3(in, out *Array3, dir Direction, flag Flag) *Plan { // TODO: check that in and out have the same dimensions n0, n1, n2 := in.Dims() var ( n0_ = C.int(n0) n1_ = C.int(n1) n2_ = C.int(n2) 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_3d(n0_, n1_, n2_, in_, out_, dir_, flag_) return &Plan{p} }