Changeset 3002 in Sophya for trunk/SophyaLib/NTools/fftpserver.cc
- Timestamp:
- Jul 3, 2006, 1:04:51 PM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaLib/NTools/fftpserver.cc
r2988 r3002 40 40 41 41 42 FFTPackServer::FFTPackServer() 42 //! Constructor - If preserve_input==true, input arrays will not be overwritten. 43 FFTPackServer::FFTPackServer(bool preserve_input) 43 44 : FFTServerInterface("FFTPackServer using extended FFTPack (C-version) package") 44 , ckR4("FFTPackServer: ", true, true) , ckR8("FFTPackServer: ", true, true) 45 , ckR4("FFTPackServer: ", true, true) , ckR8("FFTPackServer: ", true, true), 46 _preserve_input(preserve_input) 45 47 { 46 48 //the working array and its size for the different … … 66 68 FFTServerInterface * FFTPackServer::Clone() 67 69 { 68 return (new FFTPackServer );69 } 70 71 72 void FFTPackServer::FFTForward(TArray< complex<r_8> > const& in, TArray< complex<r_8> > & out)70 return (new FFTPackServer(_preserve_input) ); 71 } 72 73 74 void FFTPackServer::FFTForward(TArray< complex<r_8> > & in, TArray< complex<r_8> > & out) 73 75 { 74 76 ckR8.CheckResize(in, out); … … 78 80 } 79 81 80 void FFTPackServer::FFTBackward(TArray< complex<r_8> > const& in, TArray< complex<r_8> > & out)82 void FFTPackServer::FFTBackward(TArray< complex<r_8> > & in, TArray< complex<r_8> > & out) 81 83 { 82 84 ckR8.CheckResize(in, out); … … 86 88 87 89 88 void FFTPackServer::FFTForward(TArray< complex<r_4> > const& in, TArray< complex<r_4> > & out)90 void FFTPackServer::FFTForward(TArray< complex<r_4> > & in, TArray< complex<r_4> > & out) 89 91 { 90 92 ckR4.CheckResize(in, out); … … 94 96 } 95 97 96 void FFTPackServer::FFTBackward(TArray< complex<r_4> > const& in, TArray< complex<r_4> > & out)98 void FFTPackServer::FFTBackward(TArray< complex<r_4> > & in, TArray< complex<r_4> > & out) 97 99 { 98 100 ckR4.CheckResize(in, out); … … 101 103 } 102 104 103 void FFTPackServer::FFTForward(TArray< r_4 > const & in, TArray< complex<r_4> > & out) 104 { 105 ckR4.CheckResize(in, out); 106 TArray< r_4 > inout(in, false); 105 void FFTPackServer::FFTForward(TArray< r_4 > & in, TArray< complex<r_4> > & out) 106 { 107 ckR4.CheckResize(in, out); 108 bool share = (_preserve_input) ? false : true; 109 TArray< r_4 > inout(in, share); 107 110 fftf(inout.Size(), inout.Data()); 108 111 ReShapetoCompl(inout, out); … … 110 113 } 111 114 112 void FFTPackServer::FFTBackward(TArray< complex<r_4> > const& in, TArray< r_4 > & out,115 void FFTPackServer::FFTBackward(TArray< complex<r_4> > & in, TArray< r_4 > & out, 113 116 bool usoutsz) 114 117 { … … 119 122 120 123 121 void FFTPackServer::FFTForward(TArray< r_8 > const& in, TArray< complex<r_8> > & out)124 void FFTPackServer::FFTForward(TArray< r_8 > & in, TArray< complex<r_8> > & out) 122 125 { 123 126 ckR8.CheckResize(in, out); 124 TArray< r_8 > inout(in, false); 127 bool share = (_preserve_input) ? false : true; 128 TArray< r_8 > inout(in, share); 125 129 fftf(inout.Size(), inout.Data()); 126 130 ReShapetoCompl(inout, out); … … 128 132 } 129 133 130 void FFTPackServer::FFTBackward(TArray< complex<r_8> > const& in, TArray< r_8 > & out,134 void FFTPackServer::FFTBackward(TArray< complex<r_8> > & in, TArray< r_8 > & out, 131 135 bool usoutsz) 132 136 {
Note:
See TracChangeset
for help on using the changeset viewer.