Exemple #1
0
// 3D single-precission real-to-complex FFT plan.
func newFFT3DR2C(Nx, Ny, Nz int) fft3DR2CPlan {
	handle := cufft.Plan3d(Nz, Ny, Nx, cufft.R2C) // new xyz swap
	handle.SetCompatibilityMode(cufft.COMPATIBILITY_FFTW_PADDING)
	handle.SetStream(stream0)
	return fft3DR2CPlan{fftplan{handle}, [3]int{Nx, Ny, Nz}}
}
Exemple #2
0
// 3D single-precission real-to-complex FFT plan.
func newFFT3DC2R(Nx, Ny, Nz int) fft3DC2RPlan {
	handle := cufft.Plan3d(Nz, Ny, Nx, cufft.C2R) // new xyz swap
	handle.SetCompatibilityMode(cufft.COMPATIBILITY_NATIVE)
	handle.SetStream(stream0)
	return fft3DC2RPlan{fftplan{handle}, [3]int{Nx, Ny, Nz}}
}