From 3651792881fc70b0640db2969180c5f817ceb7f7 Mon Sep 17 00:00:00 2001 From: Liam Healy <liam@thinkpad.local> Date: Sat, 4 Sep 2010 17:09:10 -0400 Subject: [PATCH] Added function #'off-stride to make duplicate array with only the off-stride elements --- tests/fast-fourier-transform.lisp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/tests/fast-fourier-transform.lisp b/tests/fast-fourier-transform.lisp index ff9c00d9..f5762b81 100644 --- a/tests/fast-fourier-transform.lisp +++ b/tests/fast-fourier-transform.lisp @@ -1,6 +1,6 @@ ;; Fast fourier transform tests ;; Liam Healy 2010-08-14 11:58:26EDT fast-fourier-transform.lisp -;; Time-stamp: <2010-08-22 21:36:01EDT fast-fourier-transform.lisp> +;; Time-stamp: <2010-09-04 17:07:32EDT fast-fourier-transform.lisp> ;; ;; Copyright 2010 Liam M. Healy ;; Distributed under the terms of the GNU General Public License @@ -22,6 +22,16 @@ (defvar *allowed-ticks* 1000000) +(defun off-stride (array stride) + "Make a grid that is all of the original array except that the + stride points are excluded." + (grid:make-foreign-array + (element-type array) + :initial-contents + (loop for i from 0 below (grid:total-size array) + unless (zerop (mod i stride)) + collect (grid:gref* array i)))) + (defmacro fft-complex-result-check (form element-component-type) "T if all FFT tests pass." `(multiple-value-bind @@ -77,5 +87,4 @@ ;;; (all-fft-test-forms 9 3 (64 99)) -;;; Tests commented out because they come out not so good: -;;; FAST-FOURIER-TRANSFORM: 235 assertions passed, 55 failed.; No value +;;; Tests commented out because they come out not so good. -- GitLab