[PATCH] fix real->complex fftm stride bug

Nathan (Jasper) Myers ncm at codesourcery.com
Sat Sep 17 08:49:54 UTC 2005


I have checked in the patch below.  ref-impl/fft-coverage.cpp passes
on x86/FFTW3 now, and most likely others besides.

Nathan Myers
ncm

Index: ChangeLog
===================================================================
RCS file: /home/cvs/Repository/vpp/ChangeLog,v
retrieving revision 1.248
diff -u -p -r1.248 ChangeLog
--- ChangeLog	16 Sep 2005 22:03:20 -0000	1.248
+++ ChangeLog	17 Sep 2005 08:44:29 -0000
@@ -1,3 +1,8 @@
+2005-09-17  Nathan Myers  <ncm at codesourcery.com>
+
+	* src/vsip/impl/signal-fft.hpp: fix a real->complex FFTM
+	  stride bug detected by ref-impl/fft-coverage.hpp.
+
 2005-09-16  Jules Bergmann  <jules at codesourcery.com>
 	
 	* src/vsip/impl/aligned_allocator.hpp (VSIP_IMPL_ALLOC_ALIGNMENT):
Index: src/vsip/impl/signal-fft.hpp
===================================================================
RCS file: /home/cvs/Repository/vpp/src/vsip/impl/signal-fft.hpp,v
retrieving revision 1.21
diff -u -p -r1.21 signal-fft.hpp
--- src/vsip/impl/signal-fft.hpp	16 Sep 2005 02:13:38 -0000	1.21
+++ src/vsip/impl/signal-fft.hpp	17 Sep 2005 08:44:29 -0000
@@ -792,9 +792,11 @@ protected:
       this->core_->stride_ = 1;
       this->core_->dist_ = 1;
       if (native_order == (axis == 1)) 
-        this->core_->dist_ = local_out.size(axis);
+        this->core_->dist_ = (sizeof(inT) <= sizeof(outT)) ?
+          local_in.size(axis) : local_out.size(axis);
       else 
-        this->core_->stride_ = local_out.size(1-axis);
+        this->core_->stride_ = (sizeof(inT) <= sizeof(outT)) ?
+          local_in.size(1-axis) : local_out.size(1-axis);
 
       this->core_->from_to(raw_in.data(), raw_out.data());
     }



More information about the vsipl++ mailing list