void PerformSingleFourier() { //Always start writing at buffer index 0 and the end read buffer should always end up at index 1. const int write = 0; int read = -1; if (m_doublePacked) { read = m_fourier.PeformFFT_DoublePacked(write, m_data, this); } else { read = m_fourier.PeformFFT_SinglePacked(write, m_data, this); } if (Cancelled) { return; } if (read != WaveSpectrumBufferCPU.READ) { throw new InvalidOperationException("Fourier transform did not result in the read buffer at index " + WaveSpectrumBufferCPU.READ); } //If threading of data processing not disabled do it here. if (!Ocean.DISABLE_PROCESS_DATA_MULTITHREADING) { m_buffer.ProcessData(m_index, m_results, m_data[read], m_numGrids); } }
void PerformSingleFourier() { //Always start writing at buffer index 0 and the end read buffer should always end up at index 1. const int write = 0; int read = -1; if (m_doublePacked) { read = m_fourier.PeformFFT_DoublePacked(write, m_data, this); } else { read = m_fourier.PeformFFT_SinglePacked(write, m_data, this); } if (Cancelled) { return; } if (read != WaveSpectrumBufferCPU.READ) { throw new InvalidOperationException("Fourier transform did not result in the read buffer at index " + WaveSpectrumBufferCPU.READ); } ProcessData(m_index, m_results, m_data[read], m_numGrids); }