@@ -134,19 +134,34 @@ type DummyirFFTPlan{T,inplace} <: Base.DFT.Plan{T} end
134
134
type DummyDCTPlan{T,inplace} <: Base.DFT.Plan{T} end
135
135
type DummyiDCTPlan{T,inplace} <: Base.DFT.Plan{T} end
136
136
137
- * {T,N}(p:: DummyFFTPlan{T,true} , x:: StridedArray{T,N} )= fft! (x)
138
- * {T,N}(p:: DummyiFFTPlan{T,true} , x:: StridedArray{T,N} )= ifft! (x)
139
- * {T,N}(p:: DummyrFFTPlan{T,true} , x:: StridedArray{T,N} )= rfft! (x)
140
- * {T,N}(p:: DummyirFFTPlan{T,true} , x:: StridedArray{T,N} )= irfft! (x)
141
- * {T,N}(p:: DummyDCTPlan{T,true} , x:: StridedArray{T,N} )= dct! (x)
142
- * {T,N}(p:: DummyiDCTPlan{T,true} , x:: StridedArray{T,N} )= idct! (x)
143
-
144
- * {T,N}(p:: DummyFFTPlan{T,false} , x:: StridedArray{T,N} )= fft (x)
145
- * {T,N}(p:: DummyiFFTPlan{T,false} , x:: StridedArray{T,N} )= ifft (x)
146
- * {T,N}(p:: DummyrFFTPlan{T,false} , x:: StridedArray{T,N} )= rfft (x)
147
- * {T,N}(p:: DummyirFFTPlan{T,false} , x:: StridedArray{T,N} )= irfft (x)
148
- * {T,N}(p:: DummyDCTPlan{T,false} , x:: StridedArray{T,N} )= dct (x)
149
- * {T,N}(p:: DummyiDCTPlan{T,false} , x:: StridedArray{T,N} )= idct (x)
137
+ for (Plan,iPlan) in ((:DummyFFTPlan ,:DummyiFFTPlan ),
138
+ (:DummyrFFTPlan ,:DummyirFFTPlan ),
139
+ (:DummyDCTPlan ,:DummyiDCTPlan ))
140
+ @eval begin
141
+ Base. inv {T,inplace} (:: $Plan{T,inplace} )= $ iPlan {T,inplace} ()
142
+ Base. inv {T,inplace} (:: $iPlan{T,inplace} )= $ Plan {T,inplace} ()
143
+ end
144
+ end
145
+
146
+
147
+ for (Plan,ff,ff!) in ((:DummyFFTPlan ,:fft ,:fft! ),
148
+ (:DummyiFFTPlan ,:ifft ,:ifft! ),
149
+ (:DummyrFFTPlan ,:rfft ,:rfft! ),
150
+ (:DummyirFFTPlan ,:irfft ,:irfft! ),
151
+ (:DummyDCTPlan ,:dct ,:dct! ),
152
+ (:DummyiDCTPlan ,:idct ,:idct! ))
153
+ @eval begin
154
+ * {T,N}(p:: $Plan{T,true} , x:: StridedArray{T,N} )= $ ff! (x)
155
+ * {T,N}(p:: $Plan{T,false} , x:: StridedArray{T,N} )= $ ff (x)
156
+ function Base. A_mul_B! (C:: StridedVector ,p:: $Plan ,x:: StridedVector )
157
+ C[:]= $ ff (x)
158
+ C
159
+ end
160
+ end
161
+ end
162
+
163
+
164
+
150
165
151
166
Base. plan_fft! {T<:BigFloats} (x:: Vector{T} ) = DummyFFTPlan {Complex{BigFloat},true} ()
152
167
Base. plan_ifft! {T<:BigFloats} (x:: Vector{T} ) = DummyiFFTPlan {Complex{BigFloat},true} ()
0 commit comments