예제 #1
0
파일: FFTPlans.cs 프로젝트: rblenis/cudafy
        /// <summary>
        /// Releases unmanaged and - optionally - managed resources
        /// </summary>
        /// <param name="disposing"><c>true</c> to release both managed and unmanaged resources; <c>false</c> to release only unmanaged resources.</param>
        protected virtual void Dispose(bool disposing)
        {
            lock (_lock)
            {
                Debug.WriteLine(string.Format("FFTPlan::Dispose({0})", disposing));
                // Check to see if Dispose has already been called.
                if (!this._disposed)
                {
                    Debug.WriteLine("Disposing");
                    // If disposing equals true, dispose all managed
                    // and unmanaged resources.
                    if (disposing)
                    {
                        // Dispose managed resources.
                        GPUFFT.Remove(this);
                    }

                    // Call the appropriate methods to clean up
                    // unmanaged resources here.
                    // If disposing is false,
                    // only the following code is executed.
                    //Destroy();


                    // Note disposing has been done.
                    _disposed = true;
                }
                else
                {
                    Debug.WriteLine("FFTPlan already disposed");
                }
            }
        }
예제 #2
0
파일: FFTPlans.cs 프로젝트: rblenis/cudafy
 /// <summary>
 /// Executes the specified input.
 /// </summary>
 /// <typeparam name="T">Data format: Double, Single, ComplexD or ComplexF.</typeparam>
 /// <typeparam name="U">Data format: Double, Single, ComplexD or ComplexF.</typeparam>
 /// <param name="input">The input.</param>
 /// <param name="output">The output.</param>
 /// <param name="inverse">if set to <c>true</c> [inverse].</param>
 public void Execute <T, U>(T[,,] input, U[,,] output, bool inverse = false)
 {
     GPUFFT.Execute(this, input, output, inverse);
 }
예제 #3
0
파일: FFTPlans.cs 프로젝트: rblenis/cudafy
 /// <summary>
 /// Configures the layout of CUFFT output in FFTW‐compatible modes.
 /// When FFTW compatibility is desired, it can be configured for padding
 /// only, for asymmetric complex inputs only, or to be fully compatible.
 /// </summary>
 /// <param name="mode">The mode.</param>
 public void SetCompatibilityMode(eCompatibilityMode mode)
 {
     GPUFFT.SetCompatibilityMode(this, mode);
 }
예제 #4
0
파일: FFTPlans.cs 프로젝트: rblenis/cudafy
 /// <summary>
 /// Executes the FFT.
 /// </summary>
 /// <typeparam name="T">Data format: Double, Single, ComplexD or ComplexF.</typeparam>
 /// <typeparam name="U">Data format: Double, Single, ComplexD or ComplexF.</typeparam>
 /// <param name="input">The input.</param>
 /// <param name="output">The output.</param>
 /// <param name="inverse">if set to <c>true</c> inverse.</param>
 public virtual void Execute <T, U>(T[] input, U[] output, bool inverse = false)
 {
     GPUFFT.Execute(this, input, output, inverse);
 }