diff --git a/src/Function2D.cpp b/src/Function2D.cpp index f0a395a..dedf1dc 100644 --- a/src/Function2D.cpp +++ b/src/Function2D.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include using namespace Aurora; @@ -795,7 +796,7 @@ Matrix Aurora::ifft(const Matrix &aMatrix, long aFFTSize ) { if (status != DFTI_NO_ERROR) goto error; //通过 setValue 配置Descriptor //使用单独的输出数据缓存 - status = DftiSetValue(my_desc_handle, DFTI_PLACEMENT, DFTI_NOT_INPLACE); + status = DftiSetValue(my_desc_handle, DFTI_PLACEMENT, DFTI_INPLACE); if (status != DFTI_NO_ERROR) goto error; //设置DFTI_BACKWARD_SCALE !!!很关键,不然值不对 @@ -821,7 +822,7 @@ Matrix Aurora::ifft(const Matrix &aMatrix, long aFFTSize ) { if (status != DFTI_NO_ERROR) goto error; //执行计算 - status = DftiComputeBackward(my_desc_handle, aMatrix.getData(), output); + status = DftiComputeBackward(my_desc_handle, output, output); if (status != DFTI_NO_ERROR) goto error; //释放资源 status = DftiFreeDescriptor(&my_desc_handle);