Actions

icon Post
text/html Subscribe
text/html Unsubscribe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch: fix merge conflicts


  • To: VSIPL++ Developers List <vsipl++@xxxxxxxxxxxxxxxx>
  • Subject: patch: fix merge conflicts
  • From: Stefan Seefeld <stefan@xxxxxxxxxxxxxxxx>
  • Date: Tue, 12 Jun 2007 10:55:16 -0400

The attached patch fixes some conflicts seemingly introduced by two overlapping
patches / commits last week.

(Assem: please be careful when applying 'svn resolved'. There were some artifacts
(such as "<<<< .mine") as well as conflicting code checked in with the last commit.)

The new Create_plan harness uses Stride_unit_align everywhere (there was one place
with Stride_unit_dense, that looked like a typo). I'm not sure this is required,
as we only stipulate aligned input for 1D FFTs. Thus, the current code may require
the data to be copied without need.
Should I instead add an overload for Create_plan::create() for 1D FFTs and relax
the alignment for non-1D cases to Stride_unit_dense ?

Thanks,
		Stefan


-- 
Stefan Seefeld
CodeSourcery
stefan@xxxxxxxxxxxxxxxx
(650) 331-3385 x718
Index: src/vsip/opt/fftw3/fft_impl.cpp
===================================================================
--- src/vsip/opt/fftw3/fft_impl.cpp	(revision 173739)
+++ src/vsip/opt/fftw3/fft_impl.cpp	(working copy)
@@ -153,11 +153,9 @@
     : Fft_base<1, ctype, ctype>(dom, E, convert_NoT(number))
   {}
   virtual char const* name() { return "fft-fftw3-1D-complex"; }
-<<<<<<< .mine
   virtual void query_layout(Rt_layout<1> &rtl_inout)
   {
-    // By default use unit_stride, tuple<0, 1, 2>
-    rtl_inout.pack = stride_unit_dense;
+     rtl_inout.pack = stride_unit_align;
     rtl_inout.align = VSIP_IMPL_ALLOC_ALIGNMENT;
     rtl_inout.order = tuple<0, 1, 2>();
     // make default based on library
@@ -165,14 +163,12 @@
   }
   virtual void query_layout(Rt_layout<1> &rtl_in, Rt_layout<1> &rtl_out)
   {
-    // By default use unit_stride, tuple<0, 1, 2>
-    rtl_in.pack = rtl_out.pack = stride_unit_dense;
-    rtl_inout.align = VSIP_IMPL_ALLOC_ALIGNMENT;
-    rtl_in.order = rtl_out.order = tuple<0, 1, 2>();
-    // make default based on library
-    rtl_in.complex = rtl_out.complex = Create_plan<dense_complex_type>::format;
+    rtl_in.pack = stride_unit_align;
+    rtl_in.align = VSIP_IMPL_ALLOC_ALIGNMENT;
+    rtl_in.order = tuple<0, 1, 2>();
+    rtl_in.complex = Create_plan<dense_complex_type>::format;
+    rtl_out = rtl_in;
   }
-
   virtual void in_place(ctype *inout, stride_type s, length_type l)
   {
     assert(s == 1 && static_cast<int>(l) == this->size_[0]);
@@ -230,7 +226,7 @@
     rtl_in.pack = stride_unit_align;
     rtl_in.align = VSIP_IMPL_ALLOC_ALIGNMENT;
     rtl_in.order = tuple<0, 1, 2>();
-    rtl_in.complex = cmplx_inter_fmt;
+    rtl_in.complex = Create_plan<dense_complex_type>::format;
     rtl_out = rtl_in;
   }
   virtual void by_reference(rtype *in, stride_type,
@@ -247,23 +243,6 @@
     FFTW(execute_split_dft_r2c)(plan_by_reference_, 
 			  in, out.first, out.second);
   }
-  virtual void query_layout(Rt_layout<1> &rtl_inout)
-  {
-    // By default use unit_stride, tuple<0, 1, 2>
-    rtl_inout.pack = stride_unit_dense;
-    rtl_inout.order = tuple<0, 1, 2>();
-    // make default based on library
-    rtl_inout.complex = Create_plan<dense_complex_type>::format;
-  }
-  virtual void query_layout(Rt_layout<1> &rtl_in, Rt_layout<1> &rtl_out)
-  {
-    // By default use unit_stride, tuple<0, 1, 2>
-    rtl_in.pack = rtl_out.pack = stride_unit_dense;
-    rtl_in.order = rtl_out.order = tuple<0, 1, 2>();
-    // make default based on library
-    rtl_in.complex = rtl_out.complex = Create_plan<dense_complex_type>::format;
-  }
-
 };
 
 // 1D complex -> real FFT
@@ -288,7 +267,7 @@
     rtl_in.pack = stride_unit_align;
     rtl_in.align = VSIP_IMPL_ALLOC_ALIGNMENT;
     rtl_in.order = tuple<0, 1, 2>();
-    rtl_in.complex = cmplx_inter_fmt;
+    rtl_in.complex = Create_plan<dense_complex_type>::format;
     rtl_out = rtl_in;
   }
 
@@ -308,23 +287,6 @@
     FFTW(execute_split_dft_c2r)(plan_by_reference_,
 			  in.first, in.second, out);
   }
-  virtual void query_layout(Rt_layout<1> &rtl_inout)
-  {
-    // By default use unit_stride, tuple<0, 1, 2>
-    rtl_inout.pack = stride_unit_dense;
-    rtl_inout.order = tuple<0, 1, 2>();
-    // make default based on library
-    rtl_inout.complex = Create_plan<dense_complex_type>::format;
-  }
-  virtual void query_layout(Rt_layout<1> &rtl_in, Rt_layout<1> &rtl_out)
-  {
-    // By default use unit_stride, tuple<0, 1, 2>, cmplx_inter_fmt
-    rtl_in.pack = rtl_out.pack = stride_unit_dense;
-    rtl_in.order = rtl_out.order = tuple<0, 1, 2>();
-    // make default based on library
-    rtl_in.complex = rtl_out.complex = Create_plan<dense_complex_type>::format;
-  }
-
 };
 
 // 2D complex -> complex FFT
Index: src/vsip/opt/fftw3/create_plan.hpp
===================================================================
--- src/vsip/opt/fftw3/create_plan.hpp	(revision 173739)
+++ src/vsip/opt/fftw3/create_plan.hpp	(working copy)
@@ -146,7 +146,7 @@
     IodimT iodims[Dim];
     int i;
     Applied_layout<Layout<Dim, typename Row_major<Dim>::type,
-                   Stride_unit_dense, Cmplx_split_fmt> >
+                   Stride_unit_align, Cmplx_split_fmt> >
     app_layout(size);
 
     for(i=0;i<Dim;i++) 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 173739)
+++ ChangeLog	(working copy)
@@ -1,3 +1,8 @@
+2007-06-12  Stefan Seefeld  <stefan@xxxxxxxxxxxxxxxx>
+
+	* src/vsip/opt/fftw3/fft_impl.cpp: Resolve various conflicts.
+	* src/vsip/opt/fftw3/create_plan.hpp: Require Stride_unit_align everywhere.
+	
 2007-06-09  Assem Salama  <assem@xxxxxxxxxxxxxxxx>
 
 	* src/vsip/opt/fftw3/fft.cpp: Added support using fftw3 split interface.