From e635d8e7c6a8a1181afd4d03b8eb9f3c76bd9972 Mon Sep 17 00:00:00 2001
From: Sumant Oemrawsingh <soemraws@xs4all.nl>
Date: Tue, 17 Nov 2009 01:39:30 +0100
Subject: [PATCH] Initial test function complex case now works.

The reason why the complex case didn't work in example.lisp, is that the FFTs
(not DFTs) work in-place. for reals it worked because the random (source)
vector was copied (or at least, only the real part) before FFT-ing. Now, it's
also copied in the complex case.
---
 fast-fourier-transforms/example.lisp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fast-fourier-transforms/example.lisp b/fast-fourier-transforms/example.lisp
index faccb745..8add2447 100644
--- a/fast-fourier-transforms/example.lisp
+++ b/fast-fourier-transforms/example.lisp
@@ -88,7 +88,7 @@
 	 (forward
 	  (forward-fourier-transform
 	   (if (subtypep element-type 'complex)
-	       random-vector
+               (copy-making-destination random-vector)
 	       (realpart-vector random-vector))
 	   :stride stride)))
     (values
@@ -98,3 +98,4 @@
 	 (unpack forward :unpack-type 'complex :stride stride)))))
 
 ;;(test-fft-noise 'double-float 10 :stride 5)
+;;(test-fft-noise '(complex double-float) 10 :stride 5)
-- 
GitLab