本文整理汇总了C#中fftw_direction类的典型用法代码示例。如果您正苦于以下问题:C# fftw_direction类的具体用法?C# fftw_direction怎么用?C# fftw_direction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
fftw_direction类属于命名空间,在下文中一共展示了fftw_direction类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: dft_1d
/// <summary>
/// Creates plan..
/// </summary>
/// <param name="fftType">Type of fft.</param>
/// <param name="n">The n.</param>
/// <param name="input">The input.</param>
/// <param name="output">The output.</param>
/// <param name="direction">The direction.</param>
/// <param name="flags">The flags.</param>
/// <returns></returns>
public static fftwf_plan dft_1d(eFFTType fftType, int n, IntPtr input, IntPtr output, fftw_direction direction, fftw_flags flags)
{
fftwf_plan p = new fftwf_plan();
if (fftType == eFFTType.Complex2Complex)
p._handle = fftwf.dft_1d(n, input, output, direction, flags);
else if (fftType == eFFTType.Real2Complex)
p._handle = fftwf.dft_r2c_1d(n, input, output, flags);
else if (fftType == eFFTType.Complex2Real)
p._handle = fftwf.dft_c2r_1d(n, input, output, flags);
p.Input = input;
p.Output = output;
return p;
}
示例2: FFT
void FFT(int N, float[] dataIn, float[] dataOut, fftw_direction direction)
{
var NbyN = N * N;
var bufFftIn = fftwf.malloc(8 * NbyN);
var bufFftOut = fftwf.malloc(8 * NbyN);
try {
var plan = fftwf.dft_2d(N, N, bufFftIn, bufFftOut, direction, fftw_flags.Estimate);
Marshal.Copy(dataIn, 0, bufFftIn, dataIn.Length);
fftwf.execute(plan);
Marshal.Copy(bufFftOut, dataOut, 0, dataOut.Length);
} finally {
fftwf.free(bufFftIn);
fftwf.free(bufFftOut);
}
}
示例3: dft
public static extern IntPtr dft(int rank, int[] n, IntPtr input, IntPtr output,
fftw_direction direction, fftw_flags flags);
示例4: dft_c2r_3d
public static fftw_plan dft_c2r_3d(int nx, int ny, int nz, fftw_complexarray input, fftw_complexarray output, fftw_direction direction, fftw_flags flags)
{
fftw_plan p = new fftw_plan();
p.handle = fftw.dft_c2r_3d(nx, ny, nz, input.Handle, output.Handle, flags);
return p;
}
示例5: dft_c2r
public static fftw_plan dft_c2r(int rank, int[] n, fftw_complexarray input, fftw_complexarray output, fftw_direction direction, fftw_flags flags)
{
fftw_plan p = new fftw_plan();
p.handle = fftw.dft_c2r(rank, n, input.Handle, output.Handle, flags);
return p;
}
示例6: dft_1d
//Complex<->Complex transforms
public static fftw_plan dft_1d(int n, fftw_complexarray input, fftw_complexarray output, fftw_direction direction, fftw_flags flags)
{
fftw_plan p = new fftw_plan();
p.handle = fftw.dft_1d(n, input.Handle, output.Handle, direction,flags);
return p;
}
示例7: dft_c2r_3d
public static fftw_plan dft_c2r_3d(int nx, int ny, int nz, fftw_complexarray input, fftw_complexarray output, fftw_direction direction, fftw_flags flags)
{
FFTW_Lock.WaitOne();
fftw_plan p = new fftw_plan();
p.handle = fftw.dft_c2r_3d(nx, ny, nz, input.Handle, output.Handle, flags);
FFTW_Lock.ReleaseMutex();
return p;
}
示例8: dft_c2r
public static fftw_plan dft_c2r(int rank, int[] n, fftw_complexarray input, fftw_complexarray output, fftw_direction direction, fftw_flags flags)
{
FFTW_Lock.WaitOne();
fftw_plan p = new fftw_plan();
p.handle = fftw.dft_c2r(rank, n, input.Handle, output.Handle, flags);
FFTW_Lock.ReleaseMutex();
return p;
}
示例9: many_dft
public static extern IntPtr many_dft(int rank, int[] n, int howmany,
IntPtr input, int[] inembed,
int istride, int idist,
IntPtr output, int[] onembed,
int ostride, int odist,
fftw_direction sign, fftw_flags flags);
示例10: dft_2d
public static fftw_plan dft_2d(int nx, int ny, fftw_complexarray input, fftw_complexarray output, fftw_direction direction, fftw_flags flags)
{
FFTW_Semaphore.WaitOne();
fftw_plan p = new fftw_plan();
p.handle = fftw.dft_2d(nx, ny, input.Handle, output.Handle, direction,flags);
FFTW_Semaphore.Release();
return p;
}
示例11: dft_many
public static fftwf_plan dft_many(eFFTType fftType, int rank, int[] n, int batch,
IntPtr input, int[] inembed,
int istride, int idist,
IntPtr output, int[] onembed,
int ostride, int odist,
fftw_direction sign, fftw_flags flags)
{
fftwf_plan p = new fftwf_plan();
if (fftType == eFFTType.Complex2Complex)
p._handle = fftwf.many_dft(rank, n, batch, input, inembed, istride, idist, output, onembed, ostride, odist, sign, flags);
else if (fftType == eFFTType.Real2Complex)
p._handle = fftwf.many_dft_r2c(rank, n, batch, input, inembed, istride, idist, output, onembed, ostride, odist, flags);
else if (fftType == eFFTType.Complex2Real)
p._handle = fftwf.many_dft_c2r(rank, n, batch, input, inembed, istride, idist, output, onembed, ostride, odist, flags);
p.Input = input;
p.Output = output;
return p;
}
示例12: dft_c2r_2d
public static fftwf_plan dft_c2r_2d(int nx, int ny, fftwf_complexarray input, fftwf_complexarray output, fftw_direction direction, fftw_flags flags)
{
fftwf_plan p = new fftwf_plan();
p.handle = fftwf.dft_c2r_2d(nx, ny, input.Handle, output.Handle, (uint)flags);
return p;
}
示例13: dft
public static fftwf_plan dft(int rank, int[] n, fftwf_complexarray input, fftwf_complexarray output, fftw_direction direction, fftw_flags flags)
{
fftwf_plan p = new fftwf_plan();
p.handle = fftwf.dft(rank, n, input.Handle, output.Handle, (int)direction,(uint)flags);
return p;
}
示例14: dft_1d
public static extern IntPtr dft_1d(int n, IntPtr input, IntPtr output,
fftw_direction direction, fftw_flags flags);
示例15: dft_1d
//Complex<->Complex transforms
public static fftwf_plan dft_1d(int n, fftwf_complexarray input, fftwf_complexarray output, fftw_direction direction, fftw_flags flags)
{
FFTW_Lock.WaitOne();
fftwf_plan p = new fftwf_plan();
p.handle = fftwf.dft_1d(n, input.Handle, output.Handle, direction, flags);
FFTW_Lock.ReleaseMutex();
return p;
}