-
Notifications
You must be signed in to change notification settings - Fork 17
/
fft.hpp
569 lines (422 loc) · 21.5 KB
/
fft.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
//=======================================================================
// Copyright (c) 2014-2015 Baptiste Wicht
// Distributed under the terms of the MIT License.
// (See accompanying file LICENSE or copy at
// http://opensource.org/licenses/MIT)
//=======================================================================
#ifndef ETL_IMPL_BLAS_FFT_HPP
#define ETL_IMPL_BLAS_FFT_HPP
#include "../../config.hpp"
#ifdef ETL_MKL_MODE
#include "mkl_dfti.h"
#endif
namespace etl {
namespace impl {
namespace blas {
#ifdef ETL_MKL_MODE
namespace detail {
inline void cfft_kernel(const std::complex<float>* in, std::size_t s, std::complex<float>* out){
DFTI_DESCRIPTOR_HANDLE descriptor;
MKL_LONG status;
auto* in_ptr = const_cast<void*>(static_cast<const void*>(in));
status = DftiCreateDescriptor(&descriptor, DFTI_SINGLE, DFTI_COMPLEX, 1, s); //Specify size and precision
status = DftiSetValue(descriptor, DFTI_PLACEMENT, DFTI_NOT_INPLACE); //Out of place FFT
status = DftiCommitDescriptor(descriptor); //Finalize the descriptor
status = DftiComputeForward(descriptor, in_ptr, out); //Compute the Forward FFT
status = DftiFreeDescriptor(&descriptor); //Free the descriptor
}
inline void zfft_kernel(const std::complex<double>* in, std::size_t s, std::complex<double>* out){
DFTI_DESCRIPTOR_HANDLE descriptor;
MKL_LONG status;
auto* in_ptr = const_cast<void*>(static_cast<const void*>(in));
status = DftiCreateDescriptor(&descriptor, DFTI_DOUBLE, DFTI_COMPLEX, 1, s); //Specify size and precision
status = DftiSetValue(descriptor, DFTI_PLACEMENT, DFTI_NOT_INPLACE); //Out of place FFT
status = DftiCommitDescriptor(descriptor); //Finalize the descriptor
status = DftiComputeForward(descriptor, in_ptr, out); //Compute the Forward FFT
status = DftiFreeDescriptor(&descriptor); //Free the descriptor
}
inline void inplace_cfft_kernel(std::complex<float>* in, std::size_t s){
DFTI_DESCRIPTOR_HANDLE descriptor;
MKL_LONG status;
auto* in_ptr = static_cast<void*>(in);
status = DftiCreateDescriptor(&descriptor, DFTI_SINGLE, DFTI_COMPLEX, 1, s); //Specify size and precision
status = DftiCommitDescriptor(descriptor); //Finalize the descriptor
status = DftiComputeForward(descriptor, in_ptr); //Compute the Forward FFT
status = DftiFreeDescriptor(&descriptor); //Free the descriptor
}
inline void inplace_zfft_kernel(std::complex<double>* in, std::size_t s){
DFTI_DESCRIPTOR_HANDLE descriptor;
MKL_LONG status;
auto* in_ptr = static_cast<void*>(in);
status = DftiCreateDescriptor(&descriptor, DFTI_DOUBLE, DFTI_COMPLEX, 1, s); //Specify size and precision
status = DftiCommitDescriptor(descriptor); //Finalize the descriptor
status = DftiComputeForward(descriptor, in_ptr, in); //Compute the Forward FFT
status = DftiFreeDescriptor(&descriptor); //Free the descriptor
}
inline void cifft_kernel(const std::complex<float>* in, std::size_t s, std::complex<float>* out){
DFTI_DESCRIPTOR_HANDLE descriptor;
MKL_LONG status;
auto* in_ptr = const_cast<void*>(static_cast<const void*>(in));
status = DftiCreateDescriptor(&descriptor, DFTI_SINGLE, DFTI_COMPLEX, 1, s); //Specify size and precision
status = DftiSetValue(descriptor, DFTI_PLACEMENT, DFTI_NOT_INPLACE); //Out of place FFT
status = DftiSetValue(descriptor, DFTI_BACKWARD_SCALE, 1.0f / s); //Scale down the output
status = DftiCommitDescriptor(descriptor); //Finalize the descriptor
status = DftiComputeBackward(descriptor, in_ptr, out); //Compute the Forward FFT
status = DftiFreeDescriptor(&descriptor); //Free the descriptor
}
inline void zifft_kernel(const std::complex<double>* in, std::size_t s, std::complex<double>* out){
DFTI_DESCRIPTOR_HANDLE descriptor;
MKL_LONG status;
auto* in_ptr = const_cast<void*>(static_cast<const void*>(in));
status = DftiCreateDescriptor(&descriptor, DFTI_DOUBLE, DFTI_COMPLEX, 1, s); //Specify size and precision
status = DftiSetValue(descriptor, DFTI_PLACEMENT, DFTI_NOT_INPLACE); //Out of place FFT
status = DftiSetValue(descriptor, DFTI_BACKWARD_SCALE, 1.0 / s); //Scale down the output
status = DftiCommitDescriptor(descriptor); //Finalize the descriptor
status = DftiComputeBackward(descriptor, in_ptr, out); //Compute the Forward FFT
status = DftiFreeDescriptor(&descriptor); //Free the descriptor
}
inline void inplace_cifft_kernel(std::complex<float>* in, std::size_t s){
DFTI_DESCRIPTOR_HANDLE descriptor;
MKL_LONG status;
auto* in_ptr = static_cast<void*>(in);
status = DftiCreateDescriptor(&descriptor, DFTI_SINGLE, DFTI_COMPLEX, 1, s); //Specify size and precision
status = DftiSetValue(descriptor, DFTI_BACKWARD_SCALE, 1.0f / s); //Scale down the output
status = DftiCommitDescriptor(descriptor); //Finalize the descriptor
status = DftiComputeBackward(descriptor, in_ptr); //Compute the Forward FFT
status = DftiFreeDescriptor(&descriptor); //Free the descriptor
}
inline void inplace_zifft_kernel(std::complex<double>* in, std::size_t s){
DFTI_DESCRIPTOR_HANDLE descriptor;
MKL_LONG status;
auto* in_ptr = static_cast<void*>(in);
status = DftiCreateDescriptor(&descriptor, DFTI_DOUBLE, DFTI_COMPLEX, 1, s); //Specify size and precision
status = DftiSetValue(descriptor, DFTI_BACKWARD_SCALE, 1.0 / s); //Scale down the output
status = DftiCommitDescriptor(descriptor); //Finalize the descriptor
status = DftiComputeBackward(descriptor, in_ptr); //Compute the Forward FFT
status = DftiFreeDescriptor(&descriptor); //Free the descriptor
}
inline void cfft2_kernel(const std::complex<float>* in, std::size_t d1, std::size_t d2, std::complex<float>* out){
DFTI_DESCRIPTOR_HANDLE descriptor;
MKL_LONG status;
MKL_LONG dim[]{static_cast<long>(d1), static_cast<long>(d2)};
auto* in_ptr = const_cast<void*>(static_cast<const void*>(in));
status = DftiCreateDescriptor(&descriptor, DFTI_SINGLE, DFTI_COMPLEX, 2, dim); //Specify size and precision
status = DftiSetValue(descriptor, DFTI_PLACEMENT, DFTI_NOT_INPLACE); //Out of place FFT
status = DftiCommitDescriptor(descriptor); //Finalize the descriptor
status = DftiComputeForward(descriptor, in_ptr, out); //Compute the Forward FFT
status = DftiFreeDescriptor(&descriptor); //Free the descriptor
}
inline void zfft2_kernel(const std::complex<double>* in, std::size_t d1, std::size_t d2, std::complex<double>* out){
DFTI_DESCRIPTOR_HANDLE descriptor;
MKL_LONG status;
MKL_LONG dim[]{static_cast<long>(d1), static_cast<long>(d2)};
auto* in_ptr = const_cast<void*>(static_cast<const void*>(in));
status = DftiCreateDescriptor(&descriptor, DFTI_DOUBLE, DFTI_COMPLEX, 2, dim); //Specify size and precision
status = DftiSetValue(descriptor, DFTI_PLACEMENT, DFTI_NOT_INPLACE); //Out of place FFT
status = DftiCommitDescriptor(descriptor); //Finalize the descriptor
status = DftiComputeForward(descriptor, in_ptr, out); //Compute the Forward FFT
status = DftiFreeDescriptor(&descriptor); //Free the descriptor
}
inline void inplace_cfft2_kernel(std::complex<float>* in, std::size_t d1, std::size_t d2){
DFTI_DESCRIPTOR_HANDLE descriptor;
MKL_LONG status;
MKL_LONG dim[]{static_cast<long>(d1), static_cast<long>(d2)};
auto* in_ptr = const_cast<void*>(static_cast<const void*>(in));
status = DftiCreateDescriptor(&descriptor, DFTI_SINGLE, DFTI_COMPLEX, 2, dim); //Specify size and precision
status = DftiCommitDescriptor(descriptor); //Finalize the descriptor
status = DftiComputeForward(descriptor, in_ptr); //Compute the Forward FFT
status = DftiFreeDescriptor(&descriptor); //Free the descriptor
}
inline void inplace_zfft2_kernel(std::complex<double>* in, std::size_t d1, std::size_t d2){
DFTI_DESCRIPTOR_HANDLE descriptor;
MKL_LONG status;
MKL_LONG dim[]{static_cast<long>(d1), static_cast<long>(d2)};
auto* in_ptr = const_cast<void*>(static_cast<const void*>(in));
status = DftiCreateDescriptor(&descriptor, DFTI_DOUBLE, DFTI_COMPLEX, 2, dim); //Specify size and precision
status = DftiCommitDescriptor(descriptor); //Finalize the descriptor
status = DftiComputeForward(descriptor, in_ptr); //Compute the Forward FFT
status = DftiFreeDescriptor(&descriptor); //Free the descriptor
}
inline void cifft2_kernel(const std::complex<float>* in, std::size_t d1, std::size_t d2, std::complex<float>* out){
DFTI_DESCRIPTOR_HANDLE descriptor;
MKL_LONG status;
MKL_LONG dim[]{static_cast<long>(d1), static_cast<long>(d2)};
auto* in_ptr = const_cast<void*>(static_cast<const void*>(in));
status = DftiCreateDescriptor(&descriptor, DFTI_SINGLE, DFTI_COMPLEX, 2, dim); //Specify size and precision
status = DftiSetValue(descriptor, DFTI_PLACEMENT, DFTI_NOT_INPLACE); //Out of place FFT
status = DftiSetValue(descriptor, DFTI_BACKWARD_SCALE, 1.0f / (d1 * d2)); //Scale down the output
status = DftiCommitDescriptor(descriptor); //Finalize the descriptor
status = DftiComputeBackward(descriptor, in_ptr, out); //Compute the Forward FFT
status = DftiFreeDescriptor(&descriptor); //Free the descriptor
}
inline void zifft2_kernel(const std::complex<double>* in, std::size_t d1, std::size_t d2, std::complex<double>* out){
DFTI_DESCRIPTOR_HANDLE descriptor;
MKL_LONG status;
MKL_LONG dim[]{static_cast<long>(d1), static_cast<long>(d2)};
auto* in_ptr = const_cast<void*>(static_cast<const void*>(in));
status = DftiCreateDescriptor(&descriptor, DFTI_DOUBLE, DFTI_COMPLEX, 2, dim); //Specify size and precision
status = DftiSetValue(descriptor, DFTI_PLACEMENT, DFTI_NOT_INPLACE); //Out of place FFT
status = DftiSetValue(descriptor, DFTI_BACKWARD_SCALE, 1.0 / (d1 * d2)); //Scale down the output
status = DftiCommitDescriptor(descriptor); //Finalize the descriptor
status = DftiComputeBackward(descriptor, in_ptr, out); //Compute the Forward FFT
status = DftiFreeDescriptor(&descriptor); //Free the descriptor
}
inline void inplace_cifft2_kernel(std::complex<float>* in, std::size_t d1, std::size_t d2){
DFTI_DESCRIPTOR_HANDLE descriptor;
MKL_LONG status;
MKL_LONG dim[]{static_cast<long>(d1), static_cast<long>(d2)};
auto* in_ptr = const_cast<void*>(static_cast<const void*>(in));
status = DftiCreateDescriptor(&descriptor, DFTI_SINGLE, DFTI_COMPLEX, 2, dim); //Specify size and precision
status = DftiSetValue(descriptor, DFTI_BACKWARD_SCALE, 1.0f / (d1 * d2)); //Scale down the output
status = DftiCommitDescriptor(descriptor); //Finalize the descriptor
status = DftiComputeBackward(descriptor, in_ptr); //Compute the Forward FFT
status = DftiFreeDescriptor(&descriptor); //Free the descriptor
}
inline void inplace_zifft2_kernel(std::complex<double>* in, std::size_t d1, std::size_t d2){
DFTI_DESCRIPTOR_HANDLE descriptor;
MKL_LONG status;
MKL_LONG dim[]{static_cast<long>(d1), static_cast<long>(d2)};
auto* in_ptr = const_cast<void*>(static_cast<const void*>(in));
status = DftiCreateDescriptor(&descriptor, DFTI_DOUBLE, DFTI_COMPLEX, 2, dim); //Specify size and precision
status = DftiSetValue(descriptor, DFTI_BACKWARD_SCALE, 1.0 / (d1 * d2)); //Scale down the output
status = DftiCommitDescriptor(descriptor); //Finalize the descriptor
status = DftiComputeBackward(descriptor, in_ptr); //Compute the Forward FFT
status = DftiFreeDescriptor(&descriptor); //Free the descriptor
}
} //End of namespace detail
template<typename A, typename C>
void sfft1(A&& a, C&& c){
auto a_complex = allocate<std::complex<float>>(a.size());
std::copy(a.begin(), a.end(), a_complex.get());
detail::cfft_kernel(a_complex.get(), a.size(), c.memory_start());
};
template<typename A, typename C>
void dfft1(A&& a, C&& c){
auto a_complex = allocate<std::complex<double>>(a.size());
std::copy(a.begin(), a.end(), a_complex.get());
detail::zfft_kernel(a_complex.get(), a.size(), c.memory_start());
};
template<typename A, typename C>
void cfft1(A&& a, C&& c){
detail::cfft_kernel(a.memory_start(), a.size(), c.memory_start());
};
template<typename A, typename C>
void zfft1(A&& a, C&& c){
detail::zfft_kernel(a.memory_start(), a.size(), c.memory_start());
};
template<typename A, typename C>
void cifft1(A&& a, C&& c){
detail::cifft_kernel(a.memory_start(), a.size(), c.memory_start());
};
template<typename A, typename C>
void zifft1(A&& a, C&& c){
detail::zifft_kernel(a.memory_start(), a.size(), c.memory_start());
};
template<typename A, typename C>
void cifft1_real(A&& a, C&& c){
auto c_complex = allocate<std::complex<float>>(a.size());
detail::cifft_kernel(a.memory_start(), a.size(), c_complex.get());
for(std::size_t i = 0; i < a.size(); ++i){
c[i] = c_complex[i].real();
}
};
template<typename A, typename C>
void zifft1_real(A&& a, C&& c){
auto c_complex = allocate<std::complex<double>>(a.size());
detail::zifft_kernel(a.memory_start(), a.size(), c_complex.get());
for(std::size_t i = 0; i < a.size(); ++i){
c[i] = c_complex[i].real();
}
};
template<typename A, typename B, typename C>
void sfft1_convolve(A&& a, B&& b, C&& c){
const auto m = a.size();
const auto n = b.size();
const auto size = m + n - 1;
auto a_padded = allocate<std::complex<float>>(size);
auto b_padded = allocate<std::complex<float>>(size);
std::copy(a.begin(), a.end(), a_padded.get());
std::fill(a_padded.get() + m, a_padded.get() + size, 0.0f);
std::copy(b.begin(), b.end(), b_padded.get());
std::fill(b_padded.get() + n, b_padded.get() + size, 0.0f);
detail::inplace_cfft_kernel(a_padded.get(), size);
detail::inplace_cfft_kernel(b_padded.get(), size);
for(std::size_t i = 0; i < size; ++i){
a_padded[i] *= b_padded[i];
}
detail::inplace_cifft_kernel(a_padded.get(), size);
for(std::size_t i = 0; i < size; ++i){
c[i] = a_padded[i].real();
}
}
template<typename A, typename B, typename C>
void dfft1_convolve(A&& a, B&& b, C&& c){
const auto m = a.size();
const auto n = b.size();
const auto size = m + n - 1;
auto a_padded = allocate<std::complex<double>>(size);
auto b_padded = allocate<std::complex<double>>(size);
std::copy(a.begin(), a.end(), a_padded.get());
std::fill(a_padded.get() + m, a_padded.get() + size, 0.0);
std::copy(b.begin(), b.end(), b_padded.get());
std::fill(b_padded.get() + n, b_padded.get() + size, 0.0);
detail::inplace_zfft_kernel(a_padded.get(), size);
detail::inplace_zfft_kernel(b_padded.get(), size);
for(std::size_t i = 0; i < size; ++i){
a_padded[i] *= b_padded[i];
}
detail::inplace_zifft_kernel(a_padded.get(), size);
for(std::size_t i = 0; i < size; ++i){
c[i] = a_padded[i].real();
}
}
template<typename A, typename C>
void sfft2(A&& a, C&& c){
auto a_complex = allocate<std::complex<float>>(a.size());
std::copy(a.begin(), a.end(), a_complex.get());
detail::cfft2_kernel(a_complex.get(), etl::dim<0>(a), etl::dim<1>(a), c.memory_start());
};
template<typename A, typename C>
void dfft2(A&& a, C&& c){
auto a_complex = allocate<std::complex<double>>(a.size());
std::copy(a.begin(), a.end(), a_complex.get());
detail::zfft2_kernel(a_complex.get(), etl::dim<0>(a), etl::dim<1>(a), c.memory_start());
};
template<typename A, typename C>
void cfft2(A&& a, C&& c){
detail::cfft2_kernel(a.memory_start(), etl::dim<0>(a), etl::dim<1>(a), c.memory_start());
};
template<typename A, typename C>
void zfft2(A&& a, C&& c){
detail::zfft2_kernel(a.memory_start(), etl::dim<0>(a), etl::dim<1>(a), c.memory_start());
};
template<typename A, typename C>
void cifft2(A&& a, C&& c){
detail::cifft2_kernel(a.memory_start(), etl::dim<0>(a), etl::dim<1>(a), c.memory_start());
};
template<typename A, typename C>
void zifft2(A&& a, C&& c){
detail::zifft2_kernel(a.memory_start(), etl::dim<0>(a), etl::dim<1>(a), c.memory_start());
};
template<typename A, typename C>
void cifft2_real(A&& a, C&& c){
auto c_complex = allocate<std::complex<float>>(a.size());
detail::cifft2_kernel(a.memory_start(), etl::dim<0>(a), etl::dim<1>(a), c_complex.get());
for(std::size_t i = 0; i < a.size(); ++i){
c[i] = c_complex[i].real();
}
};
template<typename A, typename C>
void zifft2_real(A&& a, C&& c){
auto c_complex = allocate<std::complex<double>>(a.size());
detail::zifft2_kernel(a.memory_start(), etl::dim<0>(a), etl::dim<1>(a), c_complex.get());
for(std::size_t i = 0; i < a.size(); ++i){
c[i] = c_complex[i].real();
}
};
template<typename A, typename B, typename C>
void sfft2_convolve(A&& a, B&& b, C&& c){
const auto m1 = etl::dim<0>(a);
const auto n1= etl::dim<0>(b);
const auto s1 = m1 + n1 - 1;
const auto m2 = etl::dim<1>(a);
const auto n2= etl::dim<1>(b);
const auto s2 = m2 + n2 - 1;
auto a_padded = allocate<std::complex<float>>(c.size());
auto b_padded = allocate<std::complex<float>>(c.size());
for(std::size_t i = 0; i < m1; ++i){
for(std::size_t j = 0; j < m2; ++j){
a_padded[i * s2 + j] = a(i,j);
}
}
for(std::size_t i = 0; i < n1; ++i){
for(std::size_t j = 0; j < n2; ++j){
b_padded[i * s2 + j] = b(i,j);
}
}
detail::inplace_cfft2_kernel(a_padded.get(), s1, s2);
detail::inplace_cfft2_kernel(b_padded.get(), s1, s2);
for(std::size_t i = 0; i < c.size(); ++i){
a_padded[i] *= b_padded[i];
}
detail::inplace_cifft2_kernel(a_padded.get(), s1, s2);
for(std::size_t i = 0; i < c.size(); ++i){
c[i] = a_padded[i].real();
}
}
template<typename A, typename B, typename C>
void dfft2_convolve(A&& a, B&& b, C&& c){
const auto m1 = etl::dim<0>(a);
const auto n1= etl::dim<0>(b);
const auto s1 = m1 + n1 - 1;
const auto m2 = etl::dim<1>(a);
const auto n2= etl::dim<1>(b);
const auto s2 = m2 + n2 - 1;
auto a_padded = allocate<std::complex<double>>(c.size());
auto b_padded = allocate<std::complex<double>>(c.size());
for(std::size_t i = 0; i < m1; ++i){
for(std::size_t j = 0; j < m2; ++j){
a_padded[i * s2 + j] = a(i,j);
}
}
for(std::size_t i = 0; i < n1; ++i){
for(std::size_t j = 0; j < n2; ++j){
b_padded[i * s2 + j] = b(i,j);
}
}
detail::inplace_zfft2_kernel(a_padded.get(), s1, s2);
detail::inplace_zfft2_kernel(b_padded.get(), s1, s2);
for(std::size_t i = 0; i < c.size(); ++i){
a_padded[i] *= b_padded[i];
}
detail::inplace_zifft2_kernel(a_padded.get(), s1, s2);
for(std::size_t i = 0; i < c.size(); ++i){
c[i] = a_padded[i].real();
}
}
#else
template<typename A, typename C>
void sfft1(A&&, C&&);
template<typename A, typename C>
void dfft1(A&&, C&&);
template<typename A, typename C>
void cfft1(A&&, C&&);
template<typename A, typename C>
void zfft1(A&&, C&&);
template<typename A, typename C>
void cifft1(A&&, C&&);
template<typename A, typename C>
void zifft1(A&&, C&&);
template<typename A, typename C>
void cifft1_real(A&&, C&&);
template<typename A, typename C>
void zifft1_real(A&&, C&&);
template<typename A, typename B, typename C>
void sfft1_convolve(A&&, C&&);
template<typename A, typename B, typename C>
void dfft1_convolve(A&&, B&&, C&&);
template<typename A, typename C>
void sfft2(A&&, C&&);
template<typename A, typename C>
void dfft2(A&&, C&&);
template<typename A, typename C>
void cfft2(A&&, C&&);
template<typename A, typename C>
void zfft2(A&&, C&&);
template<typename A, typename C>
void cifft2(A&&, C&&);
template<typename A, typename C>
void zifft2(A&&, C&&);
template<typename A, typename C>
void cifft2_real(A&&, C&&);
template<typename A, typename C>
void zifft2_real(A&&, C&&);
template<typename A, typename B, typename C>
void sfft2_convolve(A&&, C&&);
template<typename A, typename B, typename C>
void dfft2_convolve(A&&, B&&, C&&);
#endif
} //end of namespace blas
} //end of namespace impl
} //end of namespace etl
#endif