1 /* ************************************************************************
2 * Copyright 2013 Advanced Micro Devices, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 * ************************************************************************/
16
17
18 #include <gtest/gtest.h>
19 #include<math.h>
20
21 #include "test_constants.h"
22 #include "fftw_transform.h"
23 #include "cl_transform.h"
24 #include "typedefs.h"
25 #include "accuracy_test_common.h"
26 #include <stdexcept>
27 #include <vector>
28
29 /*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
30 /*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
31 class accuracy_test_pow7_single : public ::testing::Test {
32 protected:
accuracy_test_pow7_single()33 accuracy_test_pow7_single() {}
~accuracy_test_pow7_single()34 virtual ~accuracy_test_pow7_single() {}
SetUp()35 virtual void SetUp() {}
TearDown()36 virtual void TearDown() {
37 }
38 };
39
40 /*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
41 /*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*/
42 class accuracy_test_pow7_double : public ::testing::Test {
43 protected:
accuracy_test_pow7_double()44 accuracy_test_pow7_double() {}
~accuracy_test_pow7_double()45 virtual ~accuracy_test_pow7_double() {}
SetUp()46 virtual void SetUp() {}
TearDown()47 virtual void TearDown() {
48 }
49 };
50
51 namespace power7
52 {
53 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
54 // ^^^^^^^^^^^^^^^^^^^^^^^ normal 1D ^^^^^^^^^^^^^^^^^^^^^^ //
55 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
56
57 // *****************************************************
58 // *****************************************************
59 template< class T, class cl_T, class fftw_T >
normal_1D_forward_in_place_complex_planar_to_complex_planar()60 void normal_1D_forward_in_place_complex_planar_to_complex_planar()
61 {
62 std::vector<size_t> lengths;
63 lengths.push_back(normal7);
64 size_t batch = 1;
65 std::vector<size_t> input_strides;
66 std::vector<size_t> output_strides;
67 size_t input_distance = 0;
68 size_t output_distance = 0;
69 layout::buffer_layout_t in_layout = layout::complex_planar;
70 layout::buffer_layout_t out_layout = layout::complex_planar;
71 placeness::placeness_t placeness = placeness::in_place;
72 direction::direction_t direction = direction::forward;
73
74 data_pattern pattern = sawtooth;
75 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
76 }
77
TEST_F(accuracy_test_pow7_single,normal_1D_forward_in_place_complex_planar_to_complex_planar)78 TEST_F(accuracy_test_pow7_single, normal_1D_forward_in_place_complex_planar_to_complex_planar)
79 {
80 try { normal_1D_forward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
81 catch (const std::exception& err) { handle_exception(err); }
82 }
83
TEST_F(accuracy_test_pow7_double,normal_1D_forward_in_place_complex_planar_to_complex_planar)84 TEST_F(accuracy_test_pow7_double, normal_1D_forward_in_place_complex_planar_to_complex_planar)
85 {
86 try { normal_1D_forward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
87 catch (const std::exception& err) { handle_exception(err); }
88 }
89
90 // *****************************************************
91 // *****************************************************
92 template< class T, class cl_T, class fftw_T >
normal_1D_backward_in_place_complex_planar_to_complex_planar()93 void normal_1D_backward_in_place_complex_planar_to_complex_planar()
94 {
95 std::vector<size_t> lengths;
96 lengths.push_back(normal7);
97 size_t batch = 1;
98 std::vector<size_t> input_strides;
99 std::vector<size_t> output_strides;
100 size_t input_distance = 0;
101 size_t output_distance = 0;
102 layout::buffer_layout_t in_layout = layout::complex_planar;
103 layout::buffer_layout_t out_layout = layout::complex_planar;
104 placeness::placeness_t placeness = placeness::in_place;
105 direction::direction_t direction = direction::backward;
106
107 data_pattern pattern = sawtooth;
108 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
109 }
110
TEST_F(accuracy_test_pow7_single,normal_1D_backward_in_place_complex_planar_to_complex_planar)111 TEST_F(accuracy_test_pow7_single, normal_1D_backward_in_place_complex_planar_to_complex_planar)
112 {
113 try { normal_1D_backward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
114 catch (const std::exception& err) { handle_exception(err); }
115 }
116
TEST_F(accuracy_test_pow7_double,normal_1D_backward_in_place_complex_planar_to_complex_planar)117 TEST_F(accuracy_test_pow7_double, normal_1D_backward_in_place_complex_planar_to_complex_planar)
118 {
119 try { normal_1D_backward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
120 catch (const std::exception& err) { handle_exception(err); }
121 }
122
123 // *****************************************************
124 // *****************************************************
125 template< class T, class cl_T, class fftw_T >
normal_1D_forward_in_place_complex_interleaved_to_complex_interleaved()126 void normal_1D_forward_in_place_complex_interleaved_to_complex_interleaved()
127 {
128 std::vector<size_t> lengths;
129 lengths.push_back(normal7);
130 size_t batch = 1;
131 std::vector<size_t> input_strides;
132 std::vector<size_t> output_strides;
133 size_t input_distance = 0;
134 size_t output_distance = 0;
135 layout::buffer_layout_t in_layout = layout::complex_interleaved;
136 layout::buffer_layout_t out_layout = layout::complex_interleaved;
137 placeness::placeness_t placeness = placeness::in_place;
138 direction::direction_t direction = direction::forward;
139
140 data_pattern pattern = sawtooth;
141 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
142 }
143
TEST_F(accuracy_test_pow7_single,normal_1D_forward_in_place_complex_interleaved_to_complex_interleaved)144 TEST_F(accuracy_test_pow7_single, normal_1D_forward_in_place_complex_interleaved_to_complex_interleaved)
145 {
146 try { normal_1D_forward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
147 catch (const std::exception& err) { handle_exception(err); }
148 }
149
TEST_F(accuracy_test_pow7_double,normal_1D_forward_in_place_complex_interleaved_to_complex_interleaved)150 TEST_F(accuracy_test_pow7_double, normal_1D_forward_in_place_complex_interleaved_to_complex_interleaved)
151 {
152 try { normal_1D_forward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
153 catch (const std::exception& err) { handle_exception(err); }
154 }
155
156 // *****************************************************
157 // *****************************************************
158 template< class T, class cl_T, class fftw_T >
normal_1D_backward_in_place_complex_interleaved_to_complex_interleaved()159 void normal_1D_backward_in_place_complex_interleaved_to_complex_interleaved()
160 {
161 std::vector<size_t> lengths;
162 lengths.push_back(normal7);
163 size_t batch = 1;
164 std::vector<size_t> input_strides;
165 std::vector<size_t> output_strides;
166 size_t input_distance = 0;
167 size_t output_distance = 0;
168 layout::buffer_layout_t in_layout = layout::complex_interleaved;
169 layout::buffer_layout_t out_layout = layout::complex_interleaved;
170 placeness::placeness_t placeness = placeness::in_place;
171 direction::direction_t direction = direction::backward;
172
173 data_pattern pattern = sawtooth;
174 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
175 }
176
TEST_F(accuracy_test_pow7_single,normal_1D_backward_in_place_complex_interleaved_to_complex_interleaved)177 TEST_F(accuracy_test_pow7_single, normal_1D_backward_in_place_complex_interleaved_to_complex_interleaved)
178 {
179 try { normal_1D_backward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
180 catch (const std::exception& err) { handle_exception(err); }
181 }
182
TEST_F(accuracy_test_pow7_double,normal_1D_backward_in_place_complex_interleaved_to_complex_interleaved)183 TEST_F(accuracy_test_pow7_double, normal_1D_backward_in_place_complex_interleaved_to_complex_interleaved)
184 {
185 try { normal_1D_backward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
186 catch (const std::exception& err) { handle_exception(err); }
187 }
188
189 // *****************************************************
190 // *****************************************************
191 template< class T, class cl_T, class fftw_T >
normal_1D_forward_out_of_place_complex_planar_to_complex_planar()192 void normal_1D_forward_out_of_place_complex_planar_to_complex_planar()
193 {
194 std::vector<size_t> lengths;
195 lengths.push_back(normal7);
196 size_t batch = 1;
197 std::vector<size_t> input_strides;
198 std::vector<size_t> output_strides;
199 size_t input_distance = 0;
200 size_t output_distance = 0;
201 layout::buffer_layout_t in_layout = layout::complex_planar;
202 layout::buffer_layout_t out_layout = layout::complex_planar;
203 placeness::placeness_t placeness = placeness::out_of_place;
204 direction::direction_t direction = direction::forward;
205
206 data_pattern pattern = sawtooth;
207 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
208 }
209
TEST_F(accuracy_test_pow7_single,normal_1D_forward_out_of_place_complex_planar_to_complex_planar)210 TEST_F(accuracy_test_pow7_single, normal_1D_forward_out_of_place_complex_planar_to_complex_planar)
211 {
212 try { normal_1D_forward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
213 catch (const std::exception& err) { handle_exception(err); }
214 }
215
TEST_F(accuracy_test_pow7_double,normal_1D_forward_out_of_place_complex_planar_to_complex_planar)216 TEST_F(accuracy_test_pow7_double, normal_1D_forward_out_of_place_complex_planar_to_complex_planar)
217 {
218 try { normal_1D_forward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
219 catch (const std::exception& err) { handle_exception(err); }
220 }
221
222 // *****************************************************
223 // *****************************************************
224 template< class T, class cl_T, class fftw_T >
normal_1D_backward_out_of_place_complex_planar_to_complex_planar()225 void normal_1D_backward_out_of_place_complex_planar_to_complex_planar()
226 {
227 std::vector<size_t> lengths;
228 lengths.push_back(normal7);
229 size_t batch = 1;
230 std::vector<size_t> input_strides;
231 std::vector<size_t> output_strides;
232 size_t input_distance = 0;
233 size_t output_distance = 0;
234 layout::buffer_layout_t in_layout = layout::complex_planar;
235 layout::buffer_layout_t out_layout = layout::complex_planar;
236 placeness::placeness_t placeness = placeness::out_of_place;
237 direction::direction_t direction = direction::backward;
238
239 data_pattern pattern = sawtooth;
240 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
241 }
242
TEST_F(accuracy_test_pow7_single,normal_1D_backward_out_of_place_complex_planar_to_complex_planar)243 TEST_F(accuracy_test_pow7_single, normal_1D_backward_out_of_place_complex_planar_to_complex_planar)
244 {
245 try { normal_1D_backward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
246 catch (const std::exception& err) { handle_exception(err); }
247 }
248
TEST_F(accuracy_test_pow7_double,normal_1D_backward_out_of_place_complex_planar_to_complex_planar)249 TEST_F(accuracy_test_pow7_double, normal_1D_backward_out_of_place_complex_planar_to_complex_planar)
250 {
251 try { normal_1D_backward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
252 catch (const std::exception& err) { handle_exception(err); }
253 }
254
255 // *****************************************************
256 // *****************************************************
257 template< class T, class cl_T, class fftw_T >
normal_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved()258 void normal_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved()
259 {
260 std::vector<size_t> lengths;
261 lengths.push_back(normal7);
262 size_t batch = 1;
263 std::vector<size_t> input_strides;
264 std::vector<size_t> output_strides;
265 size_t input_distance = 0;
266 size_t output_distance = 0;
267 layout::buffer_layout_t in_layout = layout::complex_interleaved;
268 layout::buffer_layout_t out_layout = layout::complex_interleaved;
269 placeness::placeness_t placeness = placeness::out_of_place;
270 direction::direction_t direction = direction::forward;
271
272 data_pattern pattern = sawtooth;
273 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
274 }
275
TEST_F(accuracy_test_pow7_single,normal_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved)276 TEST_F(accuracy_test_pow7_single, normal_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
277 {
278 try { normal_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
279 catch (const std::exception& err) { handle_exception(err); }
280 }
281
TEST_F(accuracy_test_pow7_double,normal_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved)282 TEST_F(accuracy_test_pow7_double, normal_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
283 {
284 try { normal_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
285 catch (const std::exception& err) { handle_exception(err); }
286 }
287
288 // *****************************************************
289 // *****************************************************
290 template< class T, class cl_T, class fftw_T >
normal_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved()291 void normal_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved()
292 {
293 std::vector<size_t> lengths;
294 lengths.push_back(normal7);
295 size_t batch = 1;
296 std::vector<size_t> input_strides;
297 std::vector<size_t> output_strides;
298 size_t input_distance = 0;
299 size_t output_distance = 0;
300 layout::buffer_layout_t in_layout = layout::complex_interleaved;
301 layout::buffer_layout_t out_layout = layout::complex_interleaved;
302 placeness::placeness_t placeness = placeness::out_of_place;
303 direction::direction_t direction = direction::backward;
304
305 data_pattern pattern = sawtooth;
306 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
307 }
308
TEST_F(accuracy_test_pow7_single,normal_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved)309 TEST_F(accuracy_test_pow7_single, normal_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
310 {
311 try { normal_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
312 catch (const std::exception& err) { handle_exception(err); }
313 }
314
TEST_F(accuracy_test_pow7_double,normal_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved)315 TEST_F(accuracy_test_pow7_double, normal_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
316 {
317 try { normal_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
318 catch (const std::exception& err) { handle_exception(err); }
319 }
320
321 // *****************************************************
322 // *****************************************************
323 template< class T, class cl_T, class fftw_T >
normal_1D_forward_out_of_place_complex_planar_to_complex_interleaved()324 void normal_1D_forward_out_of_place_complex_planar_to_complex_interleaved()
325 {
326 std::vector<size_t> lengths;
327 lengths.push_back(normal7);
328 size_t batch = 1;
329 std::vector<size_t> input_strides;
330 std::vector<size_t> output_strides;
331 size_t input_distance = 0;
332 size_t output_distance = 0;
333 layout::buffer_layout_t in_layout = layout::complex_planar;
334 layout::buffer_layout_t out_layout = layout::complex_interleaved;
335 placeness::placeness_t placeness = placeness::out_of_place;
336 direction::direction_t direction = direction::forward;
337
338 data_pattern pattern = sawtooth;
339 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
340 }
341
TEST_F(accuracy_test_pow7_single,normal_1D_forward_out_of_place_complex_planar_to_complex_interleaved)342 TEST_F(accuracy_test_pow7_single, normal_1D_forward_out_of_place_complex_planar_to_complex_interleaved)
343 {
344 try { normal_1D_forward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
345 catch (const std::exception& err) { handle_exception(err); }
346 }
347
TEST_F(accuracy_test_pow7_double,normal_1D_forward_out_of_place_complex_planar_to_complex_interleaved)348 TEST_F(accuracy_test_pow7_double, normal_1D_forward_out_of_place_complex_planar_to_complex_interleaved)
349 {
350 try { normal_1D_forward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
351 catch (const std::exception& err) { handle_exception(err); }
352 }
353
354 // *****************************************************
355 // *****************************************************
356 template< class T, class cl_T, class fftw_T >
normal_1D_backward_out_of_place_complex_planar_to_complex_interleaved()357 void normal_1D_backward_out_of_place_complex_planar_to_complex_interleaved()
358 {
359 std::vector<size_t> lengths;
360 lengths.push_back(normal7);
361 size_t batch = 1;
362 std::vector<size_t> input_strides;
363 std::vector<size_t> output_strides;
364 size_t input_distance = 0;
365 size_t output_distance = 0;
366 layout::buffer_layout_t in_layout = layout::complex_planar;
367 layout::buffer_layout_t out_layout = layout::complex_interleaved;
368 placeness::placeness_t placeness = placeness::out_of_place;
369 direction::direction_t direction = direction::backward;
370
371 data_pattern pattern = sawtooth;
372 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
373 }
374
TEST_F(accuracy_test_pow7_single,normal_1D_backward_out_of_place_complex_planar_to_complex_interleaved)375 TEST_F(accuracy_test_pow7_single, normal_1D_backward_out_of_place_complex_planar_to_complex_interleaved)
376 {
377 try { normal_1D_backward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
378 catch (const std::exception& err) { handle_exception(err); }
379 }
380
TEST_F(accuracy_test_pow7_double,normal_1D_backward_out_of_place_complex_planar_to_complex_interleaved)381 TEST_F(accuracy_test_pow7_double, normal_1D_backward_out_of_place_complex_planar_to_complex_interleaved)
382 {
383 try { normal_1D_backward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
384 catch (const std::exception& err) { handle_exception(err); }
385 }
386
387 // *****************************************************
388 // *****************************************************
389 template< class T, class cl_T, class fftw_T >
normal_1D_forward_out_of_place_complex_interleaved_to_complex_planar()390 void normal_1D_forward_out_of_place_complex_interleaved_to_complex_planar()
391 {
392 std::vector<size_t> lengths;
393 lengths.push_back(normal7);
394 size_t batch = 1;
395 std::vector<size_t> input_strides;
396 std::vector<size_t> output_strides;
397 size_t input_distance = 0;
398 size_t output_distance = 0;
399 layout::buffer_layout_t in_layout = layout::complex_interleaved;
400 layout::buffer_layout_t out_layout = layout::complex_planar;
401 placeness::placeness_t placeness = placeness::out_of_place;
402 direction::direction_t direction = direction::forward;
403
404 data_pattern pattern = sawtooth;
405 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
406 }
407
TEST_F(accuracy_test_pow7_single,normal_1D_forward_out_of_place_complex_interleaved_to_complex_planar)408 TEST_F(accuracy_test_pow7_single, normal_1D_forward_out_of_place_complex_interleaved_to_complex_planar)
409 {
410 try { normal_1D_forward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
411 catch (const std::exception& err) { handle_exception(err); }
412 }
413
TEST_F(accuracy_test_pow7_double,normal_1D_forward_out_of_place_complex_interleaved_to_complex_planar)414 TEST_F(accuracy_test_pow7_double, normal_1D_forward_out_of_place_complex_interleaved_to_complex_planar)
415 {
416 try { normal_1D_forward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
417 catch (const std::exception& err) { handle_exception(err); }
418 }
419
420 // *****************************************************
421 // *****************************************************
422 template< class T, class cl_T, class fftw_T >
normal_1D_backward_out_of_place_complex_interleaved_to_complex_planar()423 void normal_1D_backward_out_of_place_complex_interleaved_to_complex_planar()
424 {
425 std::vector<size_t> lengths;
426 lengths.push_back(normal7);
427 size_t batch = 1;
428 std::vector<size_t> input_strides;
429 std::vector<size_t> output_strides;
430 size_t input_distance = 0;
431 size_t output_distance = 0;
432 layout::buffer_layout_t in_layout = layout::complex_interleaved;
433 layout::buffer_layout_t out_layout = layout::complex_planar;
434 placeness::placeness_t placeness = placeness::out_of_place;
435 direction::direction_t direction = direction::backward;
436
437 data_pattern pattern = sawtooth;
438 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
439 }
440
TEST_F(accuracy_test_pow7_single,normal_1D_backward_out_of_place_complex_interleaved_to_complex_planar)441 TEST_F(accuracy_test_pow7_single, normal_1D_backward_out_of_place_complex_interleaved_to_complex_planar)
442 {
443 try { normal_1D_backward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
444 catch (const std::exception& err) { handle_exception(err); }
445 }
446
TEST_F(accuracy_test_pow7_double,normal_1D_backward_out_of_place_complex_interleaved_to_complex_planar)447 TEST_F(accuracy_test_pow7_double, normal_1D_backward_out_of_place_complex_interleaved_to_complex_planar)
448 {
449 try { normal_1D_backward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
450 catch (const std::exception& err) { handle_exception(err); }
451 }
452
453 // *****************************************************
454 // *****************************************************
455 template< class T, class cl_T, class fftw_T >
normal_1D_in_place_real_to_hermitian_interleaved()456 void normal_1D_in_place_real_to_hermitian_interleaved()
457 {
458 std::vector<size_t> lengths;
459 lengths.push_back(normal7);
460 size_t batch = 1;
461 std::vector<size_t> input_strides;
462 std::vector<size_t> output_strides;
463 size_t input_distance = 0;
464 size_t output_distance = 0;
465 layout::buffer_layout_t layout = layout::hermitian_interleaved;
466 placeness::placeness_t placeness = placeness::in_place;
467
468 data_pattern pattern = sawtooth;
469 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
470 }
471
TEST_F(accuracy_test_pow7_single,normal_1D_in_place_real_to_hermitian_interleaved)472 TEST_F(accuracy_test_pow7_single, normal_1D_in_place_real_to_hermitian_interleaved)
473 {
474 try { normal_1D_in_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
475 catch (const std::exception& err) { handle_exception(err); }
476 }
477
TEST_F(accuracy_test_pow7_double,normal_1D_in_place_real_to_hermitian_interleaved)478 TEST_F(accuracy_test_pow7_double, normal_1D_in_place_real_to_hermitian_interleaved)
479 {
480 try { normal_1D_in_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
481 catch (const std::exception& err) { handle_exception(err); }
482 }
483
484 // *****************************************************
485 // *****************************************************
486 template< class T, class cl_T, class fftw_T >
normal_1D_in_place_hermitian_interleaved_to_real()487 void normal_1D_in_place_hermitian_interleaved_to_real()
488 {
489 std::vector<size_t> lengths;
490 lengths.push_back(normal7);
491 size_t batch = 1;
492 std::vector<size_t> input_strides;
493 std::vector<size_t> output_strides;
494 size_t input_distance = 0;
495 size_t output_distance = 0;
496 layout::buffer_layout_t layout = layout::hermitian_interleaved;
497 placeness::placeness_t placeness = placeness::in_place;
498
499 data_pattern pattern = sawtooth;
500 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
501 }
502
TEST_F(accuracy_test_pow7_single,normal_1D_in_place_hermitian_interleaved_to_real)503 TEST_F(accuracy_test_pow7_single, normal_1D_in_place_hermitian_interleaved_to_real)
504 {
505 try { normal_1D_in_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
506 catch (const std::exception& err) { handle_exception(err); }
507 }
508
TEST_F(accuracy_test_pow7_double,normal_1D_in_place_hermitian_interleaved_to_real)509 TEST_F(accuracy_test_pow7_double, normal_1D_in_place_hermitian_interleaved_to_real)
510 {
511 try { normal_1D_in_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
512 catch (const std::exception& err) { handle_exception(err); }
513 }
514
515 // *****************************************************
516 // *****************************************************
517 template< class T, class cl_T, class fftw_T >
normal_1D_out_of_place_real_to_hermitian_interleaved()518 void normal_1D_out_of_place_real_to_hermitian_interleaved()
519 {
520 std::vector<size_t> lengths;
521 lengths.push_back(normal7);
522 size_t batch = 1;
523 std::vector<size_t> input_strides;
524 std::vector<size_t> output_strides;
525 size_t input_distance = 0;
526 size_t output_distance = 0;
527 layout::buffer_layout_t layout = layout::hermitian_interleaved;
528 placeness::placeness_t placeness = placeness::out_of_place;
529
530 data_pattern pattern = sawtooth;
531 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
532 }
533
TEST_F(accuracy_test_pow7_single,normal_1D_out_of_place_real_to_hermitian_interleaved)534 TEST_F(accuracy_test_pow7_single, normal_1D_out_of_place_real_to_hermitian_interleaved)
535 {
536 try { normal_1D_out_of_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
537 catch (const std::exception& err) { handle_exception(err); }
538 }
539
TEST_F(accuracy_test_pow7_double,normal_1D_out_of_place_real_to_hermitian_interleaved)540 TEST_F(accuracy_test_pow7_double, normal_1D_out_of_place_real_to_hermitian_interleaved)
541 {
542 try { normal_1D_out_of_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
543 catch (const std::exception& err) { handle_exception(err); }
544 }
545
546 // *****************************************************
547 // *****************************************************
548 template< class T, class cl_T, class fftw_T >
normal_1D_out_of_place_hermitian_interleaved_to_real()549 void normal_1D_out_of_place_hermitian_interleaved_to_real()
550 {
551 std::vector<size_t> lengths;
552 lengths.push_back(normal7);
553 size_t batch = 1;
554 std::vector<size_t> input_strides;
555 std::vector<size_t> output_strides;
556 size_t input_distance = 0;
557 size_t output_distance = 0;
558 layout::buffer_layout_t layout = layout::hermitian_interleaved;
559 placeness::placeness_t placeness = placeness::out_of_place;
560
561 data_pattern pattern = sawtooth;
562 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
563 }
564
TEST_F(accuracy_test_pow7_single,normal_1D_out_of_place_hermitian_interleaved_to_real)565 TEST_F(accuracy_test_pow7_single, normal_1D_out_of_place_hermitian_interleaved_to_real)
566 {
567 try { normal_1D_out_of_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
568 catch (const std::exception& err) { handle_exception(err); }
569 }
570
TEST_F(accuracy_test_pow7_double,normal_1D_out_of_place_hermitian_interleaved_to_real)571 TEST_F(accuracy_test_pow7_double, normal_1D_out_of_place_hermitian_interleaved_to_real)
572 {
573 try { normal_1D_out_of_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
574 catch (const std::exception& err) { handle_exception(err); }
575 }
576
577 // *****************************************************
578 // *****************************************************
579 template< class T, class cl_T, class fftw_T >
normal_1D_out_of_place_real_to_hermitian_planar()580 void normal_1D_out_of_place_real_to_hermitian_planar()
581 {
582 std::vector<size_t> lengths;
583 lengths.push_back(normal7);
584 size_t batch = 1;
585 std::vector<size_t> input_strides;
586 std::vector<size_t> output_strides;
587 size_t input_distance = 0;
588 size_t output_distance = 0;
589 layout::buffer_layout_t layout = layout::hermitian_planar;
590 placeness::placeness_t placeness = placeness::out_of_place;
591
592 data_pattern pattern = sawtooth;
593 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
594 }
595
TEST_F(accuracy_test_pow7_single,normal_1D_out_of_place_real_to_hermitian_planar)596 TEST_F(accuracy_test_pow7_single, normal_1D_out_of_place_real_to_hermitian_planar)
597 {
598 try { normal_1D_out_of_place_real_to_hermitian_planar< float, cl_float, fftwf_complex >(); }
599 catch (const std::exception& err) { handle_exception(err); }
600 }
601
TEST_F(accuracy_test_pow7_double,normal_1D_out_of_place_real_to_hermitian_planar)602 TEST_F(accuracy_test_pow7_double, normal_1D_out_of_place_real_to_hermitian_planar)
603 {
604 try { normal_1D_out_of_place_real_to_hermitian_planar< double, cl_double, fftw_complex >(); }
605 catch (const std::exception& err) { handle_exception(err); }
606 }
607
608 // *****************************************************
609 // *****************************************************
610 template< class T, class cl_T, class fftw_T >
normal_1D_out_of_place_hermitian_planar_to_real()611 void normal_1D_out_of_place_hermitian_planar_to_real()
612 {
613 std::vector<size_t> lengths;
614 lengths.push_back(normal7);
615 size_t batch = 1;
616 std::vector<size_t> input_strides;
617 std::vector<size_t> output_strides;
618 size_t input_distance = 0;
619 size_t output_distance = 0;
620 layout::buffer_layout_t layout = layout::hermitian_planar;
621 placeness::placeness_t placeness = placeness::out_of_place;
622
623 data_pattern pattern = sawtooth;
624 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
625 }
626
TEST_F(accuracy_test_pow7_single,normal_1D_out_of_place_hermitian_planar_to_real)627 TEST_F(accuracy_test_pow7_single, normal_1D_out_of_place_hermitian_planar_to_real)
628 {
629 try { normal_1D_out_of_place_hermitian_planar_to_real< float, cl_float, fftwf_complex >(); }
630 catch (const std::exception& err) { handle_exception(err); }
631 }
632
TEST_F(accuracy_test_pow7_double,normal_1D_out_of_place_hermitian_planar_to_real)633 TEST_F(accuracy_test_pow7_double, normal_1D_out_of_place_hermitian_planar_to_real)
634 {
635 try { normal_1D_out_of_place_hermitian_planar_to_real< double, cl_double, fftw_complex >(); }
636 catch (const std::exception& err) { handle_exception(err); }
637 }
638
639 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
640 // ^^^^^^^^^^^^^^^^^^^^^^^ small 1D ^^^^^^^^^^^^^^^^^^^^^^^ //
641 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
642
643 // *****************************************************
644 // *****************************************************
645 template< class T, class cl_T, class fftw_T >
small_1D_forward_in_place_complex_planar_to_complex_planar()646 void small_1D_forward_in_place_complex_planar_to_complex_planar()
647 {
648 std::vector<size_t> lengths;
649 lengths.push_back(small7);
650 size_t batch = 1;
651 std::vector<size_t> input_strides;
652 std::vector<size_t> output_strides;
653 size_t input_distance = 0;
654 size_t output_distance = 0;
655 layout::buffer_layout_t in_layout = layout::complex_planar;
656 layout::buffer_layout_t out_layout = layout::complex_planar;
657 placeness::placeness_t placeness = placeness::in_place;
658 direction::direction_t direction = direction::forward;
659
660 data_pattern pattern = sawtooth;
661 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
662 }
663
TEST_F(accuracy_test_pow7_single,small_1D_forward_in_place_complex_planar_to_complex_planar)664 TEST_F(accuracy_test_pow7_single, small_1D_forward_in_place_complex_planar_to_complex_planar)
665 {
666 try { small_1D_forward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
667 catch (const std::exception& err) { handle_exception(err); }
668 }
669
TEST_F(accuracy_test_pow7_double,small_1D_forward_in_place_complex_planar_to_complex_planar)670 TEST_F(accuracy_test_pow7_double, small_1D_forward_in_place_complex_planar_to_complex_planar)
671 {
672 try { small_1D_forward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
673 catch (const std::exception& err) { handle_exception(err); }
674 }
675
676 // *****************************************************
677 // *****************************************************
678 template< class T, class cl_T, class fftw_T >
small_1D_backward_in_place_complex_planar_to_complex_planar()679 void small_1D_backward_in_place_complex_planar_to_complex_planar()
680 {
681 std::vector<size_t> lengths;
682 lengths.push_back(small7);
683 size_t batch = 1;
684 std::vector<size_t> input_strides;
685 std::vector<size_t> output_strides;
686 size_t input_distance = 0;
687 size_t output_distance = 0;
688 layout::buffer_layout_t in_layout = layout::complex_planar;
689 layout::buffer_layout_t out_layout = layout::complex_planar;
690 placeness::placeness_t placeness = placeness::in_place;
691 direction::direction_t direction = direction::backward;
692
693 data_pattern pattern = sawtooth;
694 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
695 }
696
TEST_F(accuracy_test_pow7_single,small_1D_backward_in_place_complex_planar_to_complex_planar)697 TEST_F(accuracy_test_pow7_single, small_1D_backward_in_place_complex_planar_to_complex_planar)
698 {
699 try { small_1D_backward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
700 catch (const std::exception& err) { handle_exception(err); }
701 }
702
TEST_F(accuracy_test_pow7_double,small_1D_backward_in_place_complex_planar_to_complex_planar)703 TEST_F(accuracy_test_pow7_double, small_1D_backward_in_place_complex_planar_to_complex_planar)
704 {
705 try { small_1D_backward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
706 catch (const std::exception& err) { handle_exception(err); }
707 }
708
709 // *****************************************************
710 // *****************************************************
711 template< class T, class cl_T, class fftw_T >
small_1D_forward_in_place_complex_interleaved_to_complex_interleaved()712 void small_1D_forward_in_place_complex_interleaved_to_complex_interleaved()
713 {
714 std::vector<size_t> lengths;
715 lengths.push_back(small7);
716 size_t batch = 1;
717 std::vector<size_t> input_strides;
718 std::vector<size_t> output_strides;
719 size_t input_distance = 0;
720 size_t output_distance = 0;
721 layout::buffer_layout_t in_layout = layout::complex_interleaved;
722 layout::buffer_layout_t out_layout = layout::complex_interleaved;
723 placeness::placeness_t placeness = placeness::in_place;
724 direction::direction_t direction = direction::forward;
725
726 data_pattern pattern = sawtooth;
727 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
728 }
729
TEST_F(accuracy_test_pow7_single,small_1D_forward_in_place_complex_interleaved_to_complex_interleaved)730 TEST_F(accuracy_test_pow7_single, small_1D_forward_in_place_complex_interleaved_to_complex_interleaved)
731 {
732 try { small_1D_forward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
733 catch (const std::exception& err) { handle_exception(err); }
734 }
735
TEST_F(accuracy_test_pow7_double,small_1D_forward_in_place_complex_interleaved_to_complex_interleaved)736 TEST_F(accuracy_test_pow7_double, small_1D_forward_in_place_complex_interleaved_to_complex_interleaved)
737 {
738 try { small_1D_forward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
739 catch (const std::exception& err) { handle_exception(err); }
740 }
741
742 // *****************************************************
743 // *****************************************************
744 template< class T, class cl_T, class fftw_T >
small_1D_backward_in_place_complex_interleaved_to_complex_interleaved()745 void small_1D_backward_in_place_complex_interleaved_to_complex_interleaved()
746 {
747 std::vector<size_t> lengths;
748 lengths.push_back(small7);
749 size_t batch = 1;
750 std::vector<size_t> input_strides;
751 std::vector<size_t> output_strides;
752 size_t input_distance = 0;
753 size_t output_distance = 0;
754 layout::buffer_layout_t in_layout = layout::complex_interleaved;
755 layout::buffer_layout_t out_layout = layout::complex_interleaved;
756 placeness::placeness_t placeness = placeness::in_place;
757 direction::direction_t direction = direction::backward;
758
759 data_pattern pattern = sawtooth;
760 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
761 }
762
TEST_F(accuracy_test_pow7_single,small_1D_backward_in_place_complex_interleaved_to_complex_interleaved)763 TEST_F(accuracy_test_pow7_single, small_1D_backward_in_place_complex_interleaved_to_complex_interleaved)
764 {
765 try { small_1D_backward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
766 catch (const std::exception& err) { handle_exception(err); }
767 }
768
TEST_F(accuracy_test_pow7_double,small_1D_backward_in_place_complex_interleaved_to_complex_interleaved)769 TEST_F(accuracy_test_pow7_double, small_1D_backward_in_place_complex_interleaved_to_complex_interleaved)
770 {
771 try { small_1D_backward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
772 catch (const std::exception& err) { handle_exception(err); }
773 }
774
775 // *****************************************************
776 // *****************************************************
777 template< class T, class cl_T, class fftw_T >
small_1D_forward_out_of_place_complex_planar_to_complex_planar()778 void small_1D_forward_out_of_place_complex_planar_to_complex_planar()
779 {
780 std::vector<size_t> lengths;
781 lengths.push_back(small7);
782 size_t batch = 1;
783 std::vector<size_t> input_strides;
784 std::vector<size_t> output_strides;
785 size_t input_distance = 0;
786 size_t output_distance = 0;
787 layout::buffer_layout_t in_layout = layout::complex_planar;
788 layout::buffer_layout_t out_layout = layout::complex_planar;
789 placeness::placeness_t placeness = placeness::out_of_place;
790 direction::direction_t direction = direction::forward;
791
792 data_pattern pattern = sawtooth;
793 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
794 }
795
TEST_F(accuracy_test_pow7_single,small_1D_forward_out_of_place_complex_planar_to_complex_planar)796 TEST_F(accuracy_test_pow7_single, small_1D_forward_out_of_place_complex_planar_to_complex_planar)
797 {
798 try { small_1D_forward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
799 catch (const std::exception& err) { handle_exception(err); }
800 }
801
TEST_F(accuracy_test_pow7_double,small_1D_forward_out_of_place_complex_planar_to_complex_planar)802 TEST_F(accuracy_test_pow7_double, small_1D_forward_out_of_place_complex_planar_to_complex_planar)
803 {
804 try { small_1D_forward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
805 catch (const std::exception& err) { handle_exception(err); }
806 }
807
808 // *****************************************************
809 // *****************************************************
810 template< class T, class cl_T, class fftw_T >
small_1D_backward_out_of_place_complex_planar_to_complex_planar()811 void small_1D_backward_out_of_place_complex_planar_to_complex_planar()
812 {
813 std::vector<size_t> lengths;
814 lengths.push_back(small7);
815 size_t batch = 1;
816 std::vector<size_t> input_strides;
817 std::vector<size_t> output_strides;
818 size_t input_distance = 0;
819 size_t output_distance = 0;
820 layout::buffer_layout_t in_layout = layout::complex_planar;
821 layout::buffer_layout_t out_layout = layout::complex_planar;
822 placeness::placeness_t placeness = placeness::out_of_place;
823 direction::direction_t direction = direction::backward;
824
825 data_pattern pattern = sawtooth;
826 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
827 }
828
TEST_F(accuracy_test_pow7_single,small_1D_backward_out_of_place_complex_planar_to_complex_planar)829 TEST_F(accuracy_test_pow7_single, small_1D_backward_out_of_place_complex_planar_to_complex_planar)
830 {
831 try { small_1D_backward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
832 catch (const std::exception& err) { handle_exception(err); }
833 }
834
TEST_F(accuracy_test_pow7_double,small_1D_backward_out_of_place_complex_planar_to_complex_planar)835 TEST_F(accuracy_test_pow7_double, small_1D_backward_out_of_place_complex_planar_to_complex_planar)
836 {
837 try { small_1D_backward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
838 catch (const std::exception& err) { handle_exception(err); }
839 }
840
841 // *****************************************************
842 // *****************************************************
843 template< class T, class cl_T, class fftw_T >
small_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved()844 void small_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved()
845 {
846 std::vector<size_t> lengths;
847 lengths.push_back(small7);
848 size_t batch = 1;
849 std::vector<size_t> input_strides;
850 std::vector<size_t> output_strides;
851 size_t input_distance = 0;
852 size_t output_distance = 0;
853 layout::buffer_layout_t in_layout = layout::complex_interleaved;
854 layout::buffer_layout_t out_layout = layout::complex_interleaved;
855 placeness::placeness_t placeness = placeness::out_of_place;
856 direction::direction_t direction = direction::forward;
857
858 data_pattern pattern = sawtooth;
859 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
860 }
861
TEST_F(accuracy_test_pow7_single,small_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved)862 TEST_F(accuracy_test_pow7_single, small_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
863 {
864 try { small_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
865 catch (const std::exception& err) { handle_exception(err); }
866 }
867
TEST_F(accuracy_test_pow7_double,small_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved)868 TEST_F(accuracy_test_pow7_double, small_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
869 {
870 try { small_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
871 catch (const std::exception& err) { handle_exception(err); }
872 }
873
874 // *****************************************************
875 // *****************************************************
876 template< class T, class cl_T, class fftw_T >
small_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved()877 void small_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved()
878 {
879 std::vector<size_t> lengths;
880 lengths.push_back(small7);
881 size_t batch = 1;
882 std::vector<size_t> input_strides;
883 std::vector<size_t> output_strides;
884 size_t input_distance = 0;
885 size_t output_distance = 0;
886 layout::buffer_layout_t in_layout = layout::complex_interleaved;
887 layout::buffer_layout_t out_layout = layout::complex_interleaved;
888 placeness::placeness_t placeness = placeness::out_of_place;
889 direction::direction_t direction = direction::backward;
890
891 data_pattern pattern = sawtooth;
892 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
893 }
894
TEST_F(accuracy_test_pow7_single,small_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved)895 TEST_F(accuracy_test_pow7_single, small_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
896 {
897 try { small_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
898 catch (const std::exception& err) { handle_exception(err); }
899 }
900
TEST_F(accuracy_test_pow7_double,small_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved)901 TEST_F(accuracy_test_pow7_double, small_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
902 {
903 try { small_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
904 catch (const std::exception& err) { handle_exception(err); }
905 }
906
907 // *****************************************************
908 // *****************************************************
909 template< class T, class cl_T, class fftw_T >
small_1D_forward_out_of_place_complex_planar_to_complex_interleaved()910 void small_1D_forward_out_of_place_complex_planar_to_complex_interleaved()
911 {
912 std::vector<size_t> lengths;
913 lengths.push_back(small7);
914 size_t batch = 1;
915 std::vector<size_t> input_strides;
916 std::vector<size_t> output_strides;
917 size_t input_distance = 0;
918 size_t output_distance = 0;
919 layout::buffer_layout_t in_layout = layout::complex_planar;
920 layout::buffer_layout_t out_layout = layout::complex_interleaved;
921 placeness::placeness_t placeness = placeness::out_of_place;
922 direction::direction_t direction = direction::forward;
923
924 data_pattern pattern = sawtooth;
925 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
926 }
927
TEST_F(accuracy_test_pow7_single,small_1D_forward_out_of_place_complex_planar_to_complex_interleaved)928 TEST_F(accuracy_test_pow7_single, small_1D_forward_out_of_place_complex_planar_to_complex_interleaved)
929 {
930 try { small_1D_forward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
931 catch (const std::exception& err) { handle_exception(err); }
932 }
933
TEST_F(accuracy_test_pow7_double,small_1D_forward_out_of_place_complex_planar_to_complex_interleaved)934 TEST_F(accuracy_test_pow7_double, small_1D_forward_out_of_place_complex_planar_to_complex_interleaved)
935 {
936 try { small_1D_forward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
937 catch (const std::exception& err) { handle_exception(err); }
938 }
939
940 // *****************************************************
941 // *****************************************************
942 template< class T, class cl_T, class fftw_T >
small_1D_backward_out_of_place_complex_planar_to_complex_interleaved()943 void small_1D_backward_out_of_place_complex_planar_to_complex_interleaved()
944 {
945 std::vector<size_t> lengths;
946 lengths.push_back(small7);
947 size_t batch = 1;
948 std::vector<size_t> input_strides;
949 std::vector<size_t> output_strides;
950 size_t input_distance = 0;
951 size_t output_distance = 0;
952 layout::buffer_layout_t in_layout = layout::complex_planar;
953 layout::buffer_layout_t out_layout = layout::complex_interleaved;
954 placeness::placeness_t placeness = placeness::out_of_place;
955 direction::direction_t direction = direction::backward;
956
957 data_pattern pattern = sawtooth;
958 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
959 }
960
TEST_F(accuracy_test_pow7_single,small_1D_backward_out_of_place_complex_planar_to_complex_interleaved)961 TEST_F(accuracy_test_pow7_single, small_1D_backward_out_of_place_complex_planar_to_complex_interleaved)
962 {
963 try { small_1D_backward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
964 catch (const std::exception& err) { handle_exception(err); }
965 }
966
TEST_F(accuracy_test_pow7_double,small_1D_backward_out_of_place_complex_planar_to_complex_interleaved)967 TEST_F(accuracy_test_pow7_double, small_1D_backward_out_of_place_complex_planar_to_complex_interleaved)
968 {
969 try { small_1D_backward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
970 catch (const std::exception& err) { handle_exception(err); }
971 }
972
973 // *****************************************************
974 // *****************************************************
975 template< class T, class cl_T, class fftw_T >
small_1D_forward_out_of_place_complex_interleaved_to_complex_planar()976 void small_1D_forward_out_of_place_complex_interleaved_to_complex_planar()
977 {
978 std::vector<size_t> lengths;
979 lengths.push_back(small7);
980 size_t batch = 1;
981 std::vector<size_t> input_strides;
982 std::vector<size_t> output_strides;
983 size_t input_distance = 0;
984 size_t output_distance = 0;
985 layout::buffer_layout_t in_layout = layout::complex_interleaved;
986 layout::buffer_layout_t out_layout = layout::complex_planar;
987 placeness::placeness_t placeness = placeness::out_of_place;
988 direction::direction_t direction = direction::forward;
989
990 data_pattern pattern = sawtooth;
991 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
992 }
993
TEST_F(accuracy_test_pow7_single,small_1D_forward_out_of_place_complex_interleaved_to_complex_planar)994 TEST_F(accuracy_test_pow7_single, small_1D_forward_out_of_place_complex_interleaved_to_complex_planar)
995 {
996 try { small_1D_forward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
997 catch (const std::exception& err) { handle_exception(err); }
998 }
999
TEST_F(accuracy_test_pow7_double,small_1D_forward_out_of_place_complex_interleaved_to_complex_planar)1000 TEST_F(accuracy_test_pow7_double, small_1D_forward_out_of_place_complex_interleaved_to_complex_planar)
1001 {
1002 try { small_1D_forward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
1003 catch (const std::exception& err) { handle_exception(err); }
1004 }
1005
1006 // *****************************************************
1007 // *****************************************************
1008 template< class T, class cl_T, class fftw_T >
small_1D_backward_out_of_place_complex_interleaved_to_complex_planar()1009 void small_1D_backward_out_of_place_complex_interleaved_to_complex_planar()
1010 {
1011 std::vector<size_t> lengths;
1012 lengths.push_back(small7);
1013 size_t batch = 1;
1014 std::vector<size_t> input_strides;
1015 std::vector<size_t> output_strides;
1016 size_t input_distance = 0;
1017 size_t output_distance = 0;
1018 layout::buffer_layout_t in_layout = layout::complex_interleaved;
1019 layout::buffer_layout_t out_layout = layout::complex_planar;
1020 placeness::placeness_t placeness = placeness::out_of_place;
1021 direction::direction_t direction = direction::backward;
1022
1023 data_pattern pattern = sawtooth;
1024 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1025 }
1026
TEST_F(accuracy_test_pow7_single,small_1D_backward_out_of_place_complex_interleaved_to_complex_planar)1027 TEST_F(accuracy_test_pow7_single, small_1D_backward_out_of_place_complex_interleaved_to_complex_planar)
1028 {
1029 try { small_1D_backward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
1030 catch (const std::exception& err) { handle_exception(err); }
1031 }
1032
TEST_F(accuracy_test_pow7_double,small_1D_backward_out_of_place_complex_interleaved_to_complex_planar)1033 TEST_F(accuracy_test_pow7_double, small_1D_backward_out_of_place_complex_interleaved_to_complex_planar)
1034 {
1035 try { small_1D_backward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
1036 catch (const std::exception& err) { handle_exception(err); }
1037 }
1038
1039 // *****************************************************
1040 // *****************************************************
1041 template< class T, class cl_T, class fftw_T >
small_1D_in_place_real_to_hermitian_interleaved()1042 void small_1D_in_place_real_to_hermitian_interleaved()
1043 {
1044 std::vector<size_t> lengths;
1045 lengths.push_back(small7);
1046 size_t batch = 1;
1047 std::vector<size_t> input_strides;
1048 std::vector<size_t> output_strides;
1049 size_t input_distance = 0;
1050 size_t output_distance = 0;
1051 layout::buffer_layout_t layout = layout::hermitian_interleaved;
1052 placeness::placeness_t placeness = placeness::in_place;
1053
1054 data_pattern pattern = sawtooth;
1055 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
1056 }
1057
TEST_F(accuracy_test_pow7_single,small_1D_in_place_real_to_hermitian_interleaved)1058 TEST_F(accuracy_test_pow7_single, small_1D_in_place_real_to_hermitian_interleaved)
1059 {
1060 try { small_1D_in_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
1061 catch (const std::exception& err) { handle_exception(err); }
1062 }
1063
TEST_F(accuracy_test_pow7_double,small_1D_in_place_real_to_hermitian_interleaved)1064 TEST_F(accuracy_test_pow7_double, small_1D_in_place_real_to_hermitian_interleaved)
1065 {
1066 try { small_1D_in_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
1067 catch (const std::exception& err) { handle_exception(err); }
1068 }
1069
1070 // *****************************************************
1071 // *****************************************************
1072 template< class T, class cl_T, class fftw_T >
small_1D_in_place_hermitian_interleaved_to_real()1073 void small_1D_in_place_hermitian_interleaved_to_real()
1074 {
1075 std::vector<size_t> lengths;
1076 lengths.push_back(small7);
1077 size_t batch = 1;
1078 std::vector<size_t> input_strides;
1079 std::vector<size_t> output_strides;
1080 size_t input_distance = 0;
1081 size_t output_distance = 0;
1082 layout::buffer_layout_t layout = layout::hermitian_interleaved;
1083 placeness::placeness_t placeness = placeness::in_place;
1084
1085 data_pattern pattern = sawtooth;
1086 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
1087 }
1088
TEST_F(accuracy_test_pow7_single,small_1D_in_place_hermitian_interleaved_to_real)1089 TEST_F(accuracy_test_pow7_single, small_1D_in_place_hermitian_interleaved_to_real)
1090 {
1091 try { small_1D_in_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
1092 catch (const std::exception& err) { handle_exception(err); }
1093 }
1094
TEST_F(accuracy_test_pow7_double,small_1D_in_place_hermitian_interleaved_to_real)1095 TEST_F(accuracy_test_pow7_double, small_1D_in_place_hermitian_interleaved_to_real)
1096 {
1097 try { small_1D_in_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
1098 catch (const std::exception& err) { handle_exception(err); }
1099 }
1100
1101 // *****************************************************
1102 // *****************************************************
1103 template< class T, class cl_T, class fftw_T >
small_1D_out_of_place_real_to_hermitian_interleaved()1104 void small_1D_out_of_place_real_to_hermitian_interleaved()
1105 {
1106 std::vector<size_t> lengths;
1107 lengths.push_back(small7);
1108 size_t batch = 1;
1109 std::vector<size_t> input_strides;
1110 std::vector<size_t> output_strides;
1111 size_t input_distance = 0;
1112 size_t output_distance = 0;
1113 layout::buffer_layout_t layout = layout::hermitian_interleaved;
1114 placeness::placeness_t placeness = placeness::out_of_place;
1115
1116 data_pattern pattern = sawtooth;
1117 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
1118 }
1119
TEST_F(accuracy_test_pow7_single,small_1D_out_of_place_real_to_hermitian_interleaved)1120 TEST_F(accuracy_test_pow7_single, small_1D_out_of_place_real_to_hermitian_interleaved)
1121 {
1122 try { small_1D_out_of_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
1123 catch (const std::exception& err) { handle_exception(err); }
1124 }
1125
TEST_F(accuracy_test_pow7_double,small_1D_out_of_place_real_to_hermitian_interleaved)1126 TEST_F(accuracy_test_pow7_double, small_1D_out_of_place_real_to_hermitian_interleaved)
1127 {
1128 try { small_1D_out_of_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
1129 catch (const std::exception& err) { handle_exception(err); }
1130 }
1131
1132 // *****************************************************
1133 // *****************************************************
1134 template< class T, class cl_T, class fftw_T >
small_1D_out_of_place_hermitian_interleaved_to_real()1135 void small_1D_out_of_place_hermitian_interleaved_to_real()
1136 {
1137 std::vector<size_t> lengths;
1138 lengths.push_back(small7);
1139 size_t batch = 1;
1140 std::vector<size_t> input_strides;
1141 std::vector<size_t> output_strides;
1142 size_t input_distance = 0;
1143 size_t output_distance = 0;
1144 layout::buffer_layout_t layout = layout::hermitian_interleaved;
1145 placeness::placeness_t placeness = placeness::out_of_place;
1146
1147 data_pattern pattern = sawtooth;
1148 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
1149 }
1150
TEST_F(accuracy_test_pow7_single,small_1D_out_of_place_hermitian_interleaved_to_real)1151 TEST_F(accuracy_test_pow7_single, small_1D_out_of_place_hermitian_interleaved_to_real)
1152 {
1153 try { small_1D_out_of_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
1154 catch (const std::exception& err) { handle_exception(err); }
1155 }
1156
TEST_F(accuracy_test_pow7_double,small_1D_out_of_place_hermitian_interleaved_to_real)1157 TEST_F(accuracy_test_pow7_double, small_1D_out_of_place_hermitian_interleaved_to_real)
1158 {
1159 try { small_1D_out_of_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
1160 catch (const std::exception& err) { handle_exception(err); }
1161 }
1162
1163 // *****************************************************
1164 // *****************************************************
1165 template< class T, class cl_T, class fftw_T >
small_1D_out_of_place_real_to_hermitian_planar()1166 void small_1D_out_of_place_real_to_hermitian_planar()
1167 {
1168 std::vector<size_t> lengths;
1169 lengths.push_back(small7);
1170 size_t batch = 1;
1171 std::vector<size_t> input_strides;
1172 std::vector<size_t> output_strides;
1173 size_t input_distance = 0;
1174 size_t output_distance = 0;
1175 layout::buffer_layout_t layout = layout::hermitian_planar;
1176 placeness::placeness_t placeness = placeness::out_of_place;
1177
1178 data_pattern pattern = sawtooth;
1179 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
1180 }
1181
TEST_F(accuracy_test_pow7_single,small_1D_out_of_place_real_to_hermitian_planar)1182 TEST_F(accuracy_test_pow7_single, small_1D_out_of_place_real_to_hermitian_planar)
1183 {
1184 try { small_1D_out_of_place_real_to_hermitian_planar< float, cl_float, fftwf_complex >(); }
1185 catch (const std::exception& err) { handle_exception(err); }
1186 }
1187
TEST_F(accuracy_test_pow7_double,small_1D_out_of_place_real_to_hermitian_planar)1188 TEST_F(accuracy_test_pow7_double, small_1D_out_of_place_real_to_hermitian_planar)
1189 {
1190 try { small_1D_out_of_place_real_to_hermitian_planar< double, cl_double, fftw_complex >(); }
1191 catch (const std::exception& err) { handle_exception(err); }
1192 }
1193
1194 // *****************************************************
1195 // *****************************************************
1196 template< class T, class cl_T, class fftw_T >
small_1D_out_of_place_hermitian_planar_to_real()1197 void small_1D_out_of_place_hermitian_planar_to_real()
1198 {
1199 std::vector<size_t> lengths;
1200 lengths.push_back(small7);
1201 size_t batch = 1;
1202 std::vector<size_t> input_strides;
1203 std::vector<size_t> output_strides;
1204 size_t input_distance = 0;
1205 size_t output_distance = 0;
1206 layout::buffer_layout_t layout = layout::hermitian_planar;
1207 placeness::placeness_t placeness = placeness::out_of_place;
1208
1209 data_pattern pattern = sawtooth;
1210 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
1211 }
1212
TEST_F(accuracy_test_pow7_single,small_1D_out_of_place_hermitian_planar_to_real)1213 TEST_F(accuracy_test_pow7_single, small_1D_out_of_place_hermitian_planar_to_real)
1214 {
1215 try { small_1D_out_of_place_hermitian_planar_to_real< float, cl_float, fftwf_complex >(); }
1216 catch (const std::exception& err) { handle_exception(err); }
1217 }
1218
TEST_F(accuracy_test_pow7_double,small_1D_out_of_place_hermitian_planar_to_real)1219 TEST_F(accuracy_test_pow7_double, small_1D_out_of_place_hermitian_planar_to_real)
1220 {
1221 try { small_1D_out_of_place_hermitian_planar_to_real< double, cl_double, fftw_complex >(); }
1222 catch (const std::exception& err) { handle_exception(err); }
1223 }
1224
1225 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
1226 // ^^^^^^^^^^^^^^^^^^^^^^^ large 1D ^^^^^^^^^^^^^^^^^^^^^^^ //
1227 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
1228
1229 // *****************************************************
1230 // *****************************************************
1231 template< class T, class cl_T, class fftw_T >
large_1D_forward_in_place_complex_planar_to_complex_planar()1232 void large_1D_forward_in_place_complex_planar_to_complex_planar()
1233 {
1234 std::vector<size_t> lengths;
1235 lengths.push_back(large7);
1236 size_t batch = 1;
1237 std::vector<size_t> input_strides;
1238 std::vector<size_t> output_strides;
1239 size_t input_distance = 0;
1240 size_t output_distance = 0;
1241 layout::buffer_layout_t in_layout = layout::complex_planar;
1242 layout::buffer_layout_t out_layout = layout::complex_planar;
1243 placeness::placeness_t placeness = placeness::in_place;
1244 direction::direction_t direction = direction::forward;
1245
1246 data_pattern pattern = sawtooth;
1247 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1248 }
1249
TEST_F(accuracy_test_pow7_single,large_1D_forward_in_place_complex_planar_to_complex_planar)1250 TEST_F(accuracy_test_pow7_single, large_1D_forward_in_place_complex_planar_to_complex_planar)
1251 {
1252 try { large_1D_forward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
1253 catch (const std::exception& err) { handle_exception(err); }
1254 }
1255
TEST_F(accuracy_test_pow7_double,large_1D_forward_in_place_complex_planar_to_complex_planar)1256 TEST_F(accuracy_test_pow7_double, large_1D_forward_in_place_complex_planar_to_complex_planar)
1257 {
1258 try { large_1D_forward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
1259 catch (const std::exception& err) { handle_exception(err); }
1260 }
1261
1262 // *****************************************************
1263 // *****************************************************
1264 template< class T, class cl_T, class fftw_T >
large_1D_backward_in_place_complex_planar_to_complex_planar()1265 void large_1D_backward_in_place_complex_planar_to_complex_planar()
1266 {
1267 std::vector<size_t> lengths;
1268 lengths.push_back(large7);
1269 size_t batch = 1;
1270 std::vector<size_t> input_strides;
1271 std::vector<size_t> output_strides;
1272 size_t input_distance = 0;
1273 size_t output_distance = 0;
1274 layout::buffer_layout_t in_layout = layout::complex_planar;
1275 layout::buffer_layout_t out_layout = layout::complex_planar;
1276 placeness::placeness_t placeness = placeness::in_place;
1277 direction::direction_t direction = direction::backward;
1278
1279 data_pattern pattern = sawtooth;
1280 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1281 }
1282
TEST_F(accuracy_test_pow7_single,large_1D_backward_in_place_complex_planar_to_complex_planar)1283 TEST_F(accuracy_test_pow7_single, large_1D_backward_in_place_complex_planar_to_complex_planar)
1284 {
1285 try { large_1D_backward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
1286 catch (const std::exception& err) { handle_exception(err); }
1287 }
1288
TEST_F(accuracy_test_pow7_double,large_1D_backward_in_place_complex_planar_to_complex_planar)1289 TEST_F(accuracy_test_pow7_double, large_1D_backward_in_place_complex_planar_to_complex_planar)
1290 {
1291 try { large_1D_backward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
1292 catch (const std::exception& err) { handle_exception(err); }
1293 }
1294
1295 // *****************************************************
1296 // *****************************************************
1297 template< class T, class cl_T, class fftw_T >
large_1D_forward_in_place_complex_interleaved_to_complex_interleaved()1298 void large_1D_forward_in_place_complex_interleaved_to_complex_interleaved()
1299 {
1300 std::vector<size_t> lengths;
1301 lengths.push_back(large7);
1302 size_t batch = 1;
1303 std::vector<size_t> input_strides;
1304 std::vector<size_t> output_strides;
1305 size_t input_distance = 0;
1306 size_t output_distance = 0;
1307 layout::buffer_layout_t in_layout = layout::complex_interleaved;
1308 layout::buffer_layout_t out_layout = layout::complex_interleaved;
1309 placeness::placeness_t placeness = placeness::in_place;
1310 direction::direction_t direction = direction::forward;
1311
1312 data_pattern pattern = sawtooth;
1313 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1314 }
1315
TEST_F(accuracy_test_pow7_single,large_1D_forward_in_place_complex_interleaved_to_complex_interleaved)1316 TEST_F(accuracy_test_pow7_single, large_1D_forward_in_place_complex_interleaved_to_complex_interleaved)
1317 {
1318 try { large_1D_forward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
1319 catch (const std::exception& err) { handle_exception(err); }
1320 }
1321
TEST_F(accuracy_test_pow7_double,large_1D_forward_in_place_complex_interleaved_to_complex_interleaved)1322 TEST_F(accuracy_test_pow7_double, large_1D_forward_in_place_complex_interleaved_to_complex_interleaved)
1323 {
1324 try { large_1D_forward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
1325 catch (const std::exception& err) { handle_exception(err); }
1326 }
1327
1328 // *****************************************************
1329 // *****************************************************
1330 template< class T, class cl_T, class fftw_T >
large_1D_backward_in_place_complex_interleaved_to_complex_interleaved()1331 void large_1D_backward_in_place_complex_interleaved_to_complex_interleaved()
1332 {
1333 std::vector<size_t> lengths;
1334 lengths.push_back(large7);
1335 size_t batch = 1;
1336 std::vector<size_t> input_strides;
1337 std::vector<size_t> output_strides;
1338 size_t input_distance = 0;
1339 size_t output_distance = 0;
1340 layout::buffer_layout_t in_layout = layout::complex_interleaved;
1341 layout::buffer_layout_t out_layout = layout::complex_interleaved;
1342 placeness::placeness_t placeness = placeness::in_place;
1343 direction::direction_t direction = direction::backward;
1344
1345 data_pattern pattern = sawtooth;
1346 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1347 }
1348
TEST_F(accuracy_test_pow7_single,large_1D_backward_in_place_complex_interleaved_to_complex_interleaved)1349 TEST_F(accuracy_test_pow7_single, large_1D_backward_in_place_complex_interleaved_to_complex_interleaved)
1350 {
1351 try { large_1D_backward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
1352 catch (const std::exception& err) { handle_exception(err); }
1353 }
1354
TEST_F(accuracy_test_pow7_double,large_1D_backward_in_place_complex_interleaved_to_complex_interleaved)1355 TEST_F(accuracy_test_pow7_double, large_1D_backward_in_place_complex_interleaved_to_complex_interleaved)
1356 {
1357 try { large_1D_backward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
1358 catch (const std::exception& err) { handle_exception(err); }
1359 }
1360
1361 // *****************************************************
1362 // *****************************************************
1363 template< class T, class cl_T, class fftw_T >
large_1D_forward_out_of_place_complex_planar_to_complex_planar()1364 void large_1D_forward_out_of_place_complex_planar_to_complex_planar()
1365 {
1366 std::vector<size_t> lengths;
1367 lengths.push_back(large7);
1368 size_t batch = 1;
1369 std::vector<size_t> input_strides;
1370 std::vector<size_t> output_strides;
1371 size_t input_distance = 0;
1372 size_t output_distance = 0;
1373 layout::buffer_layout_t in_layout = layout::complex_planar;
1374 layout::buffer_layout_t out_layout = layout::complex_planar;
1375 placeness::placeness_t placeness = placeness::out_of_place;
1376 direction::direction_t direction = direction::forward;
1377
1378 data_pattern pattern = sawtooth;
1379 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1380 }
1381
TEST_F(accuracy_test_pow7_single,large_1D_forward_out_of_place_complex_planar_to_complex_planar)1382 TEST_F(accuracy_test_pow7_single, large_1D_forward_out_of_place_complex_planar_to_complex_planar)
1383 {
1384 try { large_1D_forward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
1385 catch (const std::exception& err) { handle_exception(err); }
1386 }
1387
TEST_F(accuracy_test_pow7_double,large_1D_forward_out_of_place_complex_planar_to_complex_planar)1388 TEST_F(accuracy_test_pow7_double, large_1D_forward_out_of_place_complex_planar_to_complex_planar)
1389 {
1390 try { large_1D_forward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
1391 catch (const std::exception& err) { handle_exception(err); }
1392 }
1393
1394 // *****************************************************
1395 // *****************************************************
1396 template< class T, class cl_T, class fftw_T >
large_1D_backward_out_of_place_complex_planar_to_complex_planar()1397 void large_1D_backward_out_of_place_complex_planar_to_complex_planar()
1398 {
1399 std::vector<size_t> lengths;
1400 lengths.push_back(large7);
1401 size_t batch = 1;
1402 std::vector<size_t> input_strides;
1403 std::vector<size_t> output_strides;
1404 size_t input_distance = 0;
1405 size_t output_distance = 0;
1406 layout::buffer_layout_t in_layout = layout::complex_planar;
1407 layout::buffer_layout_t out_layout = layout::complex_planar;
1408 placeness::placeness_t placeness = placeness::out_of_place;
1409 direction::direction_t direction = direction::backward;
1410
1411 data_pattern pattern = sawtooth;
1412 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1413 }
1414
TEST_F(accuracy_test_pow7_single,large_1D_backward_out_of_place_complex_planar_to_complex_planar)1415 TEST_F(accuracy_test_pow7_single, large_1D_backward_out_of_place_complex_planar_to_complex_planar)
1416 {
1417 try { large_1D_backward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
1418 catch (const std::exception& err) { handle_exception(err); }
1419 }
1420
TEST_F(accuracy_test_pow7_double,large_1D_backward_out_of_place_complex_planar_to_complex_planar)1421 TEST_F(accuracy_test_pow7_double, large_1D_backward_out_of_place_complex_planar_to_complex_planar)
1422 {
1423 try { large_1D_backward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
1424 catch (const std::exception& err) { handle_exception(err); }
1425 }
1426
1427 // *****************************************************
1428 // *****************************************************
1429 template< class T, class cl_T, class fftw_T >
large_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved()1430 void large_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved()
1431 {
1432 std::vector<size_t> lengths;
1433 lengths.push_back(large7);
1434 size_t batch = 1;
1435 std::vector<size_t> input_strides;
1436 std::vector<size_t> output_strides;
1437 size_t input_distance = 0;
1438 size_t output_distance = 0;
1439 layout::buffer_layout_t in_layout = layout::complex_interleaved;
1440 layout::buffer_layout_t out_layout = layout::complex_interleaved;
1441 placeness::placeness_t placeness = placeness::out_of_place;
1442 direction::direction_t direction = direction::forward;
1443
1444 data_pattern pattern = sawtooth;
1445 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1446 }
1447
TEST_F(accuracy_test_pow7_single,large_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved)1448 TEST_F(accuracy_test_pow7_single, large_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
1449 {
1450 try { large_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
1451 catch (const std::exception& err) { handle_exception(err); }
1452 }
1453
TEST_F(accuracy_test_pow7_double,large_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved)1454 TEST_F(accuracy_test_pow7_double, large_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
1455 {
1456 try { large_1D_forward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
1457 catch (const std::exception& err) { handle_exception(err); }
1458 }
1459
1460 // *****************************************************
1461 // *****************************************************
1462 template< class T, class cl_T, class fftw_T >
large_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved()1463 void large_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved()
1464 {
1465 std::vector<size_t> lengths;
1466 lengths.push_back(large7);
1467 size_t batch = 1;
1468 std::vector<size_t> input_strides;
1469 std::vector<size_t> output_strides;
1470 size_t input_distance = 0;
1471 size_t output_distance = 0;
1472 layout::buffer_layout_t in_layout = layout::complex_interleaved;
1473 layout::buffer_layout_t out_layout = layout::complex_interleaved;
1474 placeness::placeness_t placeness = placeness::out_of_place;
1475 direction::direction_t direction = direction::backward;
1476
1477 data_pattern pattern = sawtooth;
1478 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1479 }
1480
TEST_F(accuracy_test_pow7_single,large_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved)1481 TEST_F(accuracy_test_pow7_single, large_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
1482 {
1483 try { large_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
1484 catch (const std::exception& err) { handle_exception(err); }
1485 }
1486
TEST_F(accuracy_test_pow7_double,large_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved)1487 TEST_F(accuracy_test_pow7_double, large_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
1488 {
1489 try { large_1D_backward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
1490 catch (const std::exception& err) { handle_exception(err); }
1491 }
1492
1493 // *****************************************************
1494 // *****************************************************
1495 template< class T, class cl_T, class fftw_T >
large_1D_forward_out_of_place_complex_planar_to_complex_interleaved()1496 void large_1D_forward_out_of_place_complex_planar_to_complex_interleaved()
1497 {
1498 std::vector<size_t> lengths;
1499 lengths.push_back(large7);
1500 size_t batch = 1;
1501 std::vector<size_t> input_strides;
1502 std::vector<size_t> output_strides;
1503 size_t input_distance = 0;
1504 size_t output_distance = 0;
1505 layout::buffer_layout_t in_layout = layout::complex_planar;
1506 layout::buffer_layout_t out_layout = layout::complex_interleaved;
1507 placeness::placeness_t placeness = placeness::out_of_place;
1508 direction::direction_t direction = direction::forward;
1509
1510 data_pattern pattern = sawtooth;
1511 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1512 }
1513
TEST_F(accuracy_test_pow7_single,large_1D_forward_out_of_place_complex_planar_to_complex_interleaved)1514 TEST_F(accuracy_test_pow7_single, large_1D_forward_out_of_place_complex_planar_to_complex_interleaved)
1515 {
1516 try { large_1D_forward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
1517 catch (const std::exception& err) { handle_exception(err); }
1518 }
1519
TEST_F(accuracy_test_pow7_double,large_1D_forward_out_of_place_complex_planar_to_complex_interleaved)1520 TEST_F(accuracy_test_pow7_double, large_1D_forward_out_of_place_complex_planar_to_complex_interleaved)
1521 {
1522 try { large_1D_forward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
1523 catch (const std::exception& err) { handle_exception(err); }
1524 }
1525
1526 // *****************************************************
1527 // *****************************************************
1528 template< class T, class cl_T, class fftw_T >
large_1D_backward_out_of_place_complex_planar_to_complex_interleaved()1529 void large_1D_backward_out_of_place_complex_planar_to_complex_interleaved()
1530 {
1531 std::vector<size_t> lengths;
1532 lengths.push_back(large7);
1533 size_t batch = 1;
1534 std::vector<size_t> input_strides;
1535 std::vector<size_t> output_strides;
1536 size_t input_distance = 0;
1537 size_t output_distance = 0;
1538 layout::buffer_layout_t in_layout = layout::complex_planar;
1539 layout::buffer_layout_t out_layout = layout::complex_interleaved;
1540 placeness::placeness_t placeness = placeness::out_of_place;
1541 direction::direction_t direction = direction::backward;
1542
1543 data_pattern pattern = sawtooth;
1544 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1545 }
1546
TEST_F(accuracy_test_pow7_single,large_1D_backward_out_of_place_complex_planar_to_complex_interleaved)1547 TEST_F(accuracy_test_pow7_single, large_1D_backward_out_of_place_complex_planar_to_complex_interleaved)
1548 {
1549 try { large_1D_backward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
1550 catch (const std::exception& err) { handle_exception(err); }
1551 }
1552
TEST_F(accuracy_test_pow7_double,large_1D_backward_out_of_place_complex_planar_to_complex_interleaved)1553 TEST_F(accuracy_test_pow7_double, large_1D_backward_out_of_place_complex_planar_to_complex_interleaved)
1554 {
1555 try { large_1D_backward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
1556 catch (const std::exception& err) { handle_exception(err); }
1557 }
1558
1559 // *****************************************************
1560 // *****************************************************
1561 template< class T, class cl_T, class fftw_T >
large_1D_forward_out_of_place_complex_interleaved_to_complex_planar()1562 void large_1D_forward_out_of_place_complex_interleaved_to_complex_planar()
1563 {
1564 std::vector<size_t> lengths;
1565 lengths.push_back(large7);
1566 size_t batch = 1;
1567 std::vector<size_t> input_strides;
1568 std::vector<size_t> output_strides;
1569 size_t input_distance = 0;
1570 size_t output_distance = 0;
1571 layout::buffer_layout_t in_layout = layout::complex_interleaved;
1572 layout::buffer_layout_t out_layout = layout::complex_planar;
1573 placeness::placeness_t placeness = placeness::out_of_place;
1574 direction::direction_t direction = direction::forward;
1575
1576 data_pattern pattern = sawtooth;
1577 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1578 }
1579
TEST_F(accuracy_test_pow7_single,large_1D_forward_out_of_place_complex_interleaved_to_complex_planar)1580 TEST_F(accuracy_test_pow7_single, large_1D_forward_out_of_place_complex_interleaved_to_complex_planar)
1581 {
1582 try { large_1D_forward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
1583 catch (const std::exception& err) { handle_exception(err); }
1584 }
1585
TEST_F(accuracy_test_pow7_double,large_1D_forward_out_of_place_complex_interleaved_to_complex_planar)1586 TEST_F(accuracy_test_pow7_double, large_1D_forward_out_of_place_complex_interleaved_to_complex_planar)
1587 {
1588 try { large_1D_forward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
1589 catch (const std::exception& err) { handle_exception(err); }
1590 }
1591
1592 // *****************************************************
1593 // *****************************************************
1594 template< class T, class cl_T, class fftw_T >
large_1D_backward_out_of_place_complex_interleaved_to_complex_planar()1595 void large_1D_backward_out_of_place_complex_interleaved_to_complex_planar()
1596 {
1597 std::vector<size_t> lengths;
1598 lengths.push_back(large7);
1599 size_t batch = 1;
1600 std::vector<size_t> input_strides;
1601 std::vector<size_t> output_strides;
1602 size_t input_distance = 0;
1603 size_t output_distance = 0;
1604 layout::buffer_layout_t in_layout = layout::complex_interleaved;
1605 layout::buffer_layout_t out_layout = layout::complex_planar;
1606 placeness::placeness_t placeness = placeness::out_of_place;
1607 direction::direction_t direction = direction::backward;
1608
1609 data_pattern pattern = sawtooth;
1610 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1611 }
1612
TEST_F(accuracy_test_pow7_single,large_1D_backward_out_of_place_complex_interleaved_to_complex_planar)1613 TEST_F(accuracy_test_pow7_single, large_1D_backward_out_of_place_complex_interleaved_to_complex_planar)
1614 {
1615 try { large_1D_backward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
1616 catch (const std::exception& err) { handle_exception(err); }
1617 }
1618
TEST_F(accuracy_test_pow7_double,large_1D_backward_out_of_place_complex_interleaved_to_complex_planar)1619 TEST_F(accuracy_test_pow7_double, large_1D_backward_out_of_place_complex_interleaved_to_complex_planar)
1620 {
1621 try { large_1D_backward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
1622 catch (const std::exception& err) { handle_exception(err); }
1623 }
1624
1625 // *****************************************************
1626 // *****************************************************
1627 template< class T, class cl_T, class fftw_T >
large_1D_in_place_real_to_hermitian_interleaved()1628 void large_1D_in_place_real_to_hermitian_interleaved()
1629 {
1630 std::vector<size_t> lengths;
1631 lengths.push_back(large7);
1632 size_t batch = 1;
1633 std::vector<size_t> input_strides;
1634 std::vector<size_t> output_strides;
1635 size_t input_distance = 0;
1636 size_t output_distance = 0;
1637 layout::buffer_layout_t layout = layout::hermitian_interleaved;
1638 placeness::placeness_t placeness = placeness::in_place;
1639
1640 data_pattern pattern = sawtooth;
1641 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
1642 }
1643
TEST_F(accuracy_test_pow7_single,large_1D_in_place_real_to_hermitian_interleaved)1644 TEST_F(accuracy_test_pow7_single, large_1D_in_place_real_to_hermitian_interleaved)
1645 {
1646 try { large_1D_in_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
1647 catch (const std::exception& err) { handle_exception(err); }
1648 }
1649
TEST_F(accuracy_test_pow7_double,large_1D_in_place_real_to_hermitian_interleaved)1650 TEST_F(accuracy_test_pow7_double, large_1D_in_place_real_to_hermitian_interleaved)
1651 {
1652 try { large_1D_in_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
1653 catch (const std::exception& err) { handle_exception(err); }
1654 }
1655
1656 // *****************************************************
1657 // *****************************************************
1658 template< class T, class cl_T, class fftw_T >
large_1D_in_place_hermitian_interleaved_to_real()1659 void large_1D_in_place_hermitian_interleaved_to_real()
1660 {
1661 std::vector<size_t> lengths;
1662 lengths.push_back(large7);
1663 size_t batch = 1;
1664 std::vector<size_t> input_strides;
1665 std::vector<size_t> output_strides;
1666 size_t input_distance = 0;
1667 size_t output_distance = 0;
1668 layout::buffer_layout_t layout = layout::hermitian_interleaved;
1669 placeness::placeness_t placeness = placeness::in_place;
1670
1671 data_pattern pattern = sawtooth;
1672 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
1673 }
1674
TEST_F(accuracy_test_pow7_single,large_1D_in_place_hermitian_interleaved_to_real)1675 TEST_F(accuracy_test_pow7_single, large_1D_in_place_hermitian_interleaved_to_real)
1676 {
1677 try { large_1D_in_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
1678 catch (const std::exception& err) { handle_exception(err); }
1679 }
1680
TEST_F(accuracy_test_pow7_double,large_1D_in_place_hermitian_interleaved_to_real)1681 TEST_F(accuracy_test_pow7_double, large_1D_in_place_hermitian_interleaved_to_real)
1682 {
1683 try { large_1D_in_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
1684 catch (const std::exception& err) { handle_exception(err); }
1685 }
1686
1687 // *****************************************************
1688 // *****************************************************
1689 template< class T, class cl_T, class fftw_T >
large_1D_out_of_place_real_to_hermitian_interleaved()1690 void large_1D_out_of_place_real_to_hermitian_interleaved()
1691 {
1692 std::vector<size_t> lengths;
1693 lengths.push_back(large7);
1694 size_t batch = 1;
1695 std::vector<size_t> input_strides;
1696 std::vector<size_t> output_strides;
1697 size_t input_distance = 0;
1698 size_t output_distance = 0;
1699 layout::buffer_layout_t layout = layout::hermitian_interleaved;
1700 placeness::placeness_t placeness = placeness::out_of_place;
1701
1702 data_pattern pattern = sawtooth;
1703 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
1704 }
1705
TEST_F(accuracy_test_pow7_single,large_1D_out_of_place_real_to_hermitian_interleaved)1706 TEST_F(accuracy_test_pow7_single, large_1D_out_of_place_real_to_hermitian_interleaved)
1707 {
1708 try { large_1D_out_of_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
1709 catch (const std::exception& err) { handle_exception(err); }
1710 }
1711
TEST_F(accuracy_test_pow7_double,large_1D_out_of_place_real_to_hermitian_interleaved)1712 TEST_F(accuracy_test_pow7_double, large_1D_out_of_place_real_to_hermitian_interleaved)
1713 {
1714 try { large_1D_out_of_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
1715 catch (const std::exception& err) { handle_exception(err); }
1716 }
1717
1718 // *****************************************************
1719 // *****************************************************
1720 template< class T, class cl_T, class fftw_T >
large_1D_out_of_place_hermitian_interleaved_to_real()1721 void large_1D_out_of_place_hermitian_interleaved_to_real()
1722 {
1723 std::vector<size_t> lengths;
1724 lengths.push_back(large7);
1725 size_t batch = 1;
1726 std::vector<size_t> input_strides;
1727 std::vector<size_t> output_strides;
1728 size_t input_distance = 0;
1729 size_t output_distance = 0;
1730 layout::buffer_layout_t layout = layout::hermitian_interleaved;
1731 placeness::placeness_t placeness = placeness::out_of_place;
1732
1733 data_pattern pattern = sawtooth;
1734 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
1735 }
1736
TEST_F(accuracy_test_pow7_single,large_1D_out_of_place_hermitian_interleaved_to_real)1737 TEST_F(accuracy_test_pow7_single, large_1D_out_of_place_hermitian_interleaved_to_real)
1738 {
1739 try { large_1D_out_of_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
1740 catch (const std::exception& err) { handle_exception(err); }
1741 }
1742
TEST_F(accuracy_test_pow7_double,large_1D_out_of_place_hermitian_interleaved_to_real)1743 TEST_F(accuracy_test_pow7_double, large_1D_out_of_place_hermitian_interleaved_to_real)
1744 {
1745 try { large_1D_out_of_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
1746 catch (const std::exception& err) { handle_exception(err); }
1747 }
1748
1749 // *****************************************************
1750 // *****************************************************
1751 template< class T, class cl_T, class fftw_T >
large_1D_out_of_place_real_to_hermitian_planar()1752 void large_1D_out_of_place_real_to_hermitian_planar()
1753 {
1754 std::vector<size_t> lengths;
1755 lengths.push_back(large7);
1756 size_t batch = 1;
1757 std::vector<size_t> input_strides;
1758 std::vector<size_t> output_strides;
1759 size_t input_distance = 0;
1760 size_t output_distance = 0;
1761 layout::buffer_layout_t layout = layout::hermitian_planar;
1762 placeness::placeness_t placeness = placeness::out_of_place;
1763
1764 data_pattern pattern = sawtooth;
1765 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
1766 }
1767
TEST_F(accuracy_test_pow7_single,large_1D_out_of_place_real_to_hermitian_planar)1768 TEST_F(accuracy_test_pow7_single, large_1D_out_of_place_real_to_hermitian_planar)
1769 {
1770 try { large_1D_out_of_place_real_to_hermitian_planar< float, cl_float, fftwf_complex >(); }
1771 catch (const std::exception& err) { handle_exception(err); }
1772 }
1773
TEST_F(accuracy_test_pow7_double,large_1D_out_of_place_real_to_hermitian_planar)1774 TEST_F(accuracy_test_pow7_double, large_1D_out_of_place_real_to_hermitian_planar)
1775 {
1776 try { large_1D_out_of_place_real_to_hermitian_planar< double, cl_double, fftw_complex >(); }
1777 catch (const std::exception& err) { handle_exception(err); }
1778 }
1779
1780 // *****************************************************
1781 // *****************************************************
1782 template< class T, class cl_T, class fftw_T >
large_1D_out_of_place_hermitian_planar_to_real()1783 void large_1D_out_of_place_hermitian_planar_to_real()
1784 {
1785 std::vector<size_t> lengths;
1786 lengths.push_back(large7);
1787 size_t batch = 1;
1788 std::vector<size_t> input_strides;
1789 std::vector<size_t> output_strides;
1790 size_t input_distance = 0;
1791 size_t output_distance = 0;
1792 layout::buffer_layout_t layout = layout::hermitian_planar;
1793 placeness::placeness_t placeness = placeness::out_of_place;
1794
1795 data_pattern pattern = sawtooth;
1796 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
1797 }
1798
TEST_F(accuracy_test_pow7_single,large_1D_out_of_place_hermitian_planar_to_real)1799 TEST_F(accuracy_test_pow7_single, large_1D_out_of_place_hermitian_planar_to_real)
1800 {
1801 try { large_1D_out_of_place_hermitian_planar_to_real< float, cl_float, fftwf_complex >(); }
1802 catch (const std::exception& err) { handle_exception(err); }
1803 }
1804
TEST_F(accuracy_test_pow7_double,large_1D_out_of_place_hermitian_planar_to_real)1805 TEST_F(accuracy_test_pow7_double, large_1D_out_of_place_hermitian_planar_to_real)
1806 {
1807 try { large_1D_out_of_place_hermitian_planar_to_real< double, cl_double, fftw_complex >(); }
1808 catch (const std::exception& err) { handle_exception(err); }
1809 }
1810
1811 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
1812 // ^^^^^^^^^^^^^^^^^^^^^^^ normal 2D ^^^^^^^^^^^^^^^^^^^^^^ //
1813 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
1814
1815 // *****************************************************
1816 // *****************************************************
1817 template< class T, class cl_T, class fftw_T >
normal_2D_forward_in_place_complex_planar_to_complex_planar()1818 void normal_2D_forward_in_place_complex_planar_to_complex_planar()
1819 {
1820 std::vector<size_t> lengths;
1821 lengths.push_back(normal7);
1822 lengths.push_back(normal7);
1823 size_t batch = 1;
1824 std::vector<size_t> input_strides;
1825 std::vector<size_t> output_strides;
1826 size_t input_distance = 0;
1827 size_t output_distance = 0;
1828 layout::buffer_layout_t in_layout = layout::complex_planar;
1829 layout::buffer_layout_t out_layout = layout::complex_planar;
1830 placeness::placeness_t placeness = placeness::in_place;
1831 direction::direction_t direction = direction::forward;
1832
1833 data_pattern pattern = sawtooth;
1834 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1835 }
1836
TEST_F(accuracy_test_pow7_single,normal_2D_forward_in_place_complex_planar_to_complex_planar)1837 TEST_F(accuracy_test_pow7_single, normal_2D_forward_in_place_complex_planar_to_complex_planar)
1838 {
1839 try { normal_2D_forward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
1840 catch (const std::exception& err) { handle_exception(err); }
1841 }
1842
TEST_F(accuracy_test_pow7_double,normal_2D_forward_in_place_complex_planar_to_complex_planar)1843 TEST_F(accuracy_test_pow7_double, normal_2D_forward_in_place_complex_planar_to_complex_planar)
1844 {
1845 try { normal_2D_forward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
1846 catch (const std::exception& err) { handle_exception(err); }
1847 }
1848
1849 // *****************************************************
1850 // *****************************************************
1851 template< class T, class cl_T, class fftw_T >
normal_2D_backward_in_place_complex_planar_to_complex_planar()1852 void normal_2D_backward_in_place_complex_planar_to_complex_planar()
1853 {
1854 std::vector<size_t> lengths;
1855 lengths.push_back(normal7);
1856 lengths.push_back(normal7);
1857 size_t batch = 1;
1858 std::vector<size_t> input_strides;
1859 std::vector<size_t> output_strides;
1860 size_t input_distance = 0;
1861 size_t output_distance = 0;
1862 layout::buffer_layout_t in_layout = layout::complex_planar;
1863 layout::buffer_layout_t out_layout = layout::complex_planar;
1864 placeness::placeness_t placeness = placeness::in_place;
1865 direction::direction_t direction = direction::backward;
1866
1867 data_pattern pattern = sawtooth;
1868 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1869 }
1870
TEST_F(accuracy_test_pow7_single,normal_2D_backward_in_place_complex_planar_to_complex_planar)1871 TEST_F(accuracy_test_pow7_single, normal_2D_backward_in_place_complex_planar_to_complex_planar)
1872 {
1873 try { normal_2D_backward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
1874 catch (const std::exception& err) { handle_exception(err); }
1875 }
1876
TEST_F(accuracy_test_pow7_double,normal_2D_backward_in_place_complex_planar_to_complex_planar)1877 TEST_F(accuracy_test_pow7_double, normal_2D_backward_in_place_complex_planar_to_complex_planar)
1878 {
1879 try { normal_2D_backward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
1880 catch (const std::exception& err) { handle_exception(err); }
1881 }
1882
1883 // *****************************************************
1884 // *****************************************************
1885 template< class T, class cl_T, class fftw_T >
normal_2D_forward_in_place_complex_interleaved_to_complex_interleaved()1886 void normal_2D_forward_in_place_complex_interleaved_to_complex_interleaved()
1887 {
1888 std::vector<size_t> lengths;
1889 lengths.push_back(normal7);
1890 lengths.push_back(normal7);
1891 size_t batch = 1;
1892 std::vector<size_t> input_strides;
1893 std::vector<size_t> output_strides;
1894 size_t input_distance = 0;
1895 size_t output_distance = 0;
1896 layout::buffer_layout_t in_layout = layout::complex_interleaved;
1897 layout::buffer_layout_t out_layout = layout::complex_interleaved;
1898 placeness::placeness_t placeness = placeness::in_place;
1899 direction::direction_t direction = direction::forward;
1900
1901 data_pattern pattern = sawtooth;
1902 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1903 }
1904
TEST_F(accuracy_test_pow7_single,normal_2D_forward_in_place_complex_interleaved_to_complex_interleaved)1905 TEST_F(accuracy_test_pow7_single, normal_2D_forward_in_place_complex_interleaved_to_complex_interleaved)
1906 {
1907 try { normal_2D_forward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
1908 catch (const std::exception& err) { handle_exception(err); }
1909 }
1910
TEST_F(accuracy_test_pow7_double,normal_2D_forward_in_place_complex_interleaved_to_complex_interleaved)1911 TEST_F(accuracy_test_pow7_double, normal_2D_forward_in_place_complex_interleaved_to_complex_interleaved)
1912 {
1913 try { normal_2D_forward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
1914 catch (const std::exception& err) { handle_exception(err); }
1915 }
1916
1917 // *****************************************************
1918 // *****************************************************
1919 template< class T, class cl_T, class fftw_T >
normal_2D_backward_in_place_complex_interleaved_to_complex_interleaved()1920 void normal_2D_backward_in_place_complex_interleaved_to_complex_interleaved()
1921 {
1922 std::vector<size_t> lengths;
1923 lengths.push_back(normal7);
1924 lengths.push_back(normal7);
1925 size_t batch = 1;
1926 std::vector<size_t> input_strides;
1927 std::vector<size_t> output_strides;
1928 size_t input_distance = 0;
1929 size_t output_distance = 0;
1930 layout::buffer_layout_t in_layout = layout::complex_interleaved;
1931 layout::buffer_layout_t out_layout = layout::complex_interleaved;
1932 placeness::placeness_t placeness = placeness::in_place;
1933 direction::direction_t direction = direction::backward;
1934
1935 data_pattern pattern = sawtooth;
1936 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1937 }
1938
TEST_F(accuracy_test_pow7_single,normal_2D_backward_in_place_complex_interleaved_to_complex_interleaved)1939 TEST_F(accuracy_test_pow7_single, normal_2D_backward_in_place_complex_interleaved_to_complex_interleaved)
1940 {
1941 try { normal_2D_backward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
1942 catch (const std::exception& err) { handle_exception(err); }
1943 }
1944
TEST_F(accuracy_test_pow7_double,normal_2D_backward_in_place_complex_interleaved_to_complex_interleaved)1945 TEST_F(accuracy_test_pow7_double, normal_2D_backward_in_place_complex_interleaved_to_complex_interleaved)
1946 {
1947 try { normal_2D_backward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
1948 catch (const std::exception& err) { handle_exception(err); }
1949 }
1950
1951 // *****************************************************
1952 // *****************************************************
1953 template< class T, class cl_T, class fftw_T >
normal_2D_forward_out_of_place_complex_planar_to_complex_planar()1954 void normal_2D_forward_out_of_place_complex_planar_to_complex_planar()
1955 {
1956 std::vector<size_t> lengths;
1957 lengths.push_back(normal7);
1958 lengths.push_back(normal7);
1959 size_t batch = 1;
1960 std::vector<size_t> input_strides;
1961 std::vector<size_t> output_strides;
1962 size_t input_distance = 0;
1963 size_t output_distance = 0;
1964 layout::buffer_layout_t in_layout = layout::complex_planar;
1965 layout::buffer_layout_t out_layout = layout::complex_planar;
1966 placeness::placeness_t placeness = placeness::out_of_place;
1967 direction::direction_t direction = direction::forward;
1968
1969 data_pattern pattern = sawtooth;
1970 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
1971 }
1972
TEST_F(accuracy_test_pow7_single,normal_2D_forward_out_of_place_complex_planar_to_complex_planar)1973 TEST_F(accuracy_test_pow7_single, normal_2D_forward_out_of_place_complex_planar_to_complex_planar)
1974 {
1975 try { normal_2D_forward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
1976 catch (const std::exception& err) { handle_exception(err); }
1977 }
1978
TEST_F(accuracy_test_pow7_double,normal_2D_forward_out_of_place_complex_planar_to_complex_planar)1979 TEST_F(accuracy_test_pow7_double, normal_2D_forward_out_of_place_complex_planar_to_complex_planar)
1980 {
1981 try { normal_2D_forward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
1982 catch (const std::exception& err) { handle_exception(err); }
1983 }
1984
1985 // *****************************************************
1986 // *****************************************************
1987 template< class T, class cl_T, class fftw_T >
normal_2D_backward_out_of_place_complex_planar_to_complex_planar()1988 void normal_2D_backward_out_of_place_complex_planar_to_complex_planar()
1989 {
1990 std::vector<size_t> lengths;
1991 lengths.push_back(normal7);
1992 lengths.push_back(normal7);
1993 size_t batch = 1;
1994 std::vector<size_t> input_strides;
1995 std::vector<size_t> output_strides;
1996 size_t input_distance = 0;
1997 size_t output_distance = 0;
1998 layout::buffer_layout_t in_layout = layout::complex_planar;
1999 layout::buffer_layout_t out_layout = layout::complex_planar;
2000 placeness::placeness_t placeness = placeness::out_of_place;
2001 direction::direction_t direction = direction::backward;
2002
2003 data_pattern pattern = sawtooth;
2004 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2005 }
2006
TEST_F(accuracy_test_pow7_single,normal_2D_backward_out_of_place_complex_planar_to_complex_planar)2007 TEST_F(accuracy_test_pow7_single, normal_2D_backward_out_of_place_complex_planar_to_complex_planar)
2008 {
2009 try { normal_2D_backward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
2010 catch (const std::exception& err) { handle_exception(err); }
2011 }
2012
TEST_F(accuracy_test_pow7_double,normal_2D_backward_out_of_place_complex_planar_to_complex_planar)2013 TEST_F(accuracy_test_pow7_double, normal_2D_backward_out_of_place_complex_planar_to_complex_planar)
2014 {
2015 try { normal_2D_backward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
2016 catch (const std::exception& err) { handle_exception(err); }
2017 }
2018
2019 // *****************************************************
2020 // *****************************************************
2021 template< class T, class cl_T, class fftw_T >
normal_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved()2022 void normal_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved()
2023 {
2024 std::vector<size_t> lengths;
2025 lengths.push_back(normal7);
2026 lengths.push_back(normal7);
2027 size_t batch = 1;
2028 std::vector<size_t> input_strides;
2029 std::vector<size_t> output_strides;
2030 size_t input_distance = 0;
2031 size_t output_distance = 0;
2032 layout::buffer_layout_t in_layout = layout::complex_interleaved;
2033 layout::buffer_layout_t out_layout = layout::complex_interleaved;
2034 placeness::placeness_t placeness = placeness::out_of_place;
2035 direction::direction_t direction = direction::forward;
2036
2037 data_pattern pattern = sawtooth;
2038 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2039 }
2040
TEST_F(accuracy_test_pow7_single,normal_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved)2041 TEST_F(accuracy_test_pow7_single, normal_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
2042 {
2043 try { normal_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
2044 catch (const std::exception& err) { handle_exception(err); }
2045 }
2046
TEST_F(accuracy_test_pow7_double,normal_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved)2047 TEST_F(accuracy_test_pow7_double, normal_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
2048 {
2049 try { normal_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
2050 catch (const std::exception& err) { handle_exception(err); }
2051 }
2052
2053 // *****************************************************
2054 // *****************************************************
2055 template< class T, class cl_T, class fftw_T >
normal_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved()2056 void normal_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved()
2057 {
2058 std::vector<size_t> lengths;
2059 lengths.push_back(normal7);
2060 lengths.push_back(normal7);
2061 size_t batch = 1;
2062 std::vector<size_t> input_strides;
2063 std::vector<size_t> output_strides;
2064 size_t input_distance = 0;
2065 size_t output_distance = 0;
2066 layout::buffer_layout_t in_layout = layout::complex_interleaved;
2067 layout::buffer_layout_t out_layout = layout::complex_interleaved;
2068 placeness::placeness_t placeness = placeness::out_of_place;
2069 direction::direction_t direction = direction::backward;
2070
2071 data_pattern pattern = sawtooth;
2072 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2073 }
2074
TEST_F(accuracy_test_pow7_single,normal_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved)2075 TEST_F(accuracy_test_pow7_single, normal_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
2076 {
2077 try { normal_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
2078 catch (const std::exception& err) { handle_exception(err); }
2079 }
2080
TEST_F(accuracy_test_pow7_double,normal_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved)2081 TEST_F(accuracy_test_pow7_double, normal_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
2082 {
2083 try { normal_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
2084 catch (const std::exception& err) { handle_exception(err); }
2085 }
2086
2087 // *****************************************************
2088 // *****************************************************
2089 template< class T, class cl_T, class fftw_T >
normal_2D_forward_out_of_place_complex_planar_to_complex_interleaved()2090 void normal_2D_forward_out_of_place_complex_planar_to_complex_interleaved()
2091 {
2092 std::vector<size_t> lengths;
2093 lengths.push_back(normal7);
2094 lengths.push_back(normal7);
2095 size_t batch = 1;
2096 std::vector<size_t> input_strides;
2097 std::vector<size_t> output_strides;
2098 size_t input_distance = 0;
2099 size_t output_distance = 0;
2100 layout::buffer_layout_t in_layout = layout::complex_planar;
2101 layout::buffer_layout_t out_layout = layout::complex_interleaved;
2102 placeness::placeness_t placeness = placeness::out_of_place;
2103 direction::direction_t direction = direction::forward;
2104
2105 data_pattern pattern = sawtooth;
2106 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2107 }
2108
TEST_F(accuracy_test_pow7_single,normal_2D_forward_out_of_place_complex_planar_to_complex_interleaved)2109 TEST_F(accuracy_test_pow7_single, normal_2D_forward_out_of_place_complex_planar_to_complex_interleaved)
2110 {
2111 try { normal_2D_forward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
2112 catch (const std::exception& err) { handle_exception(err); }
2113 }
2114
TEST_F(accuracy_test_pow7_double,normal_2D_forward_out_of_place_complex_planar_to_complex_interleaved)2115 TEST_F(accuracy_test_pow7_double, normal_2D_forward_out_of_place_complex_planar_to_complex_interleaved)
2116 {
2117 try { normal_2D_forward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
2118 catch (const std::exception& err) { handle_exception(err); }
2119 }
2120
2121 // *****************************************************
2122 // *****************************************************
2123 template< class T, class cl_T, class fftw_T >
normal_2D_backward_out_of_place_complex_planar_to_complex_interleaved()2124 void normal_2D_backward_out_of_place_complex_planar_to_complex_interleaved()
2125 {
2126 std::vector<size_t> lengths;
2127 lengths.push_back(normal7);
2128 lengths.push_back(normal7);
2129 size_t batch = 1;
2130 std::vector<size_t> input_strides;
2131 std::vector<size_t> output_strides;
2132 size_t input_distance = 0;
2133 size_t output_distance = 0;
2134 layout::buffer_layout_t in_layout = layout::complex_planar;
2135 layout::buffer_layout_t out_layout = layout::complex_interleaved;
2136 placeness::placeness_t placeness = placeness::out_of_place;
2137 direction::direction_t direction = direction::backward;
2138
2139 data_pattern pattern = sawtooth;
2140 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2141 }
2142
TEST_F(accuracy_test_pow7_single,normal_2D_backward_out_of_place_complex_planar_to_complex_interleaved)2143 TEST_F(accuracy_test_pow7_single, normal_2D_backward_out_of_place_complex_planar_to_complex_interleaved)
2144 {
2145 try { normal_2D_backward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
2146 catch (const std::exception& err) { handle_exception(err); }
2147 }
2148
TEST_F(accuracy_test_pow7_double,normal_2D_backward_out_of_place_complex_planar_to_complex_interleaved)2149 TEST_F(accuracy_test_pow7_double, normal_2D_backward_out_of_place_complex_planar_to_complex_interleaved)
2150 {
2151 try { normal_2D_backward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
2152 catch (const std::exception& err) { handle_exception(err); }
2153 }
2154
2155 // *****************************************************
2156 // *****************************************************
2157 template< class T, class cl_T, class fftw_T >
normal_2D_forward_out_of_place_complex_interleaved_to_complex_planar()2158 void normal_2D_forward_out_of_place_complex_interleaved_to_complex_planar()
2159 {
2160 std::vector<size_t> lengths;
2161 lengths.push_back(normal7);
2162 lengths.push_back(normal7);
2163 size_t batch = 1;
2164 std::vector<size_t> input_strides;
2165 std::vector<size_t> output_strides;
2166 size_t input_distance = 0;
2167 size_t output_distance = 0;
2168 layout::buffer_layout_t in_layout = layout::complex_interleaved;
2169 layout::buffer_layout_t out_layout = layout::complex_planar;
2170 placeness::placeness_t placeness = placeness::out_of_place;
2171 direction::direction_t direction = direction::forward;
2172
2173 data_pattern pattern = sawtooth;
2174 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2175 }
2176
TEST_F(accuracy_test_pow7_single,normal_2D_forward_out_of_place_complex_interleaved_to_complex_planar)2177 TEST_F(accuracy_test_pow7_single, normal_2D_forward_out_of_place_complex_interleaved_to_complex_planar)
2178 {
2179 try { normal_2D_forward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
2180 catch (const std::exception& err) { handle_exception(err); }
2181 }
2182
TEST_F(accuracy_test_pow7_double,normal_2D_forward_out_of_place_complex_interleaved_to_complex_planar)2183 TEST_F(accuracy_test_pow7_double, normal_2D_forward_out_of_place_complex_interleaved_to_complex_planar)
2184 {
2185 try { normal_2D_forward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
2186 catch (const std::exception& err) { handle_exception(err); }
2187 }
2188
2189 // *****************************************************
2190 // *****************************************************
2191 template< class T, class cl_T, class fftw_T >
normal_2D_backward_out_of_place_complex_interleaved_to_complex_planar()2192 void normal_2D_backward_out_of_place_complex_interleaved_to_complex_planar()
2193 {
2194 std::vector<size_t> lengths;
2195 lengths.push_back(normal7);
2196 lengths.push_back(normal7);
2197 size_t batch = 1;
2198 std::vector<size_t> input_strides;
2199 std::vector<size_t> output_strides;
2200 size_t input_distance = 0;
2201 size_t output_distance = 0;
2202 layout::buffer_layout_t in_layout = layout::complex_interleaved;
2203 layout::buffer_layout_t out_layout = layout::complex_planar;
2204 placeness::placeness_t placeness = placeness::out_of_place;
2205 direction::direction_t direction = direction::backward;
2206
2207 data_pattern pattern = sawtooth;
2208 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2209 }
2210
TEST_F(accuracy_test_pow7_single,normal_2D_backward_out_of_place_complex_interleaved_to_complex_planar)2211 TEST_F(accuracy_test_pow7_single, normal_2D_backward_out_of_place_complex_interleaved_to_complex_planar)
2212 {
2213 try { normal_2D_backward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
2214 catch (const std::exception& err) { handle_exception(err); }
2215 }
2216
TEST_F(accuracy_test_pow7_double,normal_2D_backward_out_of_place_complex_interleaved_to_complex_planar)2217 TEST_F(accuracy_test_pow7_double, normal_2D_backward_out_of_place_complex_interleaved_to_complex_planar)
2218 {
2219 try { normal_2D_backward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
2220 catch (const std::exception& err) { handle_exception(err); }
2221 }
2222
2223 // *****************************************************
2224 // *****************************************************
2225 template< class T, class cl_T, class fftw_T >
normal_2D_in_place_real_to_hermitian_interleaved()2226 void normal_2D_in_place_real_to_hermitian_interleaved()
2227 {
2228 std::vector<size_t> lengths;
2229 lengths.push_back(normal7);
2230 lengths.push_back(normal7);
2231 size_t batch = 1;
2232 std::vector<size_t> input_strides;
2233 std::vector<size_t> output_strides;
2234 size_t input_distance = 0;
2235 size_t output_distance = 0;
2236 layout::buffer_layout_t layout = layout::hermitian_interleaved;
2237 placeness::placeness_t placeness = placeness::in_place;
2238
2239 data_pattern pattern = sawtooth;
2240 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
2241 }
2242
TEST_F(accuracy_test_pow7_single,normal_2D_in_place_real_to_hermitian_interleaved)2243 TEST_F(accuracy_test_pow7_single, normal_2D_in_place_real_to_hermitian_interleaved)
2244 {
2245 try { normal_2D_in_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
2246 catch (const std::exception& err) { handle_exception(err); }
2247 }
2248
TEST_F(accuracy_test_pow7_double,normal_2D_in_place_real_to_hermitian_interleaved)2249 TEST_F(accuracy_test_pow7_double, normal_2D_in_place_real_to_hermitian_interleaved)
2250 {
2251 try { normal_2D_in_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
2252 catch (const std::exception& err) { handle_exception(err); }
2253 }
2254
2255 // *****************************************************
2256 // *****************************************************
2257 template< class T, class cl_T, class fftw_T >
normal_2D_in_place_hermitian_interleaved_to_real()2258 void normal_2D_in_place_hermitian_interleaved_to_real()
2259 {
2260 std::vector<size_t> lengths;
2261 lengths.push_back(normal7);
2262 lengths.push_back(normal7);
2263 size_t batch = 1;
2264 std::vector<size_t> input_strides;
2265 std::vector<size_t> output_strides;
2266 size_t input_distance = 0;
2267 size_t output_distance = 0;
2268 layout::buffer_layout_t layout = layout::hermitian_interleaved;
2269 placeness::placeness_t placeness = placeness::in_place;
2270
2271 data_pattern pattern = sawtooth;
2272 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
2273 }
2274
TEST_F(accuracy_test_pow7_single,normal_2D_in_place_hermitian_interleaved_to_real)2275 TEST_F(accuracy_test_pow7_single, normal_2D_in_place_hermitian_interleaved_to_real)
2276 {
2277 try { normal_2D_in_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
2278 catch (const std::exception& err) { handle_exception(err); }
2279 }
2280
TEST_F(accuracy_test_pow7_double,normal_2D_in_place_hermitian_interleaved_to_real)2281 TEST_F(accuracy_test_pow7_double, normal_2D_in_place_hermitian_interleaved_to_real)
2282 {
2283 try { normal_2D_in_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
2284 catch (const std::exception& err) { handle_exception(err); }
2285 }
2286
2287 // *****************************************************
2288 // *****************************************************
2289 template< class T, class cl_T, class fftw_T >
normal_2D_out_of_place_real_to_hermitian_interleaved()2290 void normal_2D_out_of_place_real_to_hermitian_interleaved()
2291 {
2292 std::vector<size_t> lengths;
2293 lengths.push_back(normal7);
2294 lengths.push_back(normal7);
2295 size_t batch = 1;
2296 std::vector<size_t> input_strides;
2297 std::vector<size_t> output_strides;
2298 size_t input_distance = 0;
2299 size_t output_distance = 0;
2300 layout::buffer_layout_t layout = layout::hermitian_interleaved;
2301 placeness::placeness_t placeness = placeness::out_of_place;
2302
2303 data_pattern pattern = sawtooth;
2304 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
2305 }
2306
TEST_F(accuracy_test_pow7_single,normal_2D_out_of_place_real_to_hermitian_interleaved)2307 TEST_F(accuracy_test_pow7_single, normal_2D_out_of_place_real_to_hermitian_interleaved)
2308 {
2309 try { normal_2D_out_of_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
2310 catch (const std::exception& err) { handle_exception(err); }
2311 }
2312
TEST_F(accuracy_test_pow7_double,normal_2D_out_of_place_real_to_hermitian_interleaved)2313 TEST_F(accuracy_test_pow7_double, normal_2D_out_of_place_real_to_hermitian_interleaved)
2314 {
2315 try { normal_2D_out_of_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
2316 catch (const std::exception& err) { handle_exception(err); }
2317 }
2318
2319 // *****************************************************
2320 // *****************************************************
2321 template< class T, class cl_T, class fftw_T >
normal_2D_out_of_place_hermitian_interleaved_to_real()2322 void normal_2D_out_of_place_hermitian_interleaved_to_real()
2323 {
2324 std::vector<size_t> lengths;
2325 lengths.push_back(normal7);
2326 lengths.push_back(normal7);
2327 size_t batch = 1;
2328 std::vector<size_t> input_strides;
2329 std::vector<size_t> output_strides;
2330 size_t input_distance = 0;
2331 size_t output_distance = 0;
2332 layout::buffer_layout_t layout = layout::hermitian_interleaved;
2333 placeness::placeness_t placeness = placeness::out_of_place;
2334
2335 data_pattern pattern = sawtooth;
2336 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
2337 }
2338
TEST_F(accuracy_test_pow7_single,normal_2D_out_of_place_hermitian_interleaved_to_real)2339 TEST_F(accuracy_test_pow7_single, normal_2D_out_of_place_hermitian_interleaved_to_real)
2340 {
2341 try { normal_2D_out_of_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
2342 catch (const std::exception& err) { handle_exception(err); }
2343 }
2344
TEST_F(accuracy_test_pow7_double,normal_2D_out_of_place_hermitian_interleaved_to_real)2345 TEST_F(accuracy_test_pow7_double, normal_2D_out_of_place_hermitian_interleaved_to_real)
2346 {
2347 try { normal_2D_out_of_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
2348 catch (const std::exception& err) { handle_exception(err); }
2349 }
2350
2351 // *****************************************************
2352 // *****************************************************
2353 template< class T, class cl_T, class fftw_T >
normal_2D_out_of_place_real_to_hermitian_planar()2354 void normal_2D_out_of_place_real_to_hermitian_planar()
2355 {
2356 std::vector<size_t> lengths;
2357 lengths.push_back(normal7);
2358 lengths.push_back(normal7);
2359 size_t batch = 1;
2360 std::vector<size_t> input_strides;
2361 std::vector<size_t> output_strides;
2362 size_t input_distance = 0;
2363 size_t output_distance = 0;
2364 layout::buffer_layout_t layout = layout::hermitian_planar;
2365 placeness::placeness_t placeness = placeness::out_of_place;
2366
2367 data_pattern pattern = sawtooth;
2368 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
2369 }
2370
TEST_F(accuracy_test_pow7_single,normal_2D_out_of_place_real_to_hermitian_planar)2371 TEST_F(accuracy_test_pow7_single, normal_2D_out_of_place_real_to_hermitian_planar)
2372 {
2373 try { normal_2D_out_of_place_real_to_hermitian_planar< float, cl_float, fftwf_complex >(); }
2374 catch (const std::exception& err) { handle_exception(err); }
2375 }
2376
TEST_F(accuracy_test_pow7_double,normal_2D_out_of_place_real_to_hermitian_planar)2377 TEST_F(accuracy_test_pow7_double, normal_2D_out_of_place_real_to_hermitian_planar)
2378 {
2379 try { normal_2D_out_of_place_real_to_hermitian_planar< double, cl_double, fftw_complex >(); }
2380 catch (const std::exception& err) { handle_exception(err); }
2381 }
2382
2383 // *****************************************************
2384 // *****************************************************
2385 template< class T, class cl_T, class fftw_T >
normal_2D_out_of_place_hermitian_planar_to_real()2386 void normal_2D_out_of_place_hermitian_planar_to_real()
2387 {
2388 std::vector<size_t> lengths;
2389 lengths.push_back(normal7);
2390 lengths.push_back(normal7);
2391 size_t batch = 1;
2392 std::vector<size_t> input_strides;
2393 std::vector<size_t> output_strides;
2394 size_t input_distance = 0;
2395 size_t output_distance = 0;
2396 layout::buffer_layout_t layout = layout::hermitian_planar;
2397 placeness::placeness_t placeness = placeness::out_of_place;
2398
2399 data_pattern pattern = sawtooth;
2400 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
2401 }
2402
TEST_F(accuracy_test_pow7_single,normal_2D_out_of_place_hermitian_planar_to_real)2403 TEST_F(accuracy_test_pow7_single, normal_2D_out_of_place_hermitian_planar_to_real)
2404 {
2405 try { normal_2D_out_of_place_hermitian_planar_to_real< float, cl_float, fftwf_complex >(); }
2406 catch (const std::exception& err) { handle_exception(err); }
2407 }
2408
TEST_F(accuracy_test_pow7_double,normal_2D_out_of_place_hermitian_planar_to_real)2409 TEST_F(accuracy_test_pow7_double, normal_2D_out_of_place_hermitian_planar_to_real)
2410 {
2411 try { normal_2D_out_of_place_hermitian_planar_to_real< double, cl_double, fftw_complex >(); }
2412 catch (const std::exception& err) { handle_exception(err); }
2413 }
2414
2415 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
2416 // ^^^^^^^^^^^^^^^^^^^^^^^ small 2D ^^^^^^^^^^^^^^^^^^^^^^^ //
2417 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
2418
2419 // *****************************************************
2420 // *****************************************************
2421 template< class T, class cl_T, class fftw_T >
small_2D_forward_in_place_complex_planar_to_complex_planar()2422 void small_2D_forward_in_place_complex_planar_to_complex_planar()
2423 {
2424 std::vector<size_t> lengths;
2425 lengths.push_back(small7);
2426 lengths.push_back(small7);
2427 size_t batch = 1;
2428 std::vector<size_t> input_strides;
2429 std::vector<size_t> output_strides;
2430 size_t input_distance = 0;
2431 size_t output_distance = 0;
2432 layout::buffer_layout_t in_layout = layout::complex_planar;
2433 layout::buffer_layout_t out_layout = layout::complex_planar;
2434 placeness::placeness_t placeness = placeness::in_place;
2435 direction::direction_t direction = direction::forward;
2436
2437 data_pattern pattern = sawtooth;
2438 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2439 }
2440
TEST_F(accuracy_test_pow7_single,small_2D_forward_in_place_complex_planar_to_complex_planar)2441 TEST_F(accuracy_test_pow7_single, small_2D_forward_in_place_complex_planar_to_complex_planar)
2442 {
2443 try { small_2D_forward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
2444 catch (const std::exception& err) { handle_exception(err); }
2445 }
2446
TEST_F(accuracy_test_pow7_double,small_2D_forward_in_place_complex_planar_to_complex_planar)2447 TEST_F(accuracy_test_pow7_double, small_2D_forward_in_place_complex_planar_to_complex_planar)
2448 {
2449 try { small_2D_forward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
2450 catch (const std::exception& err) { handle_exception(err); }
2451 }
2452
2453 // *****************************************************
2454 // *****************************************************
2455 template< class T, class cl_T, class fftw_T >
small_2D_backward_in_place_complex_planar_to_complex_planar()2456 void small_2D_backward_in_place_complex_planar_to_complex_planar()
2457 {
2458 std::vector<size_t> lengths;
2459 lengths.push_back(small7);
2460 lengths.push_back(small7);
2461 size_t batch = 1;
2462 std::vector<size_t> input_strides;
2463 std::vector<size_t> output_strides;
2464 size_t input_distance = 0;
2465 size_t output_distance = 0;
2466 layout::buffer_layout_t in_layout = layout::complex_planar;
2467 layout::buffer_layout_t out_layout = layout::complex_planar;
2468 placeness::placeness_t placeness = placeness::in_place;
2469 direction::direction_t direction = direction::backward;
2470
2471 data_pattern pattern = sawtooth;
2472 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2473 }
2474
TEST_F(accuracy_test_pow7_single,small_2D_backward_in_place_complex_planar_to_complex_planar)2475 TEST_F(accuracy_test_pow7_single, small_2D_backward_in_place_complex_planar_to_complex_planar)
2476 {
2477 try { small_2D_backward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
2478 catch (const std::exception& err) { handle_exception(err); }
2479 }
2480
TEST_F(accuracy_test_pow7_double,small_2D_backward_in_place_complex_planar_to_complex_planar)2481 TEST_F(accuracy_test_pow7_double, small_2D_backward_in_place_complex_planar_to_complex_planar)
2482 {
2483 try { small_2D_backward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
2484 catch (const std::exception& err) { handle_exception(err); }
2485 }
2486
2487 // *****************************************************
2488 // *****************************************************
2489 template< class T, class cl_T, class fftw_T >
small_2D_forward_in_place_complex_interleaved_to_complex_interleaved()2490 void small_2D_forward_in_place_complex_interleaved_to_complex_interleaved()
2491 {
2492 std::vector<size_t> lengths;
2493 lengths.push_back(small7);
2494 lengths.push_back(small7);
2495 size_t batch = 1;
2496 std::vector<size_t> input_strides;
2497 std::vector<size_t> output_strides;
2498 size_t input_distance = 0;
2499 size_t output_distance = 0;
2500 layout::buffer_layout_t in_layout = layout::complex_interleaved;
2501 layout::buffer_layout_t out_layout = layout::complex_interleaved;
2502 placeness::placeness_t placeness = placeness::in_place;
2503 direction::direction_t direction = direction::forward;
2504
2505 data_pattern pattern = sawtooth;
2506 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2507 }
2508
TEST_F(accuracy_test_pow7_single,small_2D_forward_in_place_complex_interleaved_to_complex_interleaved)2509 TEST_F(accuracy_test_pow7_single, small_2D_forward_in_place_complex_interleaved_to_complex_interleaved)
2510 {
2511 try { small_2D_forward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
2512 catch (const std::exception& err) { handle_exception(err); }
2513 }
2514
TEST_F(accuracy_test_pow7_double,small_2D_forward_in_place_complex_interleaved_to_complex_interleaved)2515 TEST_F(accuracy_test_pow7_double, small_2D_forward_in_place_complex_interleaved_to_complex_interleaved)
2516 {
2517 try { small_2D_forward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
2518 catch (const std::exception& err) { handle_exception(err); }
2519 }
2520
2521 // *****************************************************
2522 // *****************************************************
2523 template< class T, class cl_T, class fftw_T >
small_2D_backward_in_place_complex_interleaved_to_complex_interleaved()2524 void small_2D_backward_in_place_complex_interleaved_to_complex_interleaved()
2525 {
2526 std::vector<size_t> lengths;
2527 lengths.push_back(small7);
2528 lengths.push_back(small7);
2529 size_t batch = 1;
2530 std::vector<size_t> input_strides;
2531 std::vector<size_t> output_strides;
2532 size_t input_distance = 0;
2533 size_t output_distance = 0;
2534 layout::buffer_layout_t in_layout = layout::complex_interleaved;
2535 layout::buffer_layout_t out_layout = layout::complex_interleaved;
2536 placeness::placeness_t placeness = placeness::in_place;
2537 direction::direction_t direction = direction::backward;
2538
2539 data_pattern pattern = sawtooth;
2540 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2541 }
2542
TEST_F(accuracy_test_pow7_single,small_2D_backward_in_place_complex_interleaved_to_complex_interleaved)2543 TEST_F(accuracy_test_pow7_single, small_2D_backward_in_place_complex_interleaved_to_complex_interleaved)
2544 {
2545 try { small_2D_backward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
2546 catch (const std::exception& err) { handle_exception(err); }
2547 }
2548
TEST_F(accuracy_test_pow7_double,small_2D_backward_in_place_complex_interleaved_to_complex_interleaved)2549 TEST_F(accuracy_test_pow7_double, small_2D_backward_in_place_complex_interleaved_to_complex_interleaved)
2550 {
2551 try { small_2D_backward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
2552 catch (const std::exception& err) { handle_exception(err); }
2553 }
2554
2555 // *****************************************************
2556 // *****************************************************
2557 template< class T, class cl_T, class fftw_T >
small_2D_forward_out_of_place_complex_planar_to_complex_planar()2558 void small_2D_forward_out_of_place_complex_planar_to_complex_planar()
2559 {
2560 std::vector<size_t> lengths;
2561 lengths.push_back(small7);
2562 lengths.push_back(small7);
2563 size_t batch = 1;
2564 std::vector<size_t> input_strides;
2565 std::vector<size_t> output_strides;
2566 size_t input_distance = 0;
2567 size_t output_distance = 0;
2568 layout::buffer_layout_t in_layout = layout::complex_planar;
2569 layout::buffer_layout_t out_layout = layout::complex_planar;
2570 placeness::placeness_t placeness = placeness::out_of_place;
2571 direction::direction_t direction = direction::forward;
2572
2573 data_pattern pattern = sawtooth;
2574 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2575 }
2576
TEST_F(accuracy_test_pow7_single,small_2D_forward_out_of_place_complex_planar_to_complex_planar)2577 TEST_F(accuracy_test_pow7_single, small_2D_forward_out_of_place_complex_planar_to_complex_planar)
2578 {
2579 try { small_2D_forward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
2580 catch (const std::exception& err) { handle_exception(err); }
2581 }
2582
TEST_F(accuracy_test_pow7_double,small_2D_forward_out_of_place_complex_planar_to_complex_planar)2583 TEST_F(accuracy_test_pow7_double, small_2D_forward_out_of_place_complex_planar_to_complex_planar)
2584 {
2585 try { small_2D_forward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
2586 catch (const std::exception& err) { handle_exception(err); }
2587 }
2588
2589 // *****************************************************
2590 // *****************************************************
2591 template< class T, class cl_T, class fftw_T >
small_2D_backward_out_of_place_complex_planar_to_complex_planar()2592 void small_2D_backward_out_of_place_complex_planar_to_complex_planar()
2593 {
2594 std::vector<size_t> lengths;
2595 lengths.push_back(small7);
2596 lengths.push_back(small7);
2597 size_t batch = 1;
2598 std::vector<size_t> input_strides;
2599 std::vector<size_t> output_strides;
2600 size_t input_distance = 0;
2601 size_t output_distance = 0;
2602 layout::buffer_layout_t in_layout = layout::complex_planar;
2603 layout::buffer_layout_t out_layout = layout::complex_planar;
2604 placeness::placeness_t placeness = placeness::out_of_place;
2605 direction::direction_t direction = direction::backward;
2606
2607 data_pattern pattern = sawtooth;
2608 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2609 }
2610
TEST_F(accuracy_test_pow7_single,small_2D_backward_out_of_place_complex_planar_to_complex_planar)2611 TEST_F(accuracy_test_pow7_single, small_2D_backward_out_of_place_complex_planar_to_complex_planar)
2612 {
2613 try { small_2D_backward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
2614 catch (const std::exception& err) { handle_exception(err); }
2615 }
2616
TEST_F(accuracy_test_pow7_double,small_2D_backward_out_of_place_complex_planar_to_complex_planar)2617 TEST_F(accuracy_test_pow7_double, small_2D_backward_out_of_place_complex_planar_to_complex_planar)
2618 {
2619 try { small_2D_backward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
2620 catch (const std::exception& err) { handle_exception(err); }
2621 }
2622
2623 // *****************************************************
2624 // *****************************************************
2625 template< class T, class cl_T, class fftw_T >
small_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved()2626 void small_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved()
2627 {
2628 std::vector<size_t> lengths;
2629 lengths.push_back(small7);
2630 lengths.push_back(small7);
2631 size_t batch = 1;
2632 std::vector<size_t> input_strides;
2633 std::vector<size_t> output_strides;
2634 size_t input_distance = 0;
2635 size_t output_distance = 0;
2636 layout::buffer_layout_t in_layout = layout::complex_interleaved;
2637 layout::buffer_layout_t out_layout = layout::complex_interleaved;
2638 placeness::placeness_t placeness = placeness::out_of_place;
2639 direction::direction_t direction = direction::forward;
2640
2641 data_pattern pattern = sawtooth;
2642 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2643 }
2644
TEST_F(accuracy_test_pow7_single,small_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved)2645 TEST_F(accuracy_test_pow7_single, small_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
2646 {
2647 try { small_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
2648 catch (const std::exception& err) { handle_exception(err); }
2649 }
2650
TEST_F(accuracy_test_pow7_double,small_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved)2651 TEST_F(accuracy_test_pow7_double, small_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
2652 {
2653 try { small_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
2654 catch (const std::exception& err) { handle_exception(err); }
2655 }
2656
2657 // *****************************************************
2658 // *****************************************************
2659 template< class T, class cl_T, class fftw_T >
small_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved()2660 void small_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved()
2661 {
2662 std::vector<size_t> lengths;
2663 lengths.push_back(small7);
2664 lengths.push_back(small7);
2665 size_t batch = 1;
2666 std::vector<size_t> input_strides;
2667 std::vector<size_t> output_strides;
2668 size_t input_distance = 0;
2669 size_t output_distance = 0;
2670 layout::buffer_layout_t in_layout = layout::complex_interleaved;
2671 layout::buffer_layout_t out_layout = layout::complex_interleaved;
2672 placeness::placeness_t placeness = placeness::out_of_place;
2673 direction::direction_t direction = direction::backward;
2674
2675 data_pattern pattern = sawtooth;
2676 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2677 }
2678
TEST_F(accuracy_test_pow7_single,small_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved)2679 TEST_F(accuracy_test_pow7_single, small_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
2680 {
2681 try { small_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
2682 catch (const std::exception& err) { handle_exception(err); }
2683 }
2684
TEST_F(accuracy_test_pow7_double,small_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved)2685 TEST_F(accuracy_test_pow7_double, small_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
2686 {
2687 try { small_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
2688 catch (const std::exception& err) { handle_exception(err); }
2689 }
2690
2691 // *****************************************************
2692 // *****************************************************
2693 template< class T, class cl_T, class fftw_T >
small_2D_forward_out_of_place_complex_planar_to_complex_interleaved()2694 void small_2D_forward_out_of_place_complex_planar_to_complex_interleaved()
2695 {
2696 std::vector<size_t> lengths;
2697 lengths.push_back(small7);
2698 lengths.push_back(small7);
2699 size_t batch = 1;
2700 std::vector<size_t> input_strides;
2701 std::vector<size_t> output_strides;
2702 size_t input_distance = 0;
2703 size_t output_distance = 0;
2704 layout::buffer_layout_t in_layout = layout::complex_planar;
2705 layout::buffer_layout_t out_layout = layout::complex_interleaved;
2706 placeness::placeness_t placeness = placeness::out_of_place;
2707 direction::direction_t direction = direction::forward;
2708
2709 data_pattern pattern = sawtooth;
2710 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2711 }
2712
TEST_F(accuracy_test_pow7_single,small_2D_forward_out_of_place_complex_planar_to_complex_interleaved)2713 TEST_F(accuracy_test_pow7_single, small_2D_forward_out_of_place_complex_planar_to_complex_interleaved)
2714 {
2715 try { small_2D_forward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
2716 catch (const std::exception& err) { handle_exception(err); }
2717 }
2718
TEST_F(accuracy_test_pow7_double,small_2D_forward_out_of_place_complex_planar_to_complex_interleaved)2719 TEST_F(accuracy_test_pow7_double, small_2D_forward_out_of_place_complex_planar_to_complex_interleaved)
2720 {
2721 try { small_2D_forward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
2722 catch (const std::exception& err) { handle_exception(err); }
2723 }
2724
2725 // *****************************************************
2726 // *****************************************************
2727 template< class T, class cl_T, class fftw_T >
small_2D_backward_out_of_place_complex_planar_to_complex_interleaved()2728 void small_2D_backward_out_of_place_complex_planar_to_complex_interleaved()
2729 {
2730 std::vector<size_t> lengths;
2731 lengths.push_back(small7);
2732 lengths.push_back(small7);
2733 size_t batch = 1;
2734 std::vector<size_t> input_strides;
2735 std::vector<size_t> output_strides;
2736 size_t input_distance = 0;
2737 size_t output_distance = 0;
2738 layout::buffer_layout_t in_layout = layout::complex_planar;
2739 layout::buffer_layout_t out_layout = layout::complex_interleaved;
2740 placeness::placeness_t placeness = placeness::out_of_place;
2741 direction::direction_t direction = direction::backward;
2742
2743 data_pattern pattern = sawtooth;
2744 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2745 }
2746
TEST_F(accuracy_test_pow7_single,small_2D_backward_out_of_place_complex_planar_to_complex_interleaved)2747 TEST_F(accuracy_test_pow7_single, small_2D_backward_out_of_place_complex_planar_to_complex_interleaved)
2748 {
2749 try { small_2D_backward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
2750 catch (const std::exception& err) { handle_exception(err); }
2751 }
2752
TEST_F(accuracy_test_pow7_double,small_2D_backward_out_of_place_complex_planar_to_complex_interleaved)2753 TEST_F(accuracy_test_pow7_double, small_2D_backward_out_of_place_complex_planar_to_complex_interleaved)
2754 {
2755 try { small_2D_backward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
2756 catch (const std::exception& err) { handle_exception(err); }
2757 }
2758
2759 // *****************************************************
2760 // *****************************************************
2761 template< class T, class cl_T, class fftw_T >
small_2D_forward_out_of_place_complex_interleaved_to_complex_planar()2762 void small_2D_forward_out_of_place_complex_interleaved_to_complex_planar()
2763 {
2764 std::vector<size_t> lengths;
2765 lengths.push_back(small7);
2766 lengths.push_back(small7);
2767 size_t batch = 1;
2768 std::vector<size_t> input_strides;
2769 std::vector<size_t> output_strides;
2770 size_t input_distance = 0;
2771 size_t output_distance = 0;
2772 layout::buffer_layout_t in_layout = layout::complex_interleaved;
2773 layout::buffer_layout_t out_layout = layout::complex_planar;
2774 placeness::placeness_t placeness = placeness::out_of_place;
2775 direction::direction_t direction = direction::forward;
2776
2777 data_pattern pattern = sawtooth;
2778 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2779 }
2780
TEST_F(accuracy_test_pow7_single,small_2D_forward_out_of_place_complex_interleaved_to_complex_planar)2781 TEST_F(accuracy_test_pow7_single, small_2D_forward_out_of_place_complex_interleaved_to_complex_planar)
2782 {
2783 try { small_2D_forward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
2784 catch (const std::exception& err) { handle_exception(err); }
2785 }
2786
TEST_F(accuracy_test_pow7_double,small_2D_forward_out_of_place_complex_interleaved_to_complex_planar)2787 TEST_F(accuracy_test_pow7_double, small_2D_forward_out_of_place_complex_interleaved_to_complex_planar)
2788 {
2789 try { small_2D_forward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
2790 catch (const std::exception& err) { handle_exception(err); }
2791 }
2792
2793 // *****************************************************
2794 // *****************************************************
2795 template< class T, class cl_T, class fftw_T >
small_2D_backward_out_of_place_complex_interleaved_to_complex_planar()2796 void small_2D_backward_out_of_place_complex_interleaved_to_complex_planar()
2797 {
2798 std::vector<size_t> lengths;
2799 lengths.push_back(small7);
2800 lengths.push_back(small7);
2801 size_t batch = 1;
2802 std::vector<size_t> input_strides;
2803 std::vector<size_t> output_strides;
2804 size_t input_distance = 0;
2805 size_t output_distance = 0;
2806 layout::buffer_layout_t in_layout = layout::complex_interleaved;
2807 layout::buffer_layout_t out_layout = layout::complex_planar;
2808 placeness::placeness_t placeness = placeness::out_of_place;
2809 direction::direction_t direction = direction::backward;
2810
2811 data_pattern pattern = sawtooth;
2812 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
2813 }
2814
TEST_F(accuracy_test_pow7_single,small_2D_backward_out_of_place_complex_interleaved_to_complex_planar)2815 TEST_F(accuracy_test_pow7_single, small_2D_backward_out_of_place_complex_interleaved_to_complex_planar)
2816 {
2817 try { small_2D_backward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
2818 catch (const std::exception& err) { handle_exception(err); }
2819 }
2820
TEST_F(accuracy_test_pow7_double,small_2D_backward_out_of_place_complex_interleaved_to_complex_planar)2821 TEST_F(accuracy_test_pow7_double, small_2D_backward_out_of_place_complex_interleaved_to_complex_planar)
2822 {
2823 try { small_2D_backward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
2824 catch (const std::exception& err) { handle_exception(err); }
2825 }
2826
2827 // *****************************************************
2828 // *****************************************************
2829 template< class T, class cl_T, class fftw_T >
small_2D_in_place_real_to_hermitian_interleaved()2830 void small_2D_in_place_real_to_hermitian_interleaved()
2831 {
2832 std::vector<size_t> lengths;
2833 lengths.push_back(small7);
2834 lengths.push_back(small7);
2835 size_t batch = 1;
2836 std::vector<size_t> input_strides;
2837 std::vector<size_t> output_strides;
2838 size_t input_distance = 0;
2839 size_t output_distance = 0;
2840 layout::buffer_layout_t layout = layout::hermitian_interleaved;
2841 placeness::placeness_t placeness = placeness::in_place;
2842
2843 data_pattern pattern = sawtooth;
2844 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
2845 }
2846
TEST_F(accuracy_test_pow7_single,small_2D_in_place_real_to_hermitian_interleaved)2847 TEST_F(accuracy_test_pow7_single, small_2D_in_place_real_to_hermitian_interleaved)
2848 {
2849 try { small_2D_in_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
2850 catch (const std::exception& err) { handle_exception(err); }
2851 }
2852
TEST_F(accuracy_test_pow7_double,small_2D_in_place_real_to_hermitian_interleaved)2853 TEST_F(accuracy_test_pow7_double, small_2D_in_place_real_to_hermitian_interleaved)
2854 {
2855 try { small_2D_in_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
2856 catch (const std::exception& err) { handle_exception(err); }
2857 }
2858
2859 // *****************************************************
2860 // *****************************************************
2861 template< class T, class cl_T, class fftw_T >
small_2D_in_place_hermitian_interleaved_to_real()2862 void small_2D_in_place_hermitian_interleaved_to_real()
2863 {
2864 std::vector<size_t> lengths;
2865 lengths.push_back(small7);
2866 lengths.push_back(small7);
2867 size_t batch = 1;
2868 std::vector<size_t> input_strides;
2869 std::vector<size_t> output_strides;
2870 size_t input_distance = 0;
2871 size_t output_distance = 0;
2872 layout::buffer_layout_t layout = layout::hermitian_interleaved;
2873 placeness::placeness_t placeness = placeness::in_place;
2874
2875 data_pattern pattern = sawtooth;
2876 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
2877 }
2878
TEST_F(accuracy_test_pow7_single,small_2D_in_place_hermitian_interleaved_to_real)2879 TEST_F(accuracy_test_pow7_single, small_2D_in_place_hermitian_interleaved_to_real)
2880 {
2881 try { small_2D_in_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
2882 catch (const std::exception& err) { handle_exception(err); }
2883 }
2884
TEST_F(accuracy_test_pow7_double,small_2D_in_place_hermitian_interleaved_to_real)2885 TEST_F(accuracy_test_pow7_double, small_2D_in_place_hermitian_interleaved_to_real)
2886 {
2887 try { small_2D_in_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
2888 catch (const std::exception& err) { handle_exception(err); }
2889 }
2890
2891 // *****************************************************
2892 // *****************************************************
2893 template< class T, class cl_T, class fftw_T >
small_2D_out_of_place_real_to_hermitian_interleaved()2894 void small_2D_out_of_place_real_to_hermitian_interleaved()
2895 {
2896 std::vector<size_t> lengths;
2897 lengths.push_back(small7);
2898 lengths.push_back(small7);
2899 size_t batch = 1;
2900 std::vector<size_t> input_strides;
2901 std::vector<size_t> output_strides;
2902 size_t input_distance = 0;
2903 size_t output_distance = 0;
2904 layout::buffer_layout_t layout = layout::hermitian_interleaved;
2905 placeness::placeness_t placeness = placeness::out_of_place;
2906
2907 data_pattern pattern = sawtooth;
2908 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
2909 }
2910
TEST_F(accuracy_test_pow7_single,small_2D_out_of_place_real_to_hermitian_interleaved)2911 TEST_F(accuracy_test_pow7_single, small_2D_out_of_place_real_to_hermitian_interleaved)
2912 {
2913 try { small_2D_out_of_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
2914 catch (const std::exception& err) { handle_exception(err); }
2915 }
2916
TEST_F(accuracy_test_pow7_double,small_2D_out_of_place_real_to_hermitian_interleaved)2917 TEST_F(accuracy_test_pow7_double, small_2D_out_of_place_real_to_hermitian_interleaved)
2918 {
2919 try { small_2D_out_of_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
2920 catch (const std::exception& err) { handle_exception(err); }
2921 }
2922
2923 // *****************************************************
2924 // *****************************************************
2925 template< class T, class cl_T, class fftw_T >
small_2D_out_of_place_hermitian_interleaved_to_real()2926 void small_2D_out_of_place_hermitian_interleaved_to_real()
2927 {
2928 std::vector<size_t> lengths;
2929 lengths.push_back(small7);
2930 lengths.push_back(small7);
2931 size_t batch = 1;
2932 std::vector<size_t> input_strides;
2933 std::vector<size_t> output_strides;
2934 size_t input_distance = 0;
2935 size_t output_distance = 0;
2936 layout::buffer_layout_t layout = layout::hermitian_interleaved;
2937 placeness::placeness_t placeness = placeness::out_of_place;
2938
2939 data_pattern pattern = sawtooth;
2940 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
2941 }
2942
TEST_F(accuracy_test_pow7_single,small_2D_out_of_place_hermitian_interleaved_to_real)2943 TEST_F(accuracy_test_pow7_single, small_2D_out_of_place_hermitian_interleaved_to_real)
2944 {
2945 try { small_2D_out_of_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
2946 catch (const std::exception& err) { handle_exception(err); }
2947 }
2948
TEST_F(accuracy_test_pow7_double,small_2D_out_of_place_hermitian_interleaved_to_real)2949 TEST_F(accuracy_test_pow7_double, small_2D_out_of_place_hermitian_interleaved_to_real)
2950 {
2951 try { small_2D_out_of_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
2952 catch (const std::exception& err) { handle_exception(err); }
2953 }
2954
2955 // *****************************************************
2956 // *****************************************************
2957 template< class T, class cl_T, class fftw_T >
small_2D_out_of_place_real_to_hermitian_planar()2958 void small_2D_out_of_place_real_to_hermitian_planar()
2959 {
2960 std::vector<size_t> lengths;
2961 lengths.push_back(small7);
2962 lengths.push_back(small7);
2963 size_t batch = 1;
2964 std::vector<size_t> input_strides;
2965 std::vector<size_t> output_strides;
2966 size_t input_distance = 0;
2967 size_t output_distance = 0;
2968 layout::buffer_layout_t layout = layout::hermitian_planar;
2969 placeness::placeness_t placeness = placeness::out_of_place;
2970
2971 data_pattern pattern = sawtooth;
2972 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
2973 }
2974
TEST_F(accuracy_test_pow7_single,small_2D_out_of_place_real_to_hermitian_planar)2975 TEST_F(accuracy_test_pow7_single, small_2D_out_of_place_real_to_hermitian_planar)
2976 {
2977 try { small_2D_out_of_place_real_to_hermitian_planar< float, cl_float, fftwf_complex >(); }
2978 catch (const std::exception& err) { handle_exception(err); }
2979 }
2980
TEST_F(accuracy_test_pow7_double,small_2D_out_of_place_real_to_hermitian_planar)2981 TEST_F(accuracy_test_pow7_double, small_2D_out_of_place_real_to_hermitian_planar)
2982 {
2983 try { small_2D_out_of_place_real_to_hermitian_planar< double, cl_double, fftw_complex >(); }
2984 catch (const std::exception& err) { handle_exception(err); }
2985 }
2986
2987 // *****************************************************
2988 // *****************************************************
2989 template< class T, class cl_T, class fftw_T >
small_2D_out_of_place_hermitian_planar_to_real()2990 void small_2D_out_of_place_hermitian_planar_to_real()
2991 {
2992 std::vector<size_t> lengths;
2993 lengths.push_back(small7);
2994 lengths.push_back(small7);
2995 size_t batch = 1;
2996 std::vector<size_t> input_strides;
2997 std::vector<size_t> output_strides;
2998 size_t input_distance = 0;
2999 size_t output_distance = 0;
3000 layout::buffer_layout_t layout = layout::hermitian_planar;
3001 placeness::placeness_t placeness = placeness::out_of_place;
3002
3003 data_pattern pattern = sawtooth;
3004 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
3005 }
3006
TEST_F(accuracy_test_pow7_single,small_2D_out_of_place_hermitian_planar_to_real)3007 TEST_F(accuracy_test_pow7_single, small_2D_out_of_place_hermitian_planar_to_real)
3008 {
3009 try { small_2D_out_of_place_hermitian_planar_to_real< float, cl_float, fftwf_complex >(); }
3010 catch (const std::exception& err) { handle_exception(err); }
3011 }
3012
TEST_F(accuracy_test_pow7_double,small_2D_out_of_place_hermitian_planar_to_real)3013 TEST_F(accuracy_test_pow7_double, small_2D_out_of_place_hermitian_planar_to_real)
3014 {
3015 try { small_2D_out_of_place_hermitian_planar_to_real< double, cl_double, fftw_complex >(); }
3016 catch (const std::exception& err) { handle_exception(err); }
3017 }
3018
3019 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
3020 // ^^^^^^^^^^^^^^^^^^^^^^^ large 2D ^^^^^^^^^^^^^^^^^^^^^^^ //
3021 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
3022
3023 // *****************************************************
3024 // *****************************************************
3025 template< class T, class cl_T, class fftw_T >
large_2D_forward_in_place_complex_planar_to_complex_planar()3026 void large_2D_forward_in_place_complex_planar_to_complex_planar()
3027 {
3028 std::vector<size_t> lengths;
3029 lengths.push_back(MaxLength2D<T>(7));
3030 lengths.push_back(normal7);
3031 size_t batch = 1;
3032 std::vector<size_t> input_strides;
3033 std::vector<size_t> output_strides;
3034 size_t input_distance = 0;
3035 size_t output_distance = 0;
3036 layout::buffer_layout_t in_layout = layout::complex_planar;
3037 layout::buffer_layout_t out_layout = layout::complex_planar;
3038 placeness::placeness_t placeness = placeness::in_place;
3039 direction::direction_t direction = direction::forward;
3040
3041 data_pattern pattern = sawtooth;
3042 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3043 }
3044
TEST_F(accuracy_test_pow7_single,large_2D_forward_in_place_complex_planar_to_complex_planar)3045 TEST_F(accuracy_test_pow7_single, large_2D_forward_in_place_complex_planar_to_complex_planar)
3046 {
3047 try { large_2D_forward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
3048 catch (const std::exception& err) { handle_exception(err); }
3049 }
3050
TEST_F(accuracy_test_pow7_double,large_2D_forward_in_place_complex_planar_to_complex_planar)3051 TEST_F(accuracy_test_pow7_double, large_2D_forward_in_place_complex_planar_to_complex_planar)
3052 {
3053 try { large_2D_forward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
3054 catch (const std::exception& err) { handle_exception(err); }
3055 }
3056
3057 // *****************************************************
3058 // *****************************************************
3059 template< class T, class cl_T, class fftw_T >
large_2D_backward_in_place_complex_planar_to_complex_planar()3060 void large_2D_backward_in_place_complex_planar_to_complex_planar()
3061 {
3062 std::vector<size_t> lengths;
3063 lengths.push_back(MaxLength2D<T>(7));
3064 lengths.push_back(normal7);
3065 size_t batch = 1;
3066 std::vector<size_t> input_strides;
3067 std::vector<size_t> output_strides;
3068 size_t input_distance = 0;
3069 size_t output_distance = 0;
3070 layout::buffer_layout_t in_layout = layout::complex_planar;
3071 layout::buffer_layout_t out_layout = layout::complex_planar;
3072 placeness::placeness_t placeness = placeness::in_place;
3073 direction::direction_t direction = direction::backward;
3074
3075 data_pattern pattern = sawtooth;
3076 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3077 }
3078
TEST_F(accuracy_test_pow7_single,large_2D_backward_in_place_complex_planar_to_complex_planar)3079 TEST_F(accuracy_test_pow7_single, large_2D_backward_in_place_complex_planar_to_complex_planar)
3080 {
3081 try { large_2D_backward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
3082 catch (const std::exception& err) { handle_exception(err); }
3083 }
3084
TEST_F(accuracy_test_pow7_double,large_2D_backward_in_place_complex_planar_to_complex_planar)3085 TEST_F(accuracy_test_pow7_double, large_2D_backward_in_place_complex_planar_to_complex_planar)
3086 {
3087 try { large_2D_backward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
3088 catch (const std::exception& err) { handle_exception(err); }
3089 }
3090
3091 // *****************************************************
3092 // *****************************************************
3093 template< class T, class cl_T, class fftw_T >
large_2D_forward_in_place_complex_interleaved_to_complex_interleaved()3094 void large_2D_forward_in_place_complex_interleaved_to_complex_interleaved()
3095 {
3096 std::vector<size_t> lengths;
3097 lengths.push_back(MaxLength2D<T>(7));
3098 lengths.push_back(normal7);
3099 size_t batch = 1;
3100 std::vector<size_t> input_strides;
3101 std::vector<size_t> output_strides;
3102 size_t input_distance = 0;
3103 size_t output_distance = 0;
3104 layout::buffer_layout_t in_layout = layout::complex_interleaved;
3105 layout::buffer_layout_t out_layout = layout::complex_interleaved;
3106 placeness::placeness_t placeness = placeness::in_place;
3107 direction::direction_t direction = direction::forward;
3108
3109 data_pattern pattern = sawtooth;
3110 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3111 }
3112
TEST_F(accuracy_test_pow7_single,large_2D_forward_in_place_complex_interleaved_to_complex_interleaved)3113 TEST_F(accuracy_test_pow7_single, large_2D_forward_in_place_complex_interleaved_to_complex_interleaved)
3114 {
3115 try { large_2D_forward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
3116 catch (const std::exception& err) { handle_exception(err); }
3117 }
3118
TEST_F(accuracy_test_pow7_double,large_2D_forward_in_place_complex_interleaved_to_complex_interleaved)3119 TEST_F(accuracy_test_pow7_double, large_2D_forward_in_place_complex_interleaved_to_complex_interleaved)
3120 {
3121 try { large_2D_forward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
3122 catch (const std::exception& err) { handle_exception(err); }
3123 }
3124
3125 // *****************************************************
3126 // *****************************************************
3127 template< class T, class cl_T, class fftw_T >
large_2D_backward_in_place_complex_interleaved_to_complex_interleaved()3128 void large_2D_backward_in_place_complex_interleaved_to_complex_interleaved()
3129 {
3130 std::vector<size_t> lengths;
3131 lengths.push_back(MaxLength2D<T>(7));
3132 lengths.push_back(normal7);
3133 size_t batch = 1;
3134 std::vector<size_t> input_strides;
3135 std::vector<size_t> output_strides;
3136 size_t input_distance = 0;
3137 size_t output_distance = 0;
3138 layout::buffer_layout_t in_layout = layout::complex_interleaved;
3139 layout::buffer_layout_t out_layout = layout::complex_interleaved;
3140 placeness::placeness_t placeness = placeness::in_place;
3141 direction::direction_t direction = direction::backward;
3142
3143 data_pattern pattern = sawtooth;
3144 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3145 }
3146
TEST_F(accuracy_test_pow7_single,large_2D_backward_in_place_complex_interleaved_to_complex_interleaved)3147 TEST_F(accuracy_test_pow7_single, large_2D_backward_in_place_complex_interleaved_to_complex_interleaved)
3148 {
3149 try { large_2D_backward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
3150 catch (const std::exception& err) { handle_exception(err); }
3151 }
3152
TEST_F(accuracy_test_pow7_double,large_2D_backward_in_place_complex_interleaved_to_complex_interleaved)3153 TEST_F(accuracy_test_pow7_double, large_2D_backward_in_place_complex_interleaved_to_complex_interleaved)
3154 {
3155 try { large_2D_backward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
3156 catch (const std::exception& err) { handle_exception(err); }
3157 }
3158
3159 // *****************************************************
3160 // *****************************************************
3161 template< class T, class cl_T, class fftw_T >
large_2D_forward_out_of_place_complex_planar_to_complex_planar()3162 void large_2D_forward_out_of_place_complex_planar_to_complex_planar()
3163 {
3164 std::vector<size_t> lengths;
3165 lengths.push_back(MaxLength2D<T>(7));
3166 lengths.push_back(normal7);
3167 size_t batch = 1;
3168 std::vector<size_t> input_strides;
3169 std::vector<size_t> output_strides;
3170 size_t input_distance = 0;
3171 size_t output_distance = 0;
3172 layout::buffer_layout_t in_layout = layout::complex_planar;
3173 layout::buffer_layout_t out_layout = layout::complex_planar;
3174 placeness::placeness_t placeness = placeness::out_of_place;
3175 direction::direction_t direction = direction::forward;
3176
3177 data_pattern pattern = sawtooth;
3178 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3179 }
3180
TEST_F(accuracy_test_pow7_single,large_2D_forward_out_of_place_complex_planar_to_complex_planar)3181 TEST_F(accuracy_test_pow7_single, large_2D_forward_out_of_place_complex_planar_to_complex_planar)
3182 {
3183 try { large_2D_forward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
3184 catch (const std::exception& err) { handle_exception(err); }
3185 }
3186
TEST_F(accuracy_test_pow7_double,large_2D_forward_out_of_place_complex_planar_to_complex_planar)3187 TEST_F(accuracy_test_pow7_double, large_2D_forward_out_of_place_complex_planar_to_complex_planar)
3188 {
3189 try { large_2D_forward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
3190 catch (const std::exception& err) { handle_exception(err); }
3191 }
3192
3193 // *****************************************************
3194 // *****************************************************
3195 template< class T, class cl_T, class fftw_T >
large_2D_backward_out_of_place_complex_planar_to_complex_planar()3196 void large_2D_backward_out_of_place_complex_planar_to_complex_planar()
3197 {
3198 std::vector<size_t> lengths;
3199 lengths.push_back(MaxLength2D<T>(7));
3200 lengths.push_back(normal7);
3201 size_t batch = 1;
3202 std::vector<size_t> input_strides;
3203 std::vector<size_t> output_strides;
3204 size_t input_distance = 0;
3205 size_t output_distance = 0;
3206 layout::buffer_layout_t in_layout = layout::complex_planar;
3207 layout::buffer_layout_t out_layout = layout::complex_planar;
3208 placeness::placeness_t placeness = placeness::out_of_place;
3209 direction::direction_t direction = direction::backward;
3210
3211 data_pattern pattern = sawtooth;
3212 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3213 }
3214
TEST_F(accuracy_test_pow7_single,large_2D_backward_out_of_place_complex_planar_to_complex_planar)3215 TEST_F(accuracy_test_pow7_single, large_2D_backward_out_of_place_complex_planar_to_complex_planar)
3216 {
3217 try { large_2D_backward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
3218 catch (const std::exception& err) { handle_exception(err); }
3219 }
3220
TEST_F(accuracy_test_pow7_double,large_2D_backward_out_of_place_complex_planar_to_complex_planar)3221 TEST_F(accuracy_test_pow7_double, large_2D_backward_out_of_place_complex_planar_to_complex_planar)
3222 {
3223 try { large_2D_backward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
3224 catch (const std::exception& err) { handle_exception(err); }
3225 }
3226
3227 // *****************************************************
3228 // *****************************************************
3229 template< class T, class cl_T, class fftw_T >
large_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved()3230 void large_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved()
3231 {
3232 std::vector<size_t> lengths;
3233 lengths.push_back(MaxLength2D<T>(7));
3234 lengths.push_back(normal7);
3235 size_t batch = 1;
3236 std::vector<size_t> input_strides;
3237 std::vector<size_t> output_strides;
3238 size_t input_distance = 0;
3239 size_t output_distance = 0;
3240 layout::buffer_layout_t in_layout = layout::complex_interleaved;
3241 layout::buffer_layout_t out_layout = layout::complex_interleaved;
3242 placeness::placeness_t placeness = placeness::out_of_place;
3243 direction::direction_t direction = direction::forward;
3244
3245 data_pattern pattern = sawtooth;
3246 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3247 }
3248
TEST_F(accuracy_test_pow7_single,large_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved)3249 TEST_F(accuracy_test_pow7_single, large_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
3250 {
3251 try { large_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
3252 catch (const std::exception& err) { handle_exception(err); }
3253 }
3254
TEST_F(accuracy_test_pow7_double,large_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved)3255 TEST_F(accuracy_test_pow7_double, large_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
3256 {
3257 try { large_2D_forward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
3258 catch (const std::exception& err) { handle_exception(err); }
3259 }
3260
3261 // *****************************************************
3262 // *****************************************************
3263 template< class T, class cl_T, class fftw_T >
large_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved()3264 void large_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved()
3265 {
3266 std::vector<size_t> lengths;
3267 lengths.push_back(MaxLength2D<T>(7));
3268 lengths.push_back(normal7);
3269 size_t batch = 1;
3270 std::vector<size_t> input_strides;
3271 std::vector<size_t> output_strides;
3272 size_t input_distance = 0;
3273 size_t output_distance = 0;
3274 layout::buffer_layout_t in_layout = layout::complex_interleaved;
3275 layout::buffer_layout_t out_layout = layout::complex_interleaved;
3276 placeness::placeness_t placeness = placeness::out_of_place;
3277 direction::direction_t direction = direction::backward;
3278
3279 data_pattern pattern = sawtooth;
3280 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3281 }
3282
TEST_F(accuracy_test_pow7_single,large_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved)3283 TEST_F(accuracy_test_pow7_single, large_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
3284 {
3285 try { large_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
3286 catch (const std::exception& err) { handle_exception(err); }
3287 }
3288
TEST_F(accuracy_test_pow7_double,large_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved)3289 TEST_F(accuracy_test_pow7_double, large_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
3290 {
3291 try { large_2D_backward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
3292 catch (const std::exception& err) { handle_exception(err); }
3293 }
3294
3295 // *****************************************************
3296 // *****************************************************
3297 template< class T, class cl_T, class fftw_T >
large_2D_forward_out_of_place_complex_planar_to_complex_interleaved()3298 void large_2D_forward_out_of_place_complex_planar_to_complex_interleaved()
3299 {
3300 std::vector<size_t> lengths;
3301 lengths.push_back(MaxLength2D<T>(7));
3302 lengths.push_back(normal7);
3303 size_t batch = 1;
3304 std::vector<size_t> input_strides;
3305 std::vector<size_t> output_strides;
3306 size_t input_distance = 0;
3307 size_t output_distance = 0;
3308 layout::buffer_layout_t in_layout = layout::complex_planar;
3309 layout::buffer_layout_t out_layout = layout::complex_interleaved;
3310 placeness::placeness_t placeness = placeness::out_of_place;
3311 direction::direction_t direction = direction::forward;
3312
3313 data_pattern pattern = sawtooth;
3314 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3315 }
3316
TEST_F(accuracy_test_pow7_single,large_2D_forward_out_of_place_complex_planar_to_complex_interleaved)3317 TEST_F(accuracy_test_pow7_single, large_2D_forward_out_of_place_complex_planar_to_complex_interleaved)
3318 {
3319 try { large_2D_forward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
3320 catch (const std::exception& err) { handle_exception(err); }
3321 }
3322
TEST_F(accuracy_test_pow7_double,large_2D_forward_out_of_place_complex_planar_to_complex_interleaved)3323 TEST_F(accuracy_test_pow7_double, large_2D_forward_out_of_place_complex_planar_to_complex_interleaved)
3324 {
3325 try { large_2D_forward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
3326 catch (const std::exception& err) { handle_exception(err); }
3327 }
3328
3329 // *****************************************************
3330 // *****************************************************
3331 template< class T, class cl_T, class fftw_T >
large_2D_backward_out_of_place_complex_planar_to_complex_interleaved()3332 void large_2D_backward_out_of_place_complex_planar_to_complex_interleaved()
3333 {
3334 std::vector<size_t> lengths;
3335 lengths.push_back(MaxLength2D<T>(7));
3336 lengths.push_back(normal7);
3337 size_t batch = 1;
3338 std::vector<size_t> input_strides;
3339 std::vector<size_t> output_strides;
3340 size_t input_distance = 0;
3341 size_t output_distance = 0;
3342 layout::buffer_layout_t in_layout = layout::complex_planar;
3343 layout::buffer_layout_t out_layout = layout::complex_interleaved;
3344 placeness::placeness_t placeness = placeness::out_of_place;
3345 direction::direction_t direction = direction::backward;
3346
3347 data_pattern pattern = sawtooth;
3348 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3349 }
3350
TEST_F(accuracy_test_pow7_single,large_2D_backward_out_of_place_complex_planar_to_complex_interleaved)3351 TEST_F(accuracy_test_pow7_single, large_2D_backward_out_of_place_complex_planar_to_complex_interleaved)
3352 {
3353 try { large_2D_backward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
3354 catch (const std::exception& err) { handle_exception(err); }
3355 }
3356
TEST_F(accuracy_test_pow7_double,large_2D_backward_out_of_place_complex_planar_to_complex_interleaved)3357 TEST_F(accuracy_test_pow7_double, large_2D_backward_out_of_place_complex_planar_to_complex_interleaved)
3358 {
3359 try { large_2D_backward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
3360 catch (const std::exception& err) { handle_exception(err); }
3361 }
3362
3363 // *****************************************************
3364 // *****************************************************
3365 template< class T, class cl_T, class fftw_T >
large_2D_forward_out_of_place_complex_interleaved_to_complex_planar()3366 void large_2D_forward_out_of_place_complex_interleaved_to_complex_planar()
3367 {
3368 std::vector<size_t> lengths;
3369 lengths.push_back(MaxLength2D<T>(7));
3370 lengths.push_back(normal7);
3371 size_t batch = 1;
3372 std::vector<size_t> input_strides;
3373 std::vector<size_t> output_strides;
3374 size_t input_distance = 0;
3375 size_t output_distance = 0;
3376 layout::buffer_layout_t in_layout = layout::complex_interleaved;
3377 layout::buffer_layout_t out_layout = layout::complex_planar;
3378 placeness::placeness_t placeness = placeness::out_of_place;
3379 direction::direction_t direction = direction::forward;
3380
3381 data_pattern pattern = sawtooth;
3382 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3383 }
3384
TEST_F(accuracy_test_pow7_single,large_2D_forward_out_of_place_complex_interleaved_to_complex_planar)3385 TEST_F(accuracy_test_pow7_single, large_2D_forward_out_of_place_complex_interleaved_to_complex_planar)
3386 {
3387 try { large_2D_forward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
3388 catch (const std::exception& err) { handle_exception(err); }
3389 }
3390
TEST_F(accuracy_test_pow7_double,large_2D_forward_out_of_place_complex_interleaved_to_complex_planar)3391 TEST_F(accuracy_test_pow7_double, large_2D_forward_out_of_place_complex_interleaved_to_complex_planar)
3392 {
3393 try { large_2D_forward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
3394 catch (const std::exception& err) { handle_exception(err); }
3395 }
3396
3397 // *****************************************************
3398 // *****************************************************
3399 template< class T, class cl_T, class fftw_T >
large_2D_backward_out_of_place_complex_interleaved_to_complex_planar()3400 void large_2D_backward_out_of_place_complex_interleaved_to_complex_planar()
3401 {
3402 std::vector<size_t> lengths;
3403 lengths.push_back(MaxLength2D<T>(7));
3404 lengths.push_back(normal7);
3405 size_t batch = 1;
3406 std::vector<size_t> input_strides;
3407 std::vector<size_t> output_strides;
3408 size_t input_distance = 0;
3409 size_t output_distance = 0;
3410 layout::buffer_layout_t in_layout = layout::complex_interleaved;
3411 layout::buffer_layout_t out_layout = layout::complex_planar;
3412 placeness::placeness_t placeness = placeness::out_of_place;
3413 direction::direction_t direction = direction::backward;
3414
3415 data_pattern pattern = sawtooth;
3416 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3417 }
3418
TEST_F(accuracy_test_pow7_single,large_2D_backward_out_of_place_complex_interleaved_to_complex_planar)3419 TEST_F(accuracy_test_pow7_single, large_2D_backward_out_of_place_complex_interleaved_to_complex_planar)
3420 {
3421 try { large_2D_backward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
3422 catch (const std::exception& err) { handle_exception(err); }
3423 }
3424
TEST_F(accuracy_test_pow7_double,large_2D_backward_out_of_place_complex_interleaved_to_complex_planar)3425 TEST_F(accuracy_test_pow7_double, large_2D_backward_out_of_place_complex_interleaved_to_complex_planar)
3426 {
3427 try { large_2D_backward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
3428 catch (const std::exception& err) { handle_exception(err); }
3429 }
3430
3431 // *****************************************************
3432 // *****************************************************
3433 template< class T, class cl_T, class fftw_T >
large_2D_in_place_real_to_hermitian_interleaved()3434 void large_2D_in_place_real_to_hermitian_interleaved()
3435 {
3436 std::vector<size_t> lengths;
3437 lengths.push_back(MaxLength2D<T>(7));
3438 lengths.push_back(normal7);
3439 size_t batch = 1;
3440 std::vector<size_t> input_strides;
3441 std::vector<size_t> output_strides;
3442 size_t input_distance = 0;
3443 size_t output_distance = 0;
3444 layout::buffer_layout_t layout = layout::hermitian_interleaved;
3445 placeness::placeness_t placeness = placeness::in_place;
3446
3447 data_pattern pattern = sawtooth;
3448 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
3449 }
3450
TEST_F(accuracy_test_pow7_single,large_2D_in_place_real_to_hermitian_interleaved)3451 TEST_F(accuracy_test_pow7_single, large_2D_in_place_real_to_hermitian_interleaved)
3452 {
3453 try { large_2D_in_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
3454 catch (const std::exception& err) { handle_exception(err); }
3455 }
3456
TEST_F(accuracy_test_pow7_double,large_2D_in_place_real_to_hermitian_interleaved)3457 TEST_F(accuracy_test_pow7_double, large_2D_in_place_real_to_hermitian_interleaved)
3458 {
3459 try { large_2D_in_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
3460 catch (const std::exception& err) { handle_exception(err); }
3461 }
3462
3463 // *****************************************************
3464 // *****************************************************
3465 template< class T, class cl_T, class fftw_T >
large_2D_in_place_hermitian_interleaved_to_real()3466 void large_2D_in_place_hermitian_interleaved_to_real()
3467 {
3468 std::vector<size_t> lengths;
3469 lengths.push_back(MaxLength2D<T>(7));
3470 lengths.push_back(normal7);
3471 size_t batch = 1;
3472 std::vector<size_t> input_strides;
3473 std::vector<size_t> output_strides;
3474 size_t input_distance = 0;
3475 size_t output_distance = 0;
3476 layout::buffer_layout_t layout = layout::hermitian_interleaved;
3477 placeness::placeness_t placeness = placeness::in_place;
3478
3479 data_pattern pattern = sawtooth;
3480 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
3481 }
3482
TEST_F(accuracy_test_pow7_single,large_2D_in_place_hermitian_interleaved_to_real)3483 TEST_F(accuracy_test_pow7_single, large_2D_in_place_hermitian_interleaved_to_real)
3484 {
3485 try { large_2D_in_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
3486 catch (const std::exception& err) { handle_exception(err); }
3487 }
3488
TEST_F(accuracy_test_pow7_double,large_2D_in_place_hermitian_interleaved_to_real)3489 TEST_F(accuracy_test_pow7_double, large_2D_in_place_hermitian_interleaved_to_real)
3490 {
3491 try { large_2D_in_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
3492 catch (const std::exception& err) { handle_exception(err); }
3493 }
3494
3495 // *****************************************************
3496 // *****************************************************
3497 template< class T, class cl_T, class fftw_T >
large_2D_out_of_place_real_to_hermitian_interleaved()3498 void large_2D_out_of_place_real_to_hermitian_interleaved()
3499 {
3500 std::vector<size_t> lengths;
3501 lengths.push_back(MaxLength2D<T>(7));
3502 lengths.push_back(normal7);
3503 size_t batch = 1;
3504 std::vector<size_t> input_strides;
3505 std::vector<size_t> output_strides;
3506 size_t input_distance = 0;
3507 size_t output_distance = 0;
3508 layout::buffer_layout_t layout = layout::hermitian_interleaved;
3509 placeness::placeness_t placeness = placeness::out_of_place;
3510
3511 data_pattern pattern = sawtooth;
3512 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
3513 }
3514
TEST_F(accuracy_test_pow7_single,large_2D_out_of_place_real_to_hermitian_interleaved)3515 TEST_F(accuracy_test_pow7_single, large_2D_out_of_place_real_to_hermitian_interleaved)
3516 {
3517 try { large_2D_out_of_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
3518 catch (const std::exception& err) { handle_exception(err); }
3519 }
3520
TEST_F(accuracy_test_pow7_double,large_2D_out_of_place_real_to_hermitian_interleaved)3521 TEST_F(accuracy_test_pow7_double, large_2D_out_of_place_real_to_hermitian_interleaved)
3522 {
3523 try { large_2D_out_of_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
3524 catch (const std::exception& err) { handle_exception(err); }
3525 }
3526
3527 // *****************************************************
3528 // *****************************************************
3529 template< class T, class cl_T, class fftw_T >
large_2D_out_of_place_hermitian_interleaved_to_real()3530 void large_2D_out_of_place_hermitian_interleaved_to_real()
3531 {
3532 std::vector<size_t> lengths;
3533 lengths.push_back(MaxLength2D<T>(7));
3534 lengths.push_back(normal7);
3535 size_t batch = 1;
3536 std::vector<size_t> input_strides;
3537 std::vector<size_t> output_strides;
3538 size_t input_distance = 0;
3539 size_t output_distance = 0;
3540 layout::buffer_layout_t layout = layout::hermitian_interleaved;
3541 placeness::placeness_t placeness = placeness::out_of_place;
3542
3543 data_pattern pattern = sawtooth;
3544 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
3545 }
3546
TEST_F(accuracy_test_pow7_single,large_2D_out_of_place_hermitian_interleaved_to_real)3547 TEST_F(accuracy_test_pow7_single, large_2D_out_of_place_hermitian_interleaved_to_real)
3548 {
3549 try { large_2D_out_of_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
3550 catch (const std::exception& err) { handle_exception(err); }
3551 }
3552
TEST_F(accuracy_test_pow7_double,large_2D_out_of_place_hermitian_interleaved_to_real)3553 TEST_F(accuracy_test_pow7_double, large_2D_out_of_place_hermitian_interleaved_to_real)
3554 {
3555 try { large_2D_out_of_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
3556 catch (const std::exception& err) { handle_exception(err); }
3557 }
3558
3559 // *****************************************************
3560 // *****************************************************
3561 template< class T, class cl_T, class fftw_T >
large_2D_out_of_place_real_to_hermitian_planar()3562 void large_2D_out_of_place_real_to_hermitian_planar()
3563 {
3564 std::vector<size_t> lengths;
3565 lengths.push_back(MaxLength2D<T>(7));
3566 lengths.push_back(normal7);
3567 size_t batch = 1;
3568 std::vector<size_t> input_strides;
3569 std::vector<size_t> output_strides;
3570 size_t input_distance = 0;
3571 size_t output_distance = 0;
3572 layout::buffer_layout_t layout = layout::hermitian_planar;
3573 placeness::placeness_t placeness = placeness::out_of_place;
3574
3575 data_pattern pattern = sawtooth;
3576 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
3577 }
3578
TEST_F(accuracy_test_pow7_single,large_2D_out_of_place_real_to_hermitian_planar)3579 TEST_F(accuracy_test_pow7_single, large_2D_out_of_place_real_to_hermitian_planar)
3580 {
3581 try { large_2D_out_of_place_real_to_hermitian_planar< float, cl_float, fftwf_complex >(); }
3582 catch (const std::exception& err) { handle_exception(err); }
3583 }
3584
TEST_F(accuracy_test_pow7_double,large_2D_out_of_place_real_to_hermitian_planar)3585 TEST_F(accuracy_test_pow7_double, large_2D_out_of_place_real_to_hermitian_planar)
3586 {
3587 try { large_2D_out_of_place_real_to_hermitian_planar< double, cl_double, fftw_complex >(); }
3588 catch (const std::exception& err) { handle_exception(err); }
3589 }
3590
3591 // *****************************************************
3592 // *****************************************************
3593 template< class T, class cl_T, class fftw_T >
large_2D_out_of_place_hermitian_planar_to_real()3594 void large_2D_out_of_place_hermitian_planar_to_real()
3595 {
3596 std::vector<size_t> lengths;
3597 lengths.push_back(MaxLength2D<T>(7));
3598 lengths.push_back(normal7);
3599 size_t batch = 1;
3600 std::vector<size_t> input_strides;
3601 std::vector<size_t> output_strides;
3602 size_t input_distance = 0;
3603 size_t output_distance = 0;
3604 layout::buffer_layout_t layout = layout::hermitian_planar;
3605 placeness::placeness_t placeness = placeness::out_of_place;
3606
3607 data_pattern pattern = sawtooth;
3608 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
3609 }
3610
TEST_F(accuracy_test_pow7_single,large_2D_out_of_place_hermitian_planar_to_real)3611 TEST_F(accuracy_test_pow7_single, large_2D_out_of_place_hermitian_planar_to_real)
3612 {
3613 try { large_2D_out_of_place_hermitian_planar_to_real< float, cl_float, fftwf_complex >(); }
3614 catch (const std::exception& err) { handle_exception(err); }
3615 }
3616
TEST_F(accuracy_test_pow7_double,large_2D_out_of_place_hermitian_planar_to_real)3617 TEST_F(accuracy_test_pow7_double, large_2D_out_of_place_hermitian_planar_to_real)
3618 {
3619 try { large_2D_out_of_place_hermitian_planar_to_real< double, cl_double, fftw_complex >(); }
3620 catch (const std::exception& err) { handle_exception(err); }
3621 }
3622
3623 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
3624 // ^^^^^^^^^^^^^^^^^^^^^^^ normal 3D ^^^^^^^^^^^^^^^^^^^^^^ //
3625 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
3626
3627 // *****************************************************
3628 // *****************************************************
3629 template< class T, class cl_T, class fftw_T >
normal_3D_forward_in_place_complex_planar_to_complex_planar()3630 void normal_3D_forward_in_place_complex_planar_to_complex_planar()
3631 {
3632 std::vector<size_t> lengths;
3633 lengths.push_back(normal7);
3634 lengths.push_back(small7);
3635 lengths.push_back(small7);
3636 size_t batch = 1;
3637 std::vector<size_t> input_strides;
3638 std::vector<size_t> output_strides;
3639 size_t input_distance = 0;
3640 size_t output_distance = 0;
3641 layout::buffer_layout_t in_layout = layout::complex_planar;
3642 layout::buffer_layout_t out_layout = layout::complex_planar;
3643 placeness::placeness_t placeness = placeness::in_place;
3644 direction::direction_t direction = direction::forward;
3645
3646 data_pattern pattern = sawtooth;
3647 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3648 }
3649
TEST_F(accuracy_test_pow7_single,normal_3D_forward_in_place_complex_planar_to_complex_planar)3650 TEST_F(accuracy_test_pow7_single, normal_3D_forward_in_place_complex_planar_to_complex_planar)
3651 {
3652 try { normal_3D_forward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
3653 catch (const std::exception& err) { handle_exception(err); }
3654 }
3655
TEST_F(accuracy_test_pow7_double,normal_3D_forward_in_place_complex_planar_to_complex_planar)3656 TEST_F(accuracy_test_pow7_double, normal_3D_forward_in_place_complex_planar_to_complex_planar)
3657 {
3658 try { normal_3D_forward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
3659 catch (const std::exception& err) { handle_exception(err); }
3660 }
3661
3662 // *****************************************************
3663 // *****************************************************
3664 template< class T, class cl_T, class fftw_T >
normal_3D_backward_in_place_complex_planar_to_complex_planar()3665 void normal_3D_backward_in_place_complex_planar_to_complex_planar()
3666 {
3667 std::vector<size_t> lengths;
3668 lengths.push_back(normal7);
3669 lengths.push_back(small7);
3670 lengths.push_back(small7);
3671 size_t batch = 1;
3672 std::vector<size_t> input_strides;
3673 std::vector<size_t> output_strides;
3674 size_t input_distance = 0;
3675 size_t output_distance = 0;
3676 layout::buffer_layout_t in_layout = layout::complex_planar;
3677 layout::buffer_layout_t out_layout = layout::complex_planar;
3678 placeness::placeness_t placeness = placeness::in_place;
3679 direction::direction_t direction = direction::backward;
3680
3681 data_pattern pattern = sawtooth;
3682 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3683 }
3684
TEST_F(accuracy_test_pow7_single,normal_3D_backward_in_place_complex_planar_to_complex_planar)3685 TEST_F(accuracy_test_pow7_single, normal_3D_backward_in_place_complex_planar_to_complex_planar)
3686 {
3687 try { normal_3D_backward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
3688 catch (const std::exception& err) { handle_exception(err); }
3689 }
3690
TEST_F(accuracy_test_pow7_double,normal_3D_backward_in_place_complex_planar_to_complex_planar)3691 TEST_F(accuracy_test_pow7_double, normal_3D_backward_in_place_complex_planar_to_complex_planar)
3692 {
3693 try { normal_3D_backward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
3694 catch (const std::exception& err) { handle_exception(err); }
3695 }
3696
3697 // *****************************************************
3698 // *****************************************************
3699 template< class T, class cl_T, class fftw_T >
normal_3D_forward_in_place_complex_interleaved_to_complex_interleaved()3700 void normal_3D_forward_in_place_complex_interleaved_to_complex_interleaved()
3701 {
3702 std::vector<size_t> lengths;
3703 lengths.push_back(normal7);
3704 lengths.push_back(small7);
3705 lengths.push_back(small7);
3706 size_t batch = 1;
3707 std::vector<size_t> input_strides;
3708 std::vector<size_t> output_strides;
3709 size_t input_distance = 0;
3710 size_t output_distance = 0;
3711 layout::buffer_layout_t in_layout = layout::complex_interleaved;
3712 layout::buffer_layout_t out_layout = layout::complex_interleaved;
3713 placeness::placeness_t placeness = placeness::in_place;
3714 direction::direction_t direction = direction::forward;
3715
3716 data_pattern pattern = sawtooth;
3717 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3718 }
3719
TEST_F(accuracy_test_pow7_single,normal_3D_forward_in_place_complex_interleaved_to_complex_interleaved)3720 TEST_F(accuracy_test_pow7_single, normal_3D_forward_in_place_complex_interleaved_to_complex_interleaved)
3721 {
3722 try { normal_3D_forward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
3723 catch (const std::exception& err) { handle_exception(err); }
3724 }
3725
TEST_F(accuracy_test_pow7_double,normal_3D_forward_in_place_complex_interleaved_to_complex_interleaved)3726 TEST_F(accuracy_test_pow7_double, normal_3D_forward_in_place_complex_interleaved_to_complex_interleaved)
3727 {
3728 try { normal_3D_forward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
3729 catch (const std::exception& err) { handle_exception(err); }
3730 }
3731
3732 // *****************************************************
3733 // *****************************************************
3734 template< class T, class cl_T, class fftw_T >
normal_3D_backward_in_place_complex_interleaved_to_complex_interleaved()3735 void normal_3D_backward_in_place_complex_interleaved_to_complex_interleaved()
3736 {
3737 std::vector<size_t> lengths;
3738 lengths.push_back(normal7);
3739 lengths.push_back(small7);
3740 lengths.push_back(small7);
3741 size_t batch = 1;
3742 std::vector<size_t> input_strides;
3743 std::vector<size_t> output_strides;
3744 size_t input_distance = 0;
3745 size_t output_distance = 0;
3746 layout::buffer_layout_t in_layout = layout::complex_interleaved;
3747 layout::buffer_layout_t out_layout = layout::complex_interleaved;
3748 placeness::placeness_t placeness = placeness::in_place;
3749 direction::direction_t direction = direction::backward;
3750
3751 data_pattern pattern = sawtooth;
3752 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3753 }
3754
TEST_F(accuracy_test_pow7_single,normal_3D_backward_in_place_complex_interleaved_to_complex_interleaved)3755 TEST_F(accuracy_test_pow7_single, normal_3D_backward_in_place_complex_interleaved_to_complex_interleaved)
3756 {
3757 try { normal_3D_backward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
3758 catch (const std::exception& err) { handle_exception(err); }
3759 }
3760
TEST_F(accuracy_test_pow7_double,normal_3D_backward_in_place_complex_interleaved_to_complex_interleaved)3761 TEST_F(accuracy_test_pow7_double, normal_3D_backward_in_place_complex_interleaved_to_complex_interleaved)
3762 {
3763 try { normal_3D_backward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
3764 catch (const std::exception& err) { handle_exception(err); }
3765 }
3766
3767 // *****************************************************
3768 // *****************************************************
3769 template< class T, class cl_T, class fftw_T >
normal_3D_forward_out_of_place_complex_planar_to_complex_planar()3770 void normal_3D_forward_out_of_place_complex_planar_to_complex_planar()
3771 {
3772 std::vector<size_t> lengths;
3773 lengths.push_back(normal7);
3774 lengths.push_back(small7);
3775 lengths.push_back(small7);
3776 size_t batch = 1;
3777 std::vector<size_t> input_strides;
3778 std::vector<size_t> output_strides;
3779 size_t input_distance = 0;
3780 size_t output_distance = 0;
3781 layout::buffer_layout_t in_layout = layout::complex_planar;
3782 layout::buffer_layout_t out_layout = layout::complex_planar;
3783 placeness::placeness_t placeness = placeness::out_of_place;
3784 direction::direction_t direction = direction::forward;
3785
3786 data_pattern pattern = sawtooth;
3787 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3788 }
3789
TEST_F(accuracy_test_pow7_single,normal_3D_forward_out_of_place_complex_planar_to_complex_planar)3790 TEST_F(accuracy_test_pow7_single, normal_3D_forward_out_of_place_complex_planar_to_complex_planar)
3791 {
3792 try { normal_3D_forward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
3793 catch (const std::exception& err) { handle_exception(err); }
3794 }
3795
TEST_F(accuracy_test_pow7_double,normal_3D_forward_out_of_place_complex_planar_to_complex_planar)3796 TEST_F(accuracy_test_pow7_double, normal_3D_forward_out_of_place_complex_planar_to_complex_planar)
3797 {
3798 try { normal_3D_forward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
3799 catch (const std::exception& err) { handle_exception(err); }
3800 }
3801
3802 // *****************************************************
3803 // *****************************************************
3804 template< class T, class cl_T, class fftw_T >
normal_3D_backward_out_of_place_complex_planar_to_complex_planar()3805 void normal_3D_backward_out_of_place_complex_planar_to_complex_planar()
3806 {
3807 std::vector<size_t> lengths;
3808 lengths.push_back(normal7);
3809 lengths.push_back(small7);
3810 lengths.push_back(small7);
3811 size_t batch = 1;
3812 std::vector<size_t> input_strides;
3813 std::vector<size_t> output_strides;
3814 size_t input_distance = 0;
3815 size_t output_distance = 0;
3816 layout::buffer_layout_t in_layout = layout::complex_planar;
3817 layout::buffer_layout_t out_layout = layout::complex_planar;
3818 placeness::placeness_t placeness = placeness::out_of_place;
3819 direction::direction_t direction = direction::backward;
3820
3821 data_pattern pattern = sawtooth;
3822 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3823 }
3824
TEST_F(accuracy_test_pow7_single,normal_3D_backward_out_of_place_complex_planar_to_complex_planar)3825 TEST_F(accuracy_test_pow7_single, normal_3D_backward_out_of_place_complex_planar_to_complex_planar)
3826 {
3827 try { normal_3D_backward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
3828 catch (const std::exception& err) { handle_exception(err); }
3829 }
3830
TEST_F(accuracy_test_pow7_double,normal_3D_backward_out_of_place_complex_planar_to_complex_planar)3831 TEST_F(accuracy_test_pow7_double, normal_3D_backward_out_of_place_complex_planar_to_complex_planar)
3832 {
3833 try { normal_3D_backward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
3834 catch (const std::exception& err) { handle_exception(err); }
3835 }
3836
3837 // *****************************************************
3838 // *****************************************************
3839 template< class T, class cl_T, class fftw_T >
normal_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved()3840 void normal_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved()
3841 {
3842 std::vector<size_t> lengths;
3843 lengths.push_back(normal7);
3844 lengths.push_back(small7);
3845 lengths.push_back(small7);
3846 size_t batch = 1;
3847 std::vector<size_t> input_strides;
3848 std::vector<size_t> output_strides;
3849 size_t input_distance = 0;
3850 size_t output_distance = 0;
3851 layout::buffer_layout_t in_layout = layout::complex_interleaved;
3852 layout::buffer_layout_t out_layout = layout::complex_interleaved;
3853 placeness::placeness_t placeness = placeness::out_of_place;
3854 direction::direction_t direction = direction::forward;
3855
3856 data_pattern pattern = sawtooth;
3857 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3858 }
3859
TEST_F(accuracy_test_pow7_single,normal_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved)3860 TEST_F(accuracy_test_pow7_single, normal_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
3861 {
3862 try { normal_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
3863 catch (const std::exception& err) { handle_exception(err); }
3864 }
3865
TEST_F(accuracy_test_pow7_double,normal_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved)3866 TEST_F(accuracy_test_pow7_double, normal_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
3867 {
3868 try { normal_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
3869 catch (const std::exception& err) { handle_exception(err); }
3870 }
3871
3872 // *****************************************************
3873 // *****************************************************
3874 template< class T, class cl_T, class fftw_T >
normal_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved()3875 void normal_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved()
3876 {
3877 std::vector<size_t> lengths;
3878 lengths.push_back(normal7);
3879 lengths.push_back(small7);
3880 lengths.push_back(small7);
3881 size_t batch = 1;
3882 std::vector<size_t> input_strides;
3883 std::vector<size_t> output_strides;
3884 size_t input_distance = 0;
3885 size_t output_distance = 0;
3886 layout::buffer_layout_t in_layout = layout::complex_interleaved;
3887 layout::buffer_layout_t out_layout = layout::complex_interleaved;
3888 placeness::placeness_t placeness = placeness::out_of_place;
3889 direction::direction_t direction = direction::backward;
3890
3891 data_pattern pattern = sawtooth;
3892 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3893 }
3894
TEST_F(accuracy_test_pow7_single,normal_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved)3895 TEST_F(accuracy_test_pow7_single, normal_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
3896 {
3897 try { normal_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
3898 catch (const std::exception& err) { handle_exception(err); }
3899 }
3900
TEST_F(accuracy_test_pow7_double,normal_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved)3901 TEST_F(accuracy_test_pow7_double, normal_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
3902 {
3903 try { normal_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
3904 catch (const std::exception& err) { handle_exception(err); }
3905 }
3906
3907 // *****************************************************
3908 // *****************************************************
3909 template< class T, class cl_T, class fftw_T >
normal_3D_forward_out_of_place_complex_planar_to_complex_interleaved()3910 void normal_3D_forward_out_of_place_complex_planar_to_complex_interleaved()
3911 {
3912 std::vector<size_t> lengths;
3913 lengths.push_back(normal7);
3914 lengths.push_back(small7);
3915 lengths.push_back(small7);
3916 size_t batch = 1;
3917 std::vector<size_t> input_strides;
3918 std::vector<size_t> output_strides;
3919 size_t input_distance = 0;
3920 size_t output_distance = 0;
3921 layout::buffer_layout_t in_layout = layout::complex_planar;
3922 layout::buffer_layout_t out_layout = layout::complex_interleaved;
3923 placeness::placeness_t placeness = placeness::out_of_place;
3924 direction::direction_t direction = direction::forward;
3925
3926 data_pattern pattern = sawtooth;
3927 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3928 }
3929
TEST_F(accuracy_test_pow7_single,normal_3D_forward_out_of_place_complex_planar_to_complex_interleaved)3930 TEST_F(accuracy_test_pow7_single, normal_3D_forward_out_of_place_complex_planar_to_complex_interleaved)
3931 {
3932 try { normal_3D_forward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
3933 catch (const std::exception& err) { handle_exception(err); }
3934 }
3935
TEST_F(accuracy_test_pow7_double,normal_3D_forward_out_of_place_complex_planar_to_complex_interleaved)3936 TEST_F(accuracy_test_pow7_double, normal_3D_forward_out_of_place_complex_planar_to_complex_interleaved)
3937 {
3938 try { normal_3D_forward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
3939 catch (const std::exception& err) { handle_exception(err); }
3940 }
3941
3942 // *****************************************************
3943 // *****************************************************
3944 template< class T, class cl_T, class fftw_T >
normal_3D_backward_out_of_place_complex_planar_to_complex_interleaved()3945 void normal_3D_backward_out_of_place_complex_planar_to_complex_interleaved()
3946 {
3947 std::vector<size_t> lengths;
3948 lengths.push_back(normal7);
3949 lengths.push_back(small7);
3950 lengths.push_back(small7);
3951 size_t batch = 1;
3952 std::vector<size_t> input_strides;
3953 std::vector<size_t> output_strides;
3954 size_t input_distance = 0;
3955 size_t output_distance = 0;
3956 layout::buffer_layout_t in_layout = layout::complex_planar;
3957 layout::buffer_layout_t out_layout = layout::complex_interleaved;
3958 placeness::placeness_t placeness = placeness::out_of_place;
3959 direction::direction_t direction = direction::backward;
3960
3961 data_pattern pattern = sawtooth;
3962 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3963 }
3964
TEST_F(accuracy_test_pow7_single,normal_3D_backward_out_of_place_complex_planar_to_complex_interleaved)3965 TEST_F(accuracy_test_pow7_single, normal_3D_backward_out_of_place_complex_planar_to_complex_interleaved)
3966 {
3967 try { normal_3D_backward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
3968 catch (const std::exception& err) { handle_exception(err); }
3969 }
3970
TEST_F(accuracy_test_pow7_double,normal_3D_backward_out_of_place_complex_planar_to_complex_interleaved)3971 TEST_F(accuracy_test_pow7_double, normal_3D_backward_out_of_place_complex_planar_to_complex_interleaved)
3972 {
3973 try { normal_3D_backward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
3974 catch (const std::exception& err) { handle_exception(err); }
3975 }
3976
3977 // *****************************************************
3978 // *****************************************************
3979 template< class T, class cl_T, class fftw_T >
normal_3D_forward_out_of_place_complex_interleaved_to_complex_planar()3980 void normal_3D_forward_out_of_place_complex_interleaved_to_complex_planar()
3981 {
3982 std::vector<size_t> lengths;
3983 lengths.push_back(normal7);
3984 lengths.push_back(small7);
3985 lengths.push_back(small7);
3986 size_t batch = 1;
3987 std::vector<size_t> input_strides;
3988 std::vector<size_t> output_strides;
3989 size_t input_distance = 0;
3990 size_t output_distance = 0;
3991 layout::buffer_layout_t in_layout = layout::complex_interleaved;
3992 layout::buffer_layout_t out_layout = layout::complex_planar;
3993 placeness::placeness_t placeness = placeness::out_of_place;
3994 direction::direction_t direction = direction::forward;
3995
3996 data_pattern pattern = sawtooth;
3997 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
3998 }
3999
TEST_F(accuracy_test_pow7_single,normal_3D_forward_out_of_place_complex_interleaved_to_complex_planar)4000 TEST_F(accuracy_test_pow7_single, normal_3D_forward_out_of_place_complex_interleaved_to_complex_planar)
4001 {
4002 try { normal_3D_forward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
4003 catch (const std::exception& err) { handle_exception(err); }
4004 }
4005
TEST_F(accuracy_test_pow7_double,normal_3D_forward_out_of_place_complex_interleaved_to_complex_planar)4006 TEST_F(accuracy_test_pow7_double, normal_3D_forward_out_of_place_complex_interleaved_to_complex_planar)
4007 {
4008 try { normal_3D_forward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
4009 catch (const std::exception& err) { handle_exception(err); }
4010 }
4011
4012 // *****************************************************
4013 // *****************************************************
4014 template< class T, class cl_T, class fftw_T >
normal_3D_backward_out_of_place_complex_interleaved_to_complex_planar()4015 void normal_3D_backward_out_of_place_complex_interleaved_to_complex_planar()
4016 {
4017 std::vector<size_t> lengths;
4018 lengths.push_back(normal7);
4019 lengths.push_back(small7);
4020 lengths.push_back(small7);
4021 size_t batch = 1;
4022 std::vector<size_t> input_strides;
4023 std::vector<size_t> output_strides;
4024 size_t input_distance = 0;
4025 size_t output_distance = 0;
4026 layout::buffer_layout_t in_layout = layout::complex_interleaved;
4027 layout::buffer_layout_t out_layout = layout::complex_planar;
4028 placeness::placeness_t placeness = placeness::out_of_place;
4029 direction::direction_t direction = direction::backward;
4030
4031 data_pattern pattern = sawtooth;
4032 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
4033 }
4034
TEST_F(accuracy_test_pow7_single,normal_3D_backward_out_of_place_complex_interleaved_to_complex_planar)4035 TEST_F(accuracy_test_pow7_single, normal_3D_backward_out_of_place_complex_interleaved_to_complex_planar)
4036 {
4037 try { normal_3D_backward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
4038 catch (const std::exception& err) { handle_exception(err); }
4039 }
4040
TEST_F(accuracy_test_pow7_double,normal_3D_backward_out_of_place_complex_interleaved_to_complex_planar)4041 TEST_F(accuracy_test_pow7_double, normal_3D_backward_out_of_place_complex_interleaved_to_complex_planar)
4042 {
4043 try { normal_3D_backward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
4044 catch (const std::exception& err) { handle_exception(err); }
4045 }
4046
4047 // *****************************************************
4048 // *****************************************************
4049 template< class T, class cl_T, class fftw_T >
normal_3D_in_place_real_to_hermitian_interleaved()4050 void normal_3D_in_place_real_to_hermitian_interleaved()
4051 {
4052 std::vector<size_t> lengths;
4053 lengths.push_back(small7);
4054 lengths.push_back(normal7);
4055 lengths.push_back(small7);
4056 size_t batch = 1;
4057 std::vector<size_t> input_strides;
4058 std::vector<size_t> output_strides;
4059 size_t input_distance = 0;
4060 size_t output_distance = 0;
4061 layout::buffer_layout_t layout = layout::hermitian_interleaved;
4062 placeness::placeness_t placeness = placeness::in_place;
4063
4064 data_pattern pattern = sawtooth;
4065 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
4066 }
4067
TEST_F(accuracy_test_pow7_single,normal_3D_in_place_real_to_hermitian_interleaved)4068 TEST_F(accuracy_test_pow7_single, normal_3D_in_place_real_to_hermitian_interleaved)
4069 {
4070 try { normal_3D_in_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
4071 catch (const std::exception& err) { handle_exception(err); }
4072 }
4073
TEST_F(accuracy_test_pow7_double,normal_3D_in_place_real_to_hermitian_interleaved)4074 TEST_F(accuracy_test_pow7_double, normal_3D_in_place_real_to_hermitian_interleaved)
4075 {
4076 try { normal_3D_in_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
4077 catch (const std::exception& err) { handle_exception(err); }
4078 }
4079
4080 // *****************************************************
4081 // *****************************************************
4082 template< class T, class cl_T, class fftw_T >
normal_3D_in_place_hermitian_interleaved_to_real()4083 void normal_3D_in_place_hermitian_interleaved_to_real()
4084 {
4085 std::vector<size_t> lengths;
4086 lengths.push_back(normal7);
4087 lengths.push_back(small7);
4088 lengths.push_back(small7);
4089 size_t batch = 1;
4090 std::vector<size_t> input_strides;
4091 std::vector<size_t> output_strides;
4092 size_t input_distance = 0;
4093 size_t output_distance = 0;
4094 layout::buffer_layout_t layout = layout::hermitian_interleaved;
4095 placeness::placeness_t placeness = placeness::in_place;
4096
4097 data_pattern pattern = sawtooth;
4098 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
4099 }
4100
TEST_F(accuracy_test_pow7_single,normal_3D_in_place_hermitian_interleaved_to_real)4101 TEST_F(accuracy_test_pow7_single, normal_3D_in_place_hermitian_interleaved_to_real)
4102 {
4103 try { normal_3D_in_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
4104 catch (const std::exception& err) { handle_exception(err); }
4105 }
4106
TEST_F(accuracy_test_pow7_double,normal_3D_in_place_hermitian_interleaved_to_real)4107 TEST_F(accuracy_test_pow7_double, normal_3D_in_place_hermitian_interleaved_to_real)
4108 {
4109 try { normal_3D_in_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
4110 catch (const std::exception& err) { handle_exception(err); }
4111 }
4112
4113 // *****************************************************
4114 // *****************************************************
4115 template< class T, class cl_T, class fftw_T >
normal_3D_out_of_place_real_to_hermitian_interleaved()4116 void normal_3D_out_of_place_real_to_hermitian_interleaved()
4117 {
4118 std::vector<size_t> lengths;
4119 lengths.push_back(small7);
4120 lengths.push_back(small7);
4121 lengths.push_back(normal7);
4122 size_t batch = 1;
4123 std::vector<size_t> input_strides;
4124 std::vector<size_t> output_strides;
4125 size_t input_distance = 0;
4126 size_t output_distance = 0;
4127 layout::buffer_layout_t layout = layout::hermitian_interleaved;
4128 placeness::placeness_t placeness = placeness::out_of_place;
4129
4130 data_pattern pattern = sawtooth;
4131 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
4132 }
4133
TEST_F(accuracy_test_pow7_single,normal_3D_out_of_place_real_to_hermitian_interleaved)4134 TEST_F(accuracy_test_pow7_single, normal_3D_out_of_place_real_to_hermitian_interleaved)
4135 {
4136 try { normal_3D_out_of_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
4137 catch (const std::exception& err) { handle_exception(err); }
4138 }
4139
TEST_F(accuracy_test_pow7_double,normal_3D_out_of_place_real_to_hermitian_interleaved)4140 TEST_F(accuracy_test_pow7_double, normal_3D_out_of_place_real_to_hermitian_interleaved)
4141 {
4142 try { normal_3D_out_of_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
4143 catch (const std::exception& err) { handle_exception(err); }
4144 }
4145
4146 // *****************************************************
4147 // *****************************************************
4148 template< class T, class cl_T, class fftw_T >
normal_3D_out_of_place_hermitian_interleaved_to_real()4149 void normal_3D_out_of_place_hermitian_interleaved_to_real()
4150 {
4151 std::vector<size_t> lengths;
4152 lengths.push_back(normal7);
4153 lengths.push_back(small7);
4154 lengths.push_back(small7);
4155 size_t batch = 1;
4156 std::vector<size_t> input_strides;
4157 std::vector<size_t> output_strides;
4158 size_t input_distance = 0;
4159 size_t output_distance = 0;
4160 layout::buffer_layout_t layout = layout::hermitian_interleaved;
4161 placeness::placeness_t placeness = placeness::out_of_place;
4162
4163 data_pattern pattern = sawtooth;
4164 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
4165 }
4166
TEST_F(accuracy_test_pow7_single,normal_3D_out_of_place_hermitian_interleaved_to_real)4167 TEST_F(accuracy_test_pow7_single, normal_3D_out_of_place_hermitian_interleaved_to_real)
4168 {
4169 try { normal_3D_out_of_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
4170 catch (const std::exception& err) { handle_exception(err); }
4171 }
4172
TEST_F(accuracy_test_pow7_double,normal_3D_out_of_place_hermitian_interleaved_to_real)4173 TEST_F(accuracy_test_pow7_double, normal_3D_out_of_place_hermitian_interleaved_to_real)
4174 {
4175 try { normal_3D_out_of_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
4176 catch (const std::exception& err) { handle_exception(err); }
4177 }
4178
4179 // *****************************************************
4180 // *****************************************************
4181 template< class T, class cl_T, class fftw_T >
normal_3D_out_of_place_real_to_hermitian_planar()4182 void normal_3D_out_of_place_real_to_hermitian_planar()
4183 {
4184 std::vector<size_t> lengths;
4185 lengths.push_back(normal7);
4186 lengths.push_back(small7);
4187 lengths.push_back(small7);
4188 size_t batch = 1;
4189 std::vector<size_t> input_strides;
4190 std::vector<size_t> output_strides;
4191 size_t input_distance = 0;
4192 size_t output_distance = 0;
4193 layout::buffer_layout_t layout = layout::hermitian_planar;
4194 placeness::placeness_t placeness = placeness::out_of_place;
4195
4196 data_pattern pattern = sawtooth;
4197 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
4198 }
4199
TEST_F(accuracy_test_pow7_single,normal_3D_out_of_place_real_to_hermitian_planar)4200 TEST_F(accuracy_test_pow7_single, normal_3D_out_of_place_real_to_hermitian_planar)
4201 {
4202 try { normal_3D_out_of_place_real_to_hermitian_planar< float, cl_float, fftwf_complex >(); }
4203 catch (const std::exception& err) { handle_exception(err); }
4204 }
4205
TEST_F(accuracy_test_pow7_double,normal_3D_out_of_place_real_to_hermitian_planar)4206 TEST_F(accuracy_test_pow7_double, normal_3D_out_of_place_real_to_hermitian_planar)
4207 {
4208 try { normal_3D_out_of_place_real_to_hermitian_planar< double, cl_double, fftw_complex >(); }
4209 catch (const std::exception& err) { handle_exception(err); }
4210 }
4211
4212 // *****************************************************
4213 // *****************************************************
4214 template< class T, class cl_T, class fftw_T >
normal_3D_out_of_place_hermitian_planar_to_real()4215 void normal_3D_out_of_place_hermitian_planar_to_real()
4216 {
4217 std::vector<size_t> lengths;
4218 lengths.push_back(small7);
4219 lengths.push_back(normal7);
4220 lengths.push_back(small7);
4221 size_t batch = 1;
4222 std::vector<size_t> input_strides;
4223 std::vector<size_t> output_strides;
4224 size_t input_distance = 0;
4225 size_t output_distance = 0;
4226 layout::buffer_layout_t layout = layout::hermitian_planar;
4227 placeness::placeness_t placeness = placeness::out_of_place;
4228
4229 data_pattern pattern = sawtooth;
4230 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
4231 }
4232
TEST_F(accuracy_test_pow7_single,normal_3D_out_of_place_hermitian_planar_to_real)4233 TEST_F(accuracy_test_pow7_single, normal_3D_out_of_place_hermitian_planar_to_real)
4234 {
4235 try { normal_3D_out_of_place_hermitian_planar_to_real< float, cl_float, fftwf_complex >(); }
4236 catch (const std::exception& err) { handle_exception(err); }
4237 }
4238
TEST_F(accuracy_test_pow7_double,normal_3D_out_of_place_hermitian_planar_to_real)4239 TEST_F(accuracy_test_pow7_double, normal_3D_out_of_place_hermitian_planar_to_real)
4240 {
4241 try { normal_3D_out_of_place_hermitian_planar_to_real< double, cl_double, fftw_complex >(); }
4242 catch (const std::exception& err) { handle_exception(err); }
4243 }
4244
4245 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
4246 // ^^^^^^^^^^^^^^^^^^^^^^^ small 3D ^^^^^^^^^^^^^^^^^^^^^^^ //
4247 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
4248
4249 // *****************************************************
4250 // *****************************************************
4251 template< class T, class cl_T, class fftw_T >
small_3D_forward_in_place_complex_planar_to_complex_planar()4252 void small_3D_forward_in_place_complex_planar_to_complex_planar()
4253 {
4254 std::vector<size_t> lengths;
4255 lengths.push_back(small7);
4256 lengths.push_back(small7);
4257 lengths.push_back(small7);
4258 size_t batch = 1;
4259 std::vector<size_t> input_strides;
4260 std::vector<size_t> output_strides;
4261 size_t input_distance = 0;
4262 size_t output_distance = 0;
4263 layout::buffer_layout_t in_layout = layout::complex_planar;
4264 layout::buffer_layout_t out_layout = layout::complex_planar;
4265 placeness::placeness_t placeness = placeness::in_place;
4266 direction::direction_t direction = direction::forward;
4267
4268 data_pattern pattern = sawtooth;
4269 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
4270 }
4271
TEST_F(accuracy_test_pow7_single,small_3D_forward_in_place_complex_planar_to_complex_planar)4272 TEST_F(accuracy_test_pow7_single, small_3D_forward_in_place_complex_planar_to_complex_planar)
4273 {
4274 try { small_3D_forward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
4275 catch (const std::exception& err) { handle_exception(err); }
4276 }
4277
TEST_F(accuracy_test_pow7_double,small_3D_forward_in_place_complex_planar_to_complex_planar)4278 TEST_F(accuracy_test_pow7_double, small_3D_forward_in_place_complex_planar_to_complex_planar)
4279 {
4280 try { small_3D_forward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
4281 catch (const std::exception& err) { handle_exception(err); }
4282 }
4283
4284 // *****************************************************
4285 // *****************************************************
4286 template< class T, class cl_T, class fftw_T >
small_3D_backward_in_place_complex_planar_to_complex_planar()4287 void small_3D_backward_in_place_complex_planar_to_complex_planar()
4288 {
4289 std::vector<size_t> lengths;
4290 lengths.push_back(small7);
4291 lengths.push_back(small7);
4292 lengths.push_back(small7);
4293 size_t batch = 1;
4294 std::vector<size_t> input_strides;
4295 std::vector<size_t> output_strides;
4296 size_t input_distance = 0;
4297 size_t output_distance = 0;
4298 layout::buffer_layout_t in_layout = layout::complex_planar;
4299 layout::buffer_layout_t out_layout = layout::complex_planar;
4300 placeness::placeness_t placeness = placeness::in_place;
4301 direction::direction_t direction = direction::backward;
4302
4303 data_pattern pattern = sawtooth;
4304 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
4305 }
4306
TEST_F(accuracy_test_pow7_single,small_3D_backward_in_place_complex_planar_to_complex_planar)4307 TEST_F(accuracy_test_pow7_single, small_3D_backward_in_place_complex_planar_to_complex_planar)
4308 {
4309 try { small_3D_backward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
4310 catch (const std::exception& err) { handle_exception(err); }
4311 }
4312
TEST_F(accuracy_test_pow7_double,small_3D_backward_in_place_complex_planar_to_complex_planar)4313 TEST_F(accuracy_test_pow7_double, small_3D_backward_in_place_complex_planar_to_complex_planar)
4314 {
4315 try { small_3D_backward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
4316 catch (const std::exception& err) { handle_exception(err); }
4317 }
4318
4319 // *****************************************************
4320 // *****************************************************
4321 template< class T, class cl_T, class fftw_T >
small_3D_forward_in_place_complex_interleaved_to_complex_interleaved()4322 void small_3D_forward_in_place_complex_interleaved_to_complex_interleaved()
4323 {
4324 std::vector<size_t> lengths;
4325 lengths.push_back(small7);
4326 lengths.push_back(small7);
4327 lengths.push_back(small7);
4328 size_t batch = 1;
4329 std::vector<size_t> input_strides;
4330 std::vector<size_t> output_strides;
4331 size_t input_distance = 0;
4332 size_t output_distance = 0;
4333 layout::buffer_layout_t in_layout = layout::complex_interleaved;
4334 layout::buffer_layout_t out_layout = layout::complex_interleaved;
4335 placeness::placeness_t placeness = placeness::in_place;
4336 direction::direction_t direction = direction::forward;
4337
4338 data_pattern pattern = sawtooth;
4339 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
4340 }
4341
TEST_F(accuracy_test_pow7_single,small_3D_forward_in_place_complex_interleaved_to_complex_interleaved)4342 TEST_F(accuracy_test_pow7_single, small_3D_forward_in_place_complex_interleaved_to_complex_interleaved)
4343 {
4344 try { small_3D_forward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
4345 catch (const std::exception& err) { handle_exception(err); }
4346 }
4347
TEST_F(accuracy_test_pow7_double,small_3D_forward_in_place_complex_interleaved_to_complex_interleaved)4348 TEST_F(accuracy_test_pow7_double, small_3D_forward_in_place_complex_interleaved_to_complex_interleaved)
4349 {
4350 try { small_3D_forward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
4351 catch (const std::exception& err) { handle_exception(err); }
4352 }
4353
4354 // *****************************************************
4355 // *****************************************************
4356 template< class T, class cl_T, class fftw_T >
small_3D_backward_in_place_complex_interleaved_to_complex_interleaved()4357 void small_3D_backward_in_place_complex_interleaved_to_complex_interleaved()
4358 {
4359 std::vector<size_t> lengths;
4360 lengths.push_back(small7);
4361 lengths.push_back(small7);
4362 lengths.push_back(small7);
4363 size_t batch = 1;
4364 std::vector<size_t> input_strides;
4365 std::vector<size_t> output_strides;
4366 size_t input_distance = 0;
4367 size_t output_distance = 0;
4368 layout::buffer_layout_t in_layout = layout::complex_interleaved;
4369 layout::buffer_layout_t out_layout = layout::complex_interleaved;
4370 placeness::placeness_t placeness = placeness::in_place;
4371 direction::direction_t direction = direction::backward;
4372
4373 data_pattern pattern = sawtooth;
4374 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
4375 }
4376
TEST_F(accuracy_test_pow7_single,small_3D_backward_in_place_complex_interleaved_to_complex_interleaved)4377 TEST_F(accuracy_test_pow7_single, small_3D_backward_in_place_complex_interleaved_to_complex_interleaved)
4378 {
4379 try { small_3D_backward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
4380 catch (const std::exception& err) { handle_exception(err); }
4381 }
4382
TEST_F(accuracy_test_pow7_double,small_3D_backward_in_place_complex_interleaved_to_complex_interleaved)4383 TEST_F(accuracy_test_pow7_double, small_3D_backward_in_place_complex_interleaved_to_complex_interleaved)
4384 {
4385 try { small_3D_backward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
4386 catch (const std::exception& err) { handle_exception(err); }
4387 }
4388
4389 // *****************************************************
4390 // *****************************************************
4391 template< class T, class cl_T, class fftw_T >
small_3D_forward_out_of_place_complex_planar_to_complex_planar()4392 void small_3D_forward_out_of_place_complex_planar_to_complex_planar()
4393 {
4394 std::vector<size_t> lengths;
4395 lengths.push_back(small7);
4396 lengths.push_back(small7);
4397 lengths.push_back(small7);
4398 size_t batch = 1;
4399 std::vector<size_t> input_strides;
4400 std::vector<size_t> output_strides;
4401 size_t input_distance = 0;
4402 size_t output_distance = 0;
4403 layout::buffer_layout_t in_layout = layout::complex_planar;
4404 layout::buffer_layout_t out_layout = layout::complex_planar;
4405 placeness::placeness_t placeness = placeness::out_of_place;
4406 direction::direction_t direction = direction::forward;
4407
4408 data_pattern pattern = sawtooth;
4409 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
4410 }
4411
TEST_F(accuracy_test_pow7_single,small_3D_forward_out_of_place_complex_planar_to_complex_planar)4412 TEST_F(accuracy_test_pow7_single, small_3D_forward_out_of_place_complex_planar_to_complex_planar)
4413 {
4414 try { small_3D_forward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
4415 catch (const std::exception& err) { handle_exception(err); }
4416 }
4417
TEST_F(accuracy_test_pow7_double,small_3D_forward_out_of_place_complex_planar_to_complex_planar)4418 TEST_F(accuracy_test_pow7_double, small_3D_forward_out_of_place_complex_planar_to_complex_planar)
4419 {
4420 try { small_3D_forward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
4421 catch (const std::exception& err) { handle_exception(err); }
4422 }
4423
4424 // *****************************************************
4425 // *****************************************************
4426 template< class T, class cl_T, class fftw_T >
small_3D_backward_out_of_place_complex_planar_to_complex_planar()4427 void small_3D_backward_out_of_place_complex_planar_to_complex_planar()
4428 {
4429 std::vector<size_t> lengths;
4430 lengths.push_back(small7);
4431 lengths.push_back(small7);
4432 lengths.push_back(small7);
4433 size_t batch = 1;
4434 std::vector<size_t> input_strides;
4435 std::vector<size_t> output_strides;
4436 size_t input_distance = 0;
4437 size_t output_distance = 0;
4438 layout::buffer_layout_t in_layout = layout::complex_planar;
4439 layout::buffer_layout_t out_layout = layout::complex_planar;
4440 placeness::placeness_t placeness = placeness::out_of_place;
4441 direction::direction_t direction = direction::backward;
4442
4443 data_pattern pattern = sawtooth;
4444 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
4445 }
4446
TEST_F(accuracy_test_pow7_single,small_3D_backward_out_of_place_complex_planar_to_complex_planar)4447 TEST_F(accuracy_test_pow7_single, small_3D_backward_out_of_place_complex_planar_to_complex_planar)
4448 {
4449 try { small_3D_backward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
4450 catch (const std::exception& err) { handle_exception(err); }
4451 }
4452
TEST_F(accuracy_test_pow7_double,small_3D_backward_out_of_place_complex_planar_to_complex_planar)4453 TEST_F(accuracy_test_pow7_double, small_3D_backward_out_of_place_complex_planar_to_complex_planar)
4454 {
4455 try { small_3D_backward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
4456 catch (const std::exception& err) { handle_exception(err); }
4457 }
4458
4459 // *****************************************************
4460 // *****************************************************
4461 template< class T, class cl_T, class fftw_T >
small_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved()4462 void small_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved()
4463 {
4464 std::vector<size_t> lengths;
4465 lengths.push_back(small7);
4466 lengths.push_back(small7);
4467 lengths.push_back(small7);
4468 size_t batch = 1;
4469 std::vector<size_t> input_strides;
4470 std::vector<size_t> output_strides;
4471 size_t input_distance = 0;
4472 size_t output_distance = 0;
4473 layout::buffer_layout_t in_layout = layout::complex_interleaved;
4474 layout::buffer_layout_t out_layout = layout::complex_interleaved;
4475 placeness::placeness_t placeness = placeness::out_of_place;
4476 direction::direction_t direction = direction::forward;
4477
4478 data_pattern pattern = sawtooth;
4479 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
4480 }
4481
TEST_F(accuracy_test_pow7_single,small_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved)4482 TEST_F(accuracy_test_pow7_single, small_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
4483 {
4484 try { small_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
4485 catch (const std::exception& err) { handle_exception(err); }
4486 }
4487
TEST_F(accuracy_test_pow7_double,small_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved)4488 TEST_F(accuracy_test_pow7_double, small_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
4489 {
4490 try { small_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
4491 catch (const std::exception& err) { handle_exception(err); }
4492 }
4493
4494 // *****************************************************
4495 // *****************************************************
4496 template< class T, class cl_T, class fftw_T >
small_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved()4497 void small_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved()
4498 {
4499 std::vector<size_t> lengths;
4500 lengths.push_back(small7);
4501 lengths.push_back(small7);
4502 lengths.push_back(small7);
4503 size_t batch = 1;
4504 std::vector<size_t> input_strides;
4505 std::vector<size_t> output_strides;
4506 size_t input_distance = 0;
4507 size_t output_distance = 0;
4508 layout::buffer_layout_t in_layout = layout::complex_interleaved;
4509 layout::buffer_layout_t out_layout = layout::complex_interleaved;
4510 placeness::placeness_t placeness = placeness::out_of_place;
4511 direction::direction_t direction = direction::backward;
4512
4513 data_pattern pattern = sawtooth;
4514 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
4515 }
4516
TEST_F(accuracy_test_pow7_single,small_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved)4517 TEST_F(accuracy_test_pow7_single, small_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
4518 {
4519 try { small_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
4520 catch (const std::exception& err) { handle_exception(err); }
4521 }
4522
TEST_F(accuracy_test_pow7_double,small_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved)4523 TEST_F(accuracy_test_pow7_double, small_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
4524 {
4525 try { small_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
4526 catch (const std::exception& err) { handle_exception(err); }
4527 }
4528
4529 // *****************************************************
4530 // *****************************************************
4531 template< class T, class cl_T, class fftw_T >
small_3D_forward_out_of_place_complex_planar_to_complex_interleaved()4532 void small_3D_forward_out_of_place_complex_planar_to_complex_interleaved()
4533 {
4534 std::vector<size_t> lengths;
4535 lengths.push_back(small7);
4536 lengths.push_back(small7);
4537 lengths.push_back(small7);
4538 size_t batch = 1;
4539 std::vector<size_t> input_strides;
4540 std::vector<size_t> output_strides;
4541 size_t input_distance = 0;
4542 size_t output_distance = 0;
4543 layout::buffer_layout_t in_layout = layout::complex_planar;
4544 layout::buffer_layout_t out_layout = layout::complex_interleaved;
4545 placeness::placeness_t placeness = placeness::out_of_place;
4546 direction::direction_t direction = direction::forward;
4547
4548 data_pattern pattern = sawtooth;
4549 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
4550 }
4551
TEST_F(accuracy_test_pow7_single,small_3D_forward_out_of_place_complex_planar_to_complex_interleaved)4552 TEST_F(accuracy_test_pow7_single, small_3D_forward_out_of_place_complex_planar_to_complex_interleaved)
4553 {
4554 try { small_3D_forward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
4555 catch (const std::exception& err) { handle_exception(err); }
4556 }
4557
TEST_F(accuracy_test_pow7_double,small_3D_forward_out_of_place_complex_planar_to_complex_interleaved)4558 TEST_F(accuracy_test_pow7_double, small_3D_forward_out_of_place_complex_planar_to_complex_interleaved)
4559 {
4560 try { small_3D_forward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
4561 catch (const std::exception& err) { handle_exception(err); }
4562 }
4563
4564 // *****************************************************
4565 // *****************************************************
4566 template< class T, class cl_T, class fftw_T >
small_3D_backward_out_of_place_complex_planar_to_complex_interleaved()4567 void small_3D_backward_out_of_place_complex_planar_to_complex_interleaved()
4568 {
4569 std::vector<size_t> lengths;
4570 lengths.push_back(small7);
4571 lengths.push_back(small7);
4572 lengths.push_back(small7);
4573 size_t batch = 1;
4574 std::vector<size_t> input_strides;
4575 std::vector<size_t> output_strides;
4576 size_t input_distance = 0;
4577 size_t output_distance = 0;
4578 layout::buffer_layout_t in_layout = layout::complex_planar;
4579 layout::buffer_layout_t out_layout = layout::complex_interleaved;
4580 placeness::placeness_t placeness = placeness::out_of_place;
4581 direction::direction_t direction = direction::backward;
4582
4583 data_pattern pattern = sawtooth;
4584 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
4585 }
4586
TEST_F(accuracy_test_pow7_single,small_3D_backward_out_of_place_complex_planar_to_complex_interleaved)4587 TEST_F(accuracy_test_pow7_single, small_3D_backward_out_of_place_complex_planar_to_complex_interleaved)
4588 {
4589 try { small_3D_backward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
4590 catch (const std::exception& err) { handle_exception(err); }
4591 }
4592
TEST_F(accuracy_test_pow7_double,small_3D_backward_out_of_place_complex_planar_to_complex_interleaved)4593 TEST_F(accuracy_test_pow7_double, small_3D_backward_out_of_place_complex_planar_to_complex_interleaved)
4594 {
4595 try { small_3D_backward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
4596 catch (const std::exception& err) { handle_exception(err); }
4597 }
4598
4599 // *****************************************************
4600 // *****************************************************
4601 template< class T, class cl_T, class fftw_T >
small_3D_forward_out_of_place_complex_interleaved_to_complex_planar()4602 void small_3D_forward_out_of_place_complex_interleaved_to_complex_planar()
4603 {
4604 std::vector<size_t> lengths;
4605 lengths.push_back(small7);
4606 lengths.push_back(small7);
4607 lengths.push_back(small7);
4608 size_t batch = 1;
4609 std::vector<size_t> input_strides;
4610 std::vector<size_t> output_strides;
4611 size_t input_distance = 0;
4612 size_t output_distance = 0;
4613 layout::buffer_layout_t in_layout = layout::complex_interleaved;
4614 layout::buffer_layout_t out_layout = layout::complex_planar;
4615 placeness::placeness_t placeness = placeness::out_of_place;
4616 direction::direction_t direction = direction::forward;
4617
4618 data_pattern pattern = sawtooth;
4619 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
4620 }
4621
TEST_F(accuracy_test_pow7_single,small_3D_forward_out_of_place_complex_interleaved_to_complex_planar)4622 TEST_F(accuracy_test_pow7_single, small_3D_forward_out_of_place_complex_interleaved_to_complex_planar)
4623 {
4624 try { small_3D_forward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
4625 catch (const std::exception& err) { handle_exception(err); }
4626 }
4627
TEST_F(accuracy_test_pow7_double,small_3D_forward_out_of_place_complex_interleaved_to_complex_planar)4628 TEST_F(accuracy_test_pow7_double, small_3D_forward_out_of_place_complex_interleaved_to_complex_planar)
4629 {
4630 try { small_3D_forward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
4631 catch (const std::exception& err) { handle_exception(err); }
4632 }
4633
4634 // *****************************************************
4635 // *****************************************************
4636 template< class T, class cl_T, class fftw_T >
small_3D_backward_out_of_place_complex_interleaved_to_complex_planar()4637 void small_3D_backward_out_of_place_complex_interleaved_to_complex_planar()
4638 {
4639 std::vector<size_t> lengths;
4640 lengths.push_back(small7);
4641 lengths.push_back(small7);
4642 lengths.push_back(small7);
4643 size_t batch = 1;
4644 std::vector<size_t> input_strides;
4645 std::vector<size_t> output_strides;
4646 size_t input_distance = 0;
4647 size_t output_distance = 0;
4648 layout::buffer_layout_t in_layout = layout::complex_interleaved;
4649 layout::buffer_layout_t out_layout = layout::complex_planar;
4650 placeness::placeness_t placeness = placeness::out_of_place;
4651 direction::direction_t direction = direction::backward;
4652
4653 data_pattern pattern = sawtooth;
4654 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
4655 }
4656
TEST_F(accuracy_test_pow7_single,small_3D_backward_out_of_place_complex_interleaved_to_complex_planar)4657 TEST_F(accuracy_test_pow7_single, small_3D_backward_out_of_place_complex_interleaved_to_complex_planar)
4658 {
4659 try { small_3D_backward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
4660 catch (const std::exception& err) { handle_exception(err); }
4661 }
4662
TEST_F(accuracy_test_pow7_double,small_3D_backward_out_of_place_complex_interleaved_to_complex_planar)4663 TEST_F(accuracy_test_pow7_double, small_3D_backward_out_of_place_complex_interleaved_to_complex_planar)
4664 {
4665 try { small_3D_backward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
4666 catch (const std::exception& err) { handle_exception(err); }
4667 }
4668
4669 // *****************************************************
4670 // *****************************************************
4671 template< class T, class cl_T, class fftw_T >
small_3D_in_place_real_to_hermitian_interleaved()4672 void small_3D_in_place_real_to_hermitian_interleaved()
4673 {
4674 std::vector<size_t> lengths;
4675 lengths.push_back(small7);
4676 lengths.push_back(small7);
4677 lengths.push_back(small7);
4678 size_t batch = 1;
4679 std::vector<size_t> input_strides;
4680 std::vector<size_t> output_strides;
4681 size_t input_distance = 0;
4682 size_t output_distance = 0;
4683 layout::buffer_layout_t layout = layout::hermitian_interleaved;
4684 placeness::placeness_t placeness = placeness::in_place;
4685
4686 data_pattern pattern = sawtooth;
4687 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
4688 }
4689
TEST_F(accuracy_test_pow7_single,_small_3D_in_place_real_to_hermitian_interleaved)4690 TEST_F(accuracy_test_pow7_single, _small_3D_in_place_real_to_hermitian_interleaved)
4691 {
4692 try { small_3D_in_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
4693 catch (const std::exception& err) { handle_exception(err); }
4694 }
4695
TEST_F(accuracy_test_pow7_double,_small_3D_in_place_real_to_hermitian_interleaved)4696 TEST_F(accuracy_test_pow7_double, _small_3D_in_place_real_to_hermitian_interleaved)
4697 {
4698 try { small_3D_in_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
4699 catch (const std::exception& err) { handle_exception(err); }
4700 }
4701
4702 // *****************************************************
4703 // *****************************************************
4704 template< class T, class cl_T, class fftw_T >
small_3D_in_place_hermitian_interleaved_to_real()4705 void small_3D_in_place_hermitian_interleaved_to_real()
4706 {
4707 std::vector<size_t> lengths;
4708 lengths.push_back(small7);
4709 lengths.push_back(small7);
4710 lengths.push_back(small7);
4711 size_t batch = 1;
4712 std::vector<size_t> input_strides;
4713 std::vector<size_t> output_strides;
4714 size_t input_distance = 0;
4715 size_t output_distance = 0;
4716 layout::buffer_layout_t layout = layout::hermitian_interleaved;
4717 placeness::placeness_t placeness = placeness::in_place;
4718
4719 data_pattern pattern = sawtooth;
4720 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
4721 }
4722
TEST_F(accuracy_test_pow7_single,_small_3D_in_place_hermitian_interleaved_to_real)4723 TEST_F(accuracy_test_pow7_single, _small_3D_in_place_hermitian_interleaved_to_real)
4724 {
4725 try { small_3D_in_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
4726 catch (const std::exception& err) { handle_exception(err); }
4727 }
4728
TEST_F(accuracy_test_pow7_double,_small_3D_in_place_hermitian_interleaved_to_real)4729 TEST_F(accuracy_test_pow7_double, _small_3D_in_place_hermitian_interleaved_to_real)
4730 {
4731 try { small_3D_in_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
4732 catch (const std::exception& err) { handle_exception(err); }
4733 }
4734
4735 // *****************************************************
4736 // *****************************************************
4737 template< class T, class cl_T, class fftw_T >
small_3D_out_of_place_real_to_hermitian_interleaved()4738 void small_3D_out_of_place_real_to_hermitian_interleaved()
4739 {
4740 std::vector<size_t> lengths;
4741 lengths.push_back(small7);
4742 lengths.push_back(small7);
4743 lengths.push_back(small7);
4744 size_t batch = 1;
4745 std::vector<size_t> input_strides;
4746 std::vector<size_t> output_strides;
4747 size_t input_distance = 0;
4748 size_t output_distance = 0;
4749 layout::buffer_layout_t layout = layout::hermitian_interleaved;
4750 placeness::placeness_t placeness = placeness::out_of_place;
4751
4752 data_pattern pattern = sawtooth;
4753 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
4754 }
4755
TEST_F(accuracy_test_pow7_single,_small_3D_out_of_place_real_to_hermitian_interleaved)4756 TEST_F(accuracy_test_pow7_single, _small_3D_out_of_place_real_to_hermitian_interleaved)
4757 {
4758 try { small_3D_out_of_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
4759 catch (const std::exception& err) { handle_exception(err); }
4760 }
4761
TEST_F(accuracy_test_pow7_double,_small_3D_out_of_place_real_to_hermitian_interleaved)4762 TEST_F(accuracy_test_pow7_double, _small_3D_out_of_place_real_to_hermitian_interleaved)
4763 {
4764 try { small_3D_out_of_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
4765 catch (const std::exception& err) { handle_exception(err); }
4766 }
4767
4768 // *****************************************************
4769 // *****************************************************
4770 template< class T, class cl_T, class fftw_T >
small_3D_out_of_place_hermitian_interleaved_to_real()4771 void small_3D_out_of_place_hermitian_interleaved_to_real()
4772 {
4773 std::vector<size_t> lengths;
4774 lengths.push_back(small7);
4775 lengths.push_back(small7);
4776 lengths.push_back(small7);
4777 size_t batch = 1;
4778 std::vector<size_t> input_strides;
4779 std::vector<size_t> output_strides;
4780 size_t input_distance = 0;
4781 size_t output_distance = 0;
4782 layout::buffer_layout_t layout = layout::hermitian_interleaved;
4783 placeness::placeness_t placeness = placeness::out_of_place;
4784
4785 data_pattern pattern = sawtooth;
4786 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
4787 }
4788
TEST_F(accuracy_test_pow7_single,_small_3D_out_of_place_hermitian_interleaved_to_real)4789 TEST_F(accuracy_test_pow7_single, _small_3D_out_of_place_hermitian_interleaved_to_real)
4790 {
4791 try { small_3D_out_of_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
4792 catch (const std::exception& err) { handle_exception(err); }
4793 }
4794
TEST_F(accuracy_test_pow7_double,_small_3D_out_of_place_hermitian_interleaved_to_real)4795 TEST_F(accuracy_test_pow7_double, _small_3D_out_of_place_hermitian_interleaved_to_real)
4796 {
4797 try { small_3D_out_of_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
4798 catch (const std::exception& err) { handle_exception(err); }
4799 }
4800
4801 // *****************************************************
4802 // *****************************************************
4803 template< class T, class cl_T, class fftw_T >
small_3D_out_of_place_real_to_hermitian_planar()4804 void small_3D_out_of_place_real_to_hermitian_planar()
4805 {
4806 std::vector<size_t> lengths;
4807 lengths.push_back(small7);
4808 lengths.push_back(small7);
4809 lengths.push_back(small7);
4810 size_t batch = 1;
4811 std::vector<size_t> input_strides;
4812 std::vector<size_t> output_strides;
4813 size_t input_distance = 0;
4814 size_t output_distance = 0;
4815 layout::buffer_layout_t layout = layout::hermitian_planar;
4816 placeness::placeness_t placeness = placeness::out_of_place;
4817
4818 data_pattern pattern = sawtooth;
4819 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
4820 }
4821
TEST_F(accuracy_test_pow7_single,_small_3D_out_of_place_real_to_hermitian_planar)4822 TEST_F(accuracy_test_pow7_single, _small_3D_out_of_place_real_to_hermitian_planar)
4823 {
4824 try { small_3D_out_of_place_real_to_hermitian_planar< float, cl_float, fftwf_complex >(); }
4825 catch (const std::exception& err) { handle_exception(err); }
4826 }
4827
TEST_F(accuracy_test_pow7_double,_small_3D_out_of_place_real_to_hermitian_planar)4828 TEST_F(accuracy_test_pow7_double, _small_3D_out_of_place_real_to_hermitian_planar)
4829 {
4830 try { small_3D_out_of_place_real_to_hermitian_planar< double, cl_double, fftw_complex >(); }
4831 catch (const std::exception& err) { handle_exception(err); }
4832 }
4833
4834 // *****************************************************
4835 // *****************************************************
4836 template< class T, class cl_T, class fftw_T >
small_3D_out_of_place_hermitian_planar_to_real()4837 void small_3D_out_of_place_hermitian_planar_to_real()
4838 {
4839 std::vector<size_t> lengths;
4840 lengths.push_back(small7);
4841 lengths.push_back(small7);
4842 lengths.push_back(small7);
4843 size_t batch = 1;
4844 std::vector<size_t> input_strides;
4845 std::vector<size_t> output_strides;
4846 size_t input_distance = 0;
4847 size_t output_distance = 0;
4848 layout::buffer_layout_t layout = layout::hermitian_planar;
4849 placeness::placeness_t placeness = placeness::out_of_place;
4850
4851 data_pattern pattern = sawtooth;
4852 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
4853 }
4854
TEST_F(accuracy_test_pow7_single,_small_3D_out_of_place_hermitian_planar_to_real)4855 TEST_F(accuracy_test_pow7_single, _small_3D_out_of_place_hermitian_planar_to_real)
4856 {
4857 try { small_3D_out_of_place_hermitian_planar_to_real< float, cl_float, fftwf_complex >(); }
4858 catch (const std::exception& err) { handle_exception(err); }
4859 }
4860
TEST_F(accuracy_test_pow7_double,_small_3D_out_of_place_hermitian_planar_to_real)4861 TEST_F(accuracy_test_pow7_double, _small_3D_out_of_place_hermitian_planar_to_real)
4862 {
4863 try { small_3D_out_of_place_hermitian_planar_to_real< double, cl_double, fftw_complex >(); }
4864 catch (const std::exception& err) { handle_exception(err); }
4865 }
4866
4867 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
4868 // ^^^^^^^^^^^^^^^^^^^^^^^ large 3D ^^^^^^^^^^^^^^^^^^^^^^^ //
4869 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
4870
4871 // *****************************************************
4872 // *****************************************************
4873 template< class T, class cl_T, class fftw_T >
large_3D_forward_in_place_complex_planar_to_complex_planar()4874 void large_3D_forward_in_place_complex_planar_to_complex_planar()
4875 {
4876 std::vector<size_t> lengths;
4877 lengths.push_back(large7);
4878 lengths.push_back(3);
4879 lengths.push_back(3);
4880 size_t batch = 1;
4881 std::vector<size_t> input_strides;
4882 std::vector<size_t> output_strides;
4883 size_t input_distance = 0;
4884 size_t output_distance = 0;
4885 layout::buffer_layout_t in_layout = layout::complex_planar;
4886 layout::buffer_layout_t out_layout = layout::complex_planar;
4887 placeness::placeness_t placeness = placeness::in_place;
4888 direction::direction_t direction = direction::forward;
4889
4890 data_pattern pattern = sawtooth;
4891 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
4892 }
4893
TEST_F(accuracy_test_pow7_single,large_3D_forward_in_place_complex_planar_to_complex_planar)4894 TEST_F(accuracy_test_pow7_single, large_3D_forward_in_place_complex_planar_to_complex_planar)
4895 {
4896 try { large_3D_forward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
4897 catch (const std::exception& err) { handle_exception(err); }
4898 }
4899
TEST_F(accuracy_test_pow7_double,large_3D_forward_in_place_complex_planar_to_complex_planar)4900 TEST_F(accuracy_test_pow7_double, large_3D_forward_in_place_complex_planar_to_complex_planar)
4901 {
4902 try { large_3D_forward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
4903 catch (const std::exception& err) { handle_exception(err); }
4904 }
4905
4906 // *****************************************************
4907 // *****************************************************
4908 template< class T, class cl_T, class fftw_T >
large_3D_backward_in_place_complex_planar_to_complex_planar()4909 void large_3D_backward_in_place_complex_planar_to_complex_planar()
4910 {
4911 std::vector<size_t> lengths;
4912 lengths.push_back(large7);
4913 lengths.push_back(3);
4914 lengths.push_back(3);
4915 size_t batch = 1;
4916 std::vector<size_t> input_strides;
4917 std::vector<size_t> output_strides;
4918 size_t input_distance = 0;
4919 size_t output_distance = 0;
4920 layout::buffer_layout_t in_layout = layout::complex_planar;
4921 layout::buffer_layout_t out_layout = layout::complex_planar;
4922 placeness::placeness_t placeness = placeness::in_place;
4923 direction::direction_t direction = direction::backward;
4924
4925 data_pattern pattern = sawtooth;
4926 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
4927 }
4928
TEST_F(accuracy_test_pow7_single,large_3D_backward_in_place_complex_planar_to_complex_planar)4929 TEST_F(accuracy_test_pow7_single, large_3D_backward_in_place_complex_planar_to_complex_planar)
4930 {
4931 try { large_3D_backward_in_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
4932 catch (const std::exception& err) { handle_exception(err); }
4933 }
4934
TEST_F(accuracy_test_pow7_double,large_3D_backward_in_place_complex_planar_to_complex_planar)4935 TEST_F(accuracy_test_pow7_double, large_3D_backward_in_place_complex_planar_to_complex_planar)
4936 {
4937 try { large_3D_backward_in_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
4938 catch (const std::exception& err) { handle_exception(err); }
4939 }
4940
4941 // *****************************************************
4942 // *****************************************************
4943 template< class T, class cl_T, class fftw_T >
large_3D_forward_in_place_complex_interleaved_to_complex_interleaved()4944 void large_3D_forward_in_place_complex_interleaved_to_complex_interleaved()
4945 {
4946 std::vector<size_t> lengths;
4947 lengths.push_back(large7);
4948 lengths.push_back(3);
4949 lengths.push_back(3);
4950 size_t batch = 1;
4951 std::vector<size_t> input_strides;
4952 std::vector<size_t> output_strides;
4953 size_t input_distance = 0;
4954 size_t output_distance = 0;
4955 layout::buffer_layout_t in_layout = layout::complex_interleaved;
4956 layout::buffer_layout_t out_layout = layout::complex_interleaved;
4957 placeness::placeness_t placeness = placeness::in_place;
4958 direction::direction_t direction = direction::forward;
4959
4960 data_pattern pattern = sawtooth;
4961 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
4962 }
4963
TEST_F(accuracy_test_pow7_single,large_3D_forward_in_place_complex_interleaved_to_complex_interleaved)4964 TEST_F(accuracy_test_pow7_single, large_3D_forward_in_place_complex_interleaved_to_complex_interleaved)
4965 {
4966 try { large_3D_forward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
4967 catch (const std::exception& err) { handle_exception(err); }
4968 }
4969
TEST_F(accuracy_test_pow7_double,large_3D_forward_in_place_complex_interleaved_to_complex_interleaved)4970 TEST_F(accuracy_test_pow7_double, large_3D_forward_in_place_complex_interleaved_to_complex_interleaved)
4971 {
4972 try { large_3D_forward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
4973 catch (const std::exception& err) { handle_exception(err); }
4974 }
4975
4976 // *****************************************************
4977 // *****************************************************
4978 template< class T, class cl_T, class fftw_T >
large_3D_backward_in_place_complex_interleaved_to_complex_interleaved()4979 void large_3D_backward_in_place_complex_interleaved_to_complex_interleaved()
4980 {
4981 std::vector<size_t> lengths;
4982 lengths.push_back(large7);
4983 lengths.push_back(3);
4984 lengths.push_back(3);
4985 size_t batch = 1;
4986 std::vector<size_t> input_strides;
4987 std::vector<size_t> output_strides;
4988 size_t input_distance = 0;
4989 size_t output_distance = 0;
4990 layout::buffer_layout_t in_layout = layout::complex_interleaved;
4991 layout::buffer_layout_t out_layout = layout::complex_interleaved;
4992 placeness::placeness_t placeness = placeness::in_place;
4993 direction::direction_t direction = direction::backward;
4994
4995 data_pattern pattern = sawtooth;
4996 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
4997 }
4998
TEST_F(accuracy_test_pow7_single,large_3D_backward_in_place_complex_interleaved_to_complex_interleaved)4999 TEST_F(accuracy_test_pow7_single, large_3D_backward_in_place_complex_interleaved_to_complex_interleaved)
5000 {
5001 try { large_3D_backward_in_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
5002 catch (const std::exception& err) { handle_exception(err); }
5003 }
5004
TEST_F(accuracy_test_pow7_double,large_3D_backward_in_place_complex_interleaved_to_complex_interleaved)5005 TEST_F(accuracy_test_pow7_double, large_3D_backward_in_place_complex_interleaved_to_complex_interleaved)
5006 {
5007 try { large_3D_backward_in_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
5008 catch (const std::exception& err) { handle_exception(err); }
5009 }
5010
5011 // *****************************************************
5012 // *****************************************************
5013 template< class T, class cl_T, class fftw_T >
large_3D_forward_out_of_place_complex_planar_to_complex_planar()5014 void large_3D_forward_out_of_place_complex_planar_to_complex_planar()
5015 {
5016 std::vector<size_t> lengths;
5017 lengths.push_back(large7);
5018 lengths.push_back(3);
5019 lengths.push_back(3);
5020 size_t batch = 1;
5021 std::vector<size_t> input_strides;
5022 std::vector<size_t> output_strides;
5023 size_t input_distance = 0;
5024 size_t output_distance = 0;
5025 layout::buffer_layout_t in_layout = layout::complex_planar;
5026 layout::buffer_layout_t out_layout = layout::complex_planar;
5027 placeness::placeness_t placeness = placeness::out_of_place;
5028 direction::direction_t direction = direction::forward;
5029
5030 data_pattern pattern = sawtooth;
5031 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
5032 }
5033
TEST_F(accuracy_test_pow7_single,large_3D_forward_out_of_place_complex_planar_to_complex_planar)5034 TEST_F(accuracy_test_pow7_single, large_3D_forward_out_of_place_complex_planar_to_complex_planar)
5035 {
5036 try { large_3D_forward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
5037 catch (const std::exception& err) { handle_exception(err); }
5038 }
5039
TEST_F(accuracy_test_pow7_double,large_3D_forward_out_of_place_complex_planar_to_complex_planar)5040 TEST_F(accuracy_test_pow7_double, large_3D_forward_out_of_place_complex_planar_to_complex_planar)
5041 {
5042 try { large_3D_forward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
5043 catch (const std::exception& err) { handle_exception(err); }
5044 }
5045
5046 // *****************************************************
5047 // *****************************************************
5048 template< class T, class cl_T, class fftw_T >
large_3D_backward_out_of_place_complex_planar_to_complex_planar()5049 void large_3D_backward_out_of_place_complex_planar_to_complex_planar()
5050 {
5051 std::vector<size_t> lengths;
5052 lengths.push_back(large7);
5053 lengths.push_back(3);
5054 lengths.push_back(3);
5055 size_t batch = 1;
5056 std::vector<size_t> input_strides;
5057 std::vector<size_t> output_strides;
5058 size_t input_distance = 0;
5059 size_t output_distance = 0;
5060 layout::buffer_layout_t in_layout = layout::complex_planar;
5061 layout::buffer_layout_t out_layout = layout::complex_planar;
5062 placeness::placeness_t placeness = placeness::out_of_place;
5063 direction::direction_t direction = direction::backward;
5064
5065 data_pattern pattern = sawtooth;
5066 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
5067 }
5068
TEST_F(accuracy_test_pow7_single,large_3D_backward_out_of_place_complex_planar_to_complex_planar)5069 TEST_F(accuracy_test_pow7_single, large_3D_backward_out_of_place_complex_planar_to_complex_planar)
5070 {
5071 try { large_3D_backward_out_of_place_complex_planar_to_complex_planar< float, cl_float, fftwf_complex >(); }
5072 catch (const std::exception& err) { handle_exception(err); }
5073 }
5074
TEST_F(accuracy_test_pow7_double,large_3D_backward_out_of_place_complex_planar_to_complex_planar)5075 TEST_F(accuracy_test_pow7_double, large_3D_backward_out_of_place_complex_planar_to_complex_planar)
5076 {
5077 try { large_3D_backward_out_of_place_complex_planar_to_complex_planar< double, cl_double, fftw_complex >(); }
5078 catch (const std::exception& err) { handle_exception(err); }
5079 }
5080
5081 // *****************************************************
5082 // *****************************************************
5083 template< class T, class cl_T, class fftw_T >
large_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved()5084 void large_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved()
5085 {
5086 std::vector<size_t> lengths;
5087 lengths.push_back(large7);
5088 lengths.push_back(3);
5089 lengths.push_back(3);
5090 size_t batch = 1;
5091 std::vector<size_t> input_strides;
5092 std::vector<size_t> output_strides;
5093 size_t input_distance = 0;
5094 size_t output_distance = 0;
5095 layout::buffer_layout_t in_layout = layout::complex_interleaved;
5096 layout::buffer_layout_t out_layout = layout::complex_interleaved;
5097 placeness::placeness_t placeness = placeness::out_of_place;
5098 direction::direction_t direction = direction::forward;
5099
5100 data_pattern pattern = sawtooth;
5101 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
5102 }
5103
TEST_F(accuracy_test_pow7_single,large_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved)5104 TEST_F(accuracy_test_pow7_single, large_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
5105 {
5106 try { large_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
5107 catch (const std::exception& err) { handle_exception(err); }
5108 }
5109
TEST_F(accuracy_test_pow7_double,large_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved)5110 TEST_F(accuracy_test_pow7_double, large_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved)
5111 {
5112 try { large_3D_forward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
5113 catch (const std::exception& err) { handle_exception(err); }
5114 }
5115
5116 // *****************************************************
5117 // *****************************************************
5118 template< class T, class cl_T, class fftw_T >
large_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved()5119 void large_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved()
5120 {
5121 std::vector<size_t> lengths;
5122 lengths.push_back(large7);
5123 lengths.push_back(3);
5124 lengths.push_back(3);
5125 size_t batch = 1;
5126 std::vector<size_t> input_strides;
5127 std::vector<size_t> output_strides;
5128 size_t input_distance = 0;
5129 size_t output_distance = 0;
5130 layout::buffer_layout_t in_layout = layout::complex_interleaved;
5131 layout::buffer_layout_t out_layout = layout::complex_interleaved;
5132 placeness::placeness_t placeness = placeness::out_of_place;
5133 direction::direction_t direction = direction::backward;
5134
5135 data_pattern pattern = sawtooth;
5136 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
5137 }
5138
TEST_F(accuracy_test_pow7_single,large_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved)5139 TEST_F(accuracy_test_pow7_single, large_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
5140 {
5141 try { large_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
5142 catch (const std::exception& err) { handle_exception(err); }
5143 }
5144
TEST_F(accuracy_test_pow7_double,large_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved)5145 TEST_F(accuracy_test_pow7_double, large_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved)
5146 {
5147 try { large_3D_backward_out_of_place_complex_interleaved_to_complex_interleaved< double, cl_double, fftw_complex >(); }
5148 catch (const std::exception& err) { handle_exception(err); }
5149 }
5150
5151 // *****************************************************
5152 // *****************************************************
5153 template< class T, class cl_T, class fftw_T >
large_3D_forward_out_of_place_complex_planar_to_complex_interleaved()5154 void large_3D_forward_out_of_place_complex_planar_to_complex_interleaved()
5155 {
5156 std::vector<size_t> lengths;
5157 lengths.push_back(large7);
5158 lengths.push_back(3);
5159 lengths.push_back(3);
5160 size_t batch = 1;
5161 std::vector<size_t> input_strides;
5162 std::vector<size_t> output_strides;
5163 size_t input_distance = 0;
5164 size_t output_distance = 0;
5165 layout::buffer_layout_t in_layout = layout::complex_planar;
5166 layout::buffer_layout_t out_layout = layout::complex_interleaved;
5167 placeness::placeness_t placeness = placeness::out_of_place;
5168 direction::direction_t direction = direction::forward;
5169
5170 data_pattern pattern = sawtooth;
5171 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
5172 }
5173
TEST_F(accuracy_test_pow7_single,large_3D_forward_out_of_place_complex_planar_to_complex_interleaved)5174 TEST_F(accuracy_test_pow7_single, large_3D_forward_out_of_place_complex_planar_to_complex_interleaved)
5175 {
5176 try { large_3D_forward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
5177 catch (const std::exception& err) { handle_exception(err); }
5178 }
5179
TEST_F(accuracy_test_pow7_double,large_3D_forward_out_of_place_complex_planar_to_complex_interleaved)5180 TEST_F(accuracy_test_pow7_double, large_3D_forward_out_of_place_complex_planar_to_complex_interleaved)
5181 {
5182 try { large_3D_forward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
5183 catch (const std::exception& err) { handle_exception(err); }
5184 }
5185
5186 // *****************************************************
5187 // *****************************************************
5188 template< class T, class cl_T, class fftw_T >
large_3D_backward_out_of_place_complex_planar_to_complex_interleaved()5189 void large_3D_backward_out_of_place_complex_planar_to_complex_interleaved()
5190 {
5191 std::vector<size_t> lengths;
5192 lengths.push_back(3);
5193 lengths.push_back(3);
5194 lengths.push_back(large7);
5195 size_t batch = 1;
5196 std::vector<size_t> input_strides;
5197 std::vector<size_t> output_strides;
5198 size_t input_distance = 0;
5199 size_t output_distance = 0;
5200 layout::buffer_layout_t in_layout = layout::complex_planar;
5201 layout::buffer_layout_t out_layout = layout::complex_interleaved;
5202 placeness::placeness_t placeness = placeness::out_of_place;
5203 direction::direction_t direction = direction::backward;
5204
5205 data_pattern pattern = sawtooth;
5206 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
5207 }
5208
TEST_F(accuracy_test_pow7_single,large_3D_backward_out_of_place_complex_planar_to_complex_interleaved)5209 TEST_F(accuracy_test_pow7_single, large_3D_backward_out_of_place_complex_planar_to_complex_interleaved)
5210 {
5211 try { large_3D_backward_out_of_place_complex_planar_to_complex_interleaved< float, cl_float, fftwf_complex >(); }
5212 catch (const std::exception& err) { handle_exception(err); }
5213 }
5214
TEST_F(accuracy_test_pow7_double,large_3D_backward_out_of_place_complex_planar_to_complex_interleaved)5215 TEST_F(accuracy_test_pow7_double, large_3D_backward_out_of_place_complex_planar_to_complex_interleaved)
5216 {
5217 try { large_3D_backward_out_of_place_complex_planar_to_complex_interleaved< double, cl_double, fftw_complex >(); }
5218 catch (const std::exception& err) { handle_exception(err); }
5219 }
5220
5221 // *****************************************************
5222 // *****************************************************
5223 template< class T, class cl_T, class fftw_T >
large_3D_forward_out_of_place_complex_interleaved_to_complex_planar()5224 void large_3D_forward_out_of_place_complex_interleaved_to_complex_planar()
5225 {
5226 std::vector<size_t> lengths;
5227 lengths.push_back(3);
5228 lengths.push_back(large7);
5229 lengths.push_back(3);
5230 size_t batch = 1;
5231 std::vector<size_t> input_strides;
5232 std::vector<size_t> output_strides;
5233 size_t input_distance = 0;
5234 size_t output_distance = 0;
5235 layout::buffer_layout_t in_layout = layout::complex_interleaved;
5236 layout::buffer_layout_t out_layout = layout::complex_planar;
5237 placeness::placeness_t placeness = placeness::out_of_place;
5238 direction::direction_t direction = direction::forward;
5239
5240 data_pattern pattern = sawtooth;
5241 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
5242 }
5243
TEST_F(accuracy_test_pow7_single,large_3D_forward_out_of_place_complex_interleaved_to_complex_planar)5244 TEST_F(accuracy_test_pow7_single, large_3D_forward_out_of_place_complex_interleaved_to_complex_planar)
5245 {
5246 try { large_3D_forward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
5247 catch (const std::exception& err) { handle_exception(err); }
5248 }
5249
TEST_F(accuracy_test_pow7_double,large_3D_forward_out_of_place_complex_interleaved_to_complex_planar)5250 TEST_F(accuracy_test_pow7_double, large_3D_forward_out_of_place_complex_interleaved_to_complex_planar)
5251 {
5252 try { large_3D_forward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
5253 catch (const std::exception& err) { handle_exception(err); }
5254 }
5255
5256 // *****************************************************
5257 // *****************************************************
5258 template< class T, class cl_T, class fftw_T >
large_3D_backward_out_of_place_complex_interleaved_to_complex_planar()5259 void large_3D_backward_out_of_place_complex_interleaved_to_complex_planar()
5260 {
5261 std::vector<size_t> lengths;
5262 lengths.push_back(large7);
5263 lengths.push_back(3);
5264 lengths.push_back(3);
5265 size_t batch = 1;
5266 std::vector<size_t> input_strides;
5267 std::vector<size_t> output_strides;
5268 size_t input_distance = 0;
5269 size_t output_distance = 0;
5270 layout::buffer_layout_t in_layout = layout::complex_interleaved;
5271 layout::buffer_layout_t out_layout = layout::complex_planar;
5272 placeness::placeness_t placeness = placeness::out_of_place;
5273 direction::direction_t direction = direction::backward;
5274
5275 data_pattern pattern = sawtooth;
5276 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
5277 }
5278
TEST_F(accuracy_test_pow7_single,large_3D_backward_out_of_place_complex_interleaved_to_complex_planar)5279 TEST_F(accuracy_test_pow7_single, large_3D_backward_out_of_place_complex_interleaved_to_complex_planar)
5280 {
5281 try { large_3D_backward_out_of_place_complex_interleaved_to_complex_planar< float, cl_float, fftwf_complex >(); }
5282 catch (const std::exception& err) { handle_exception(err); }
5283 }
5284
TEST_F(accuracy_test_pow7_double,large_3D_backward_out_of_place_complex_interleaved_to_complex_planar)5285 TEST_F(accuracy_test_pow7_double, large_3D_backward_out_of_place_complex_interleaved_to_complex_planar)
5286 {
5287 try { large_3D_backward_out_of_place_complex_interleaved_to_complex_planar< double, cl_double, fftw_complex >(); }
5288 catch (const std::exception& err) { handle_exception(err); }
5289 }
5290
5291 // *****************************************************
5292 // *****************************************************
5293 template< class T, class cl_T, class fftw_T >
large_3D_in_place_real_to_hermitian_interleaved()5294 void large_3D_in_place_real_to_hermitian_interleaved()
5295 {
5296 std::vector<size_t> lengths;
5297 lengths.push_back(3);
5298 lengths.push_back(3);
5299 lengths.push_back(large7);
5300 size_t batch = 1;
5301 std::vector<size_t> input_strides;
5302 std::vector<size_t> output_strides;
5303 size_t input_distance = 0;
5304 size_t output_distance = 0;
5305 layout::buffer_layout_t layout = layout::hermitian_interleaved;
5306 placeness::placeness_t placeness = placeness::in_place;
5307
5308 data_pattern pattern = sawtooth;
5309 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
5310 }
5311
TEST_F(accuracy_test_pow7_single,large_3D_in_place_real_to_hermitian_interleaved)5312 TEST_F(accuracy_test_pow7_single, large_3D_in_place_real_to_hermitian_interleaved)
5313 {
5314 try { large_3D_in_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
5315 catch (const std::exception& err) { handle_exception(err); }
5316 }
5317
TEST_F(accuracy_test_pow7_double,large_3D_in_place_real_to_hermitian_interleaved)5318 TEST_F(accuracy_test_pow7_double, large_3D_in_place_real_to_hermitian_interleaved)
5319 {
5320 try { large_3D_in_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
5321 catch (const std::exception& err) { handle_exception(err); }
5322 }
5323
5324 // *****************************************************
5325 // *****************************************************
5326 template< class T, class cl_T, class fftw_T >
large_3D_in_place_hermitian_interleaved_to_real()5327 void large_3D_in_place_hermitian_interleaved_to_real()
5328 {
5329 std::vector<size_t> lengths;
5330 lengths.push_back(large7);
5331 lengths.push_back(3);
5332 lengths.push_back(3);
5333 size_t batch = 1;
5334 std::vector<size_t> input_strides;
5335 std::vector<size_t> output_strides;
5336 size_t input_distance = 0;
5337 size_t output_distance = 0;
5338 layout::buffer_layout_t layout = layout::hermitian_interleaved;
5339 placeness::placeness_t placeness = placeness::in_place;
5340
5341 data_pattern pattern = sawtooth;
5342 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
5343 }
5344
TEST_F(accuracy_test_pow7_single,large_3D_in_place_hermitian_interleaved_to_real)5345 TEST_F(accuracy_test_pow7_single, large_3D_in_place_hermitian_interleaved_to_real)
5346 {
5347 try { large_3D_in_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
5348 catch (const std::exception& err) { handle_exception(err); }
5349 }
5350
TEST_F(accuracy_test_pow7_double,large_3D_in_place_hermitian_interleaved_to_real)5351 TEST_F(accuracy_test_pow7_double, large_3D_in_place_hermitian_interleaved_to_real)
5352 {
5353 try { large_3D_in_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
5354 catch (const std::exception& err) { handle_exception(err); }
5355 }
5356
5357 // *****************************************************
5358 // *****************************************************
5359 template< class T, class cl_T, class fftw_T >
large_3D_out_of_place_real_to_hermitian_interleaved()5360 void large_3D_out_of_place_real_to_hermitian_interleaved()
5361 {
5362 std::vector<size_t> lengths;
5363 lengths.push_back(large7);
5364 lengths.push_back(3);
5365 lengths.push_back(3);
5366 size_t batch = 1;
5367 std::vector<size_t> input_strides;
5368 std::vector<size_t> output_strides;
5369 size_t input_distance = 0;
5370 size_t output_distance = 0;
5371 layout::buffer_layout_t layout = layout::hermitian_interleaved;
5372 placeness::placeness_t placeness = placeness::out_of_place;
5373
5374 data_pattern pattern = sawtooth;
5375 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
5376 }
5377
TEST_F(accuracy_test_pow7_single,large_3D_out_of_place_real_to_hermitian_interleaved)5378 TEST_F(accuracy_test_pow7_single, large_3D_out_of_place_real_to_hermitian_interleaved)
5379 {
5380 try { large_3D_out_of_place_real_to_hermitian_interleaved< float, cl_float, fftwf_complex >(); }
5381 catch (const std::exception& err) { handle_exception(err); }
5382 }
5383
TEST_F(accuracy_test_pow7_double,large_3D_out_of_place_real_to_hermitian_interleaved)5384 TEST_F(accuracy_test_pow7_double, large_3D_out_of_place_real_to_hermitian_interleaved)
5385 {
5386 try { large_3D_out_of_place_real_to_hermitian_interleaved< double, cl_double, fftw_complex >(); }
5387 catch (const std::exception& err) { handle_exception(err); }
5388 }
5389
5390 // *****************************************************
5391 // *****************************************************
5392 template< class T, class cl_T, class fftw_T >
large_3D_out_of_place_hermitian_interleaved_to_real()5393 void large_3D_out_of_place_hermitian_interleaved_to_real()
5394 {
5395 std::vector<size_t> lengths;
5396 lengths.push_back(large7);
5397 lengths.push_back(3);
5398 lengths.push_back(3);
5399 size_t batch = 1;
5400 std::vector<size_t> input_strides;
5401 std::vector<size_t> output_strides;
5402 size_t input_distance = 0;
5403 size_t output_distance = 0;
5404 layout::buffer_layout_t layout = layout::hermitian_interleaved;
5405 placeness::placeness_t placeness = placeness::out_of_place;
5406
5407 data_pattern pattern = sawtooth;
5408 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
5409 }
5410
TEST_F(accuracy_test_pow7_single,large_3D_out_of_place_hermitian_interleaved_to_real)5411 TEST_F(accuracy_test_pow7_single, large_3D_out_of_place_hermitian_interleaved_to_real)
5412 {
5413 try { large_3D_out_of_place_hermitian_interleaved_to_real< float, cl_float, fftwf_complex >(); }
5414 catch (const std::exception& err) { handle_exception(err); }
5415 }
5416
TEST_F(accuracy_test_pow7_double,large_3D_out_of_place_hermitian_interleaved_to_real)5417 TEST_F(accuracy_test_pow7_double, large_3D_out_of_place_hermitian_interleaved_to_real)
5418 {
5419 try { large_3D_out_of_place_hermitian_interleaved_to_real< double, cl_double, fftw_complex >(); }
5420 catch (const std::exception& err) { handle_exception(err); }
5421 }
5422
5423 // *****************************************************
5424 // *****************************************************
5425 template< class T, class cl_T, class fftw_T >
large_3D_out_of_place_real_to_hermitian_planar()5426 void large_3D_out_of_place_real_to_hermitian_planar()
5427 {
5428 std::vector<size_t> lengths;
5429 lengths.push_back(large7);
5430 lengths.push_back(3);
5431 lengths.push_back(3);
5432 size_t batch = 1;
5433 std::vector<size_t> input_strides;
5434 std::vector<size_t> output_strides;
5435 size_t input_distance = 0;
5436 size_t output_distance = 0;
5437 layout::buffer_layout_t layout = layout::hermitian_planar;
5438 placeness::placeness_t placeness = placeness::out_of_place;
5439
5440 data_pattern pattern = sawtooth;
5441 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
5442 }
5443
TEST_F(accuracy_test_pow7_single,large_3D_out_of_place_real_to_hermitian_planar)5444 TEST_F(accuracy_test_pow7_single, large_3D_out_of_place_real_to_hermitian_planar)
5445 {
5446 try { large_3D_out_of_place_real_to_hermitian_planar< float, cl_float, fftwf_complex >(); }
5447 catch (const std::exception& err) { handle_exception(err); }
5448 }
5449
TEST_F(accuracy_test_pow7_double,large_3D_out_of_place_real_to_hermitian_planar)5450 TEST_F(accuracy_test_pow7_double, large_3D_out_of_place_real_to_hermitian_planar)
5451 {
5452 try { large_3D_out_of_place_real_to_hermitian_planar< double, cl_double, fftw_complex >(); }
5453 catch (const std::exception& err) { handle_exception(err); }
5454 }
5455
5456 // *****************************************************
5457 // *****************************************************
5458 template< class T, class cl_T, class fftw_T >
large_3D_out_of_place_hermitian_planar_to_real()5459 void large_3D_out_of_place_hermitian_planar_to_real()
5460 {
5461 std::vector<size_t> lengths;
5462 lengths.push_back(3);
5463 lengths.push_back(large7);
5464 lengths.push_back(3);
5465 size_t batch = 1;
5466 std::vector<size_t> input_strides;
5467 std::vector<size_t> output_strides;
5468 size_t input_distance = 0;
5469 size_t output_distance = 0;
5470 layout::buffer_layout_t layout = layout::hermitian_planar;
5471 placeness::placeness_t placeness = placeness::out_of_place;
5472
5473 data_pattern pattern = sawtooth;
5474 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
5475 }
5476
TEST_F(accuracy_test_pow7_single,large_3D_out_of_place_hermitian_planar_to_real)5477 TEST_F(accuracy_test_pow7_single, large_3D_out_of_place_hermitian_planar_to_real)
5478 {
5479 try { large_3D_out_of_place_hermitian_planar_to_real< float, cl_float, fftwf_complex >(); }
5480 catch (const std::exception& err) { handle_exception(err); }
5481 }
5482
TEST_F(accuracy_test_pow7_double,large_3D_out_of_place_hermitian_planar_to_real)5483 TEST_F(accuracy_test_pow7_double, large_3D_out_of_place_hermitian_planar_to_real)
5484 {
5485 try { large_3D_out_of_place_hermitian_planar_to_real< double, cl_double, fftw_complex >(); }
5486 catch (const std::exception& err) { handle_exception(err); }
5487 }
5488
5489 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
5490 // ^^^^^^^^^^^^^^^^^^^^^^^ special ^^^^^^^^^^^^^^^^^^^^^^^^ //
5491 // ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ //
5492
5493 // *****************************************************
5494 // *****************************************************
5495 template< class T, class cl_T, class fftw_T >
normal_1D_array_complex_to_complex()5496 void normal_1D_array_complex_to_complex()
5497 {
5498 std::vector<size_t> lengths;
5499 lengths.push_back(normal7);
5500 size_t batch = 8;
5501 std::vector<size_t> input_strides;
5502 std::vector<size_t> output_strides;
5503 size_t input_distance = 0;
5504 size_t output_distance = 0;
5505 layout::buffer_layout_t in_layout = layout::complex_interleaved;
5506 layout::buffer_layout_t out_layout = layout::complex_interleaved;
5507 placeness::placeness_t placeness = placeness::in_place;
5508 direction::direction_t direction = direction::forward;
5509
5510 data_pattern pattern = sawtooth;
5511 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
5512 }
5513
TEST_F(accuracy_test_pow7_single,normal_1D_array_complex_to_complex)5514 TEST_F(accuracy_test_pow7_single, normal_1D_array_complex_to_complex)
5515 {
5516 try { normal_1D_array_complex_to_complex< float, cl_float, fftwf_complex >(); }
5517 catch (const std::exception& err) { handle_exception(err); }
5518 }
5519
TEST_F(accuracy_test_pow7_double,normal_1D_array_complex_to_complex)5520 TEST_F(accuracy_test_pow7_double, normal_1D_array_complex_to_complex)
5521 {
5522 try { normal_1D_array_complex_to_complex< double, cl_double, fftw_complex >(); }
5523 catch (const std::exception& err) { handle_exception(err); }
5524 }
5525
5526 // *****************************************************
5527 // *****************************************************
5528 template< class T, class cl_T, class fftw_T >
normal_1D_array_complex_to_complex_with_odd_batch_size()5529 void normal_1D_array_complex_to_complex_with_odd_batch_size()
5530 {
5531 std::vector<size_t> lengths;
5532 lengths.push_back(normal7);
5533 size_t batch = 5;
5534 std::vector<size_t> input_strides;
5535 std::vector<size_t> output_strides;
5536 size_t input_distance = 0;
5537 size_t output_distance = 0;
5538 layout::buffer_layout_t in_layout = layout::complex_interleaved;
5539 layout::buffer_layout_t out_layout = layout::complex_interleaved;
5540 placeness::placeness_t placeness = placeness::in_place;
5541 direction::direction_t direction = direction::forward;
5542
5543 data_pattern pattern = sawtooth;
5544 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
5545 }
5546
TEST_F(accuracy_test_pow7_single,normal_1D_array_complex_to_complex_with_odd_batch_size)5547 TEST_F(accuracy_test_pow7_single, normal_1D_array_complex_to_complex_with_odd_batch_size)
5548 {
5549 try { normal_1D_array_complex_to_complex_with_odd_batch_size< float, cl_float, fftwf_complex >(); }
5550 catch (const std::exception& err) { handle_exception(err); }
5551 }
5552
TEST_F(accuracy_test_pow7_double,normal_1D_array_complex_to_complex_with_odd_batch_size)5553 TEST_F(accuracy_test_pow7_double, normal_1D_array_complex_to_complex_with_odd_batch_size)
5554 {
5555 try { normal_1D_array_complex_to_complex_with_odd_batch_size< double, cl_double, fftw_complex >(); }
5556 catch (const std::exception& err) { handle_exception(err); }
5557 }
5558
5559 // *****************************************************
5560 // *****************************************************
5561 template< class T, class cl_T, class fftw_T >
normal_1D_array_real_to_hermitian()5562 void normal_1D_array_real_to_hermitian()
5563 {
5564 std::vector<size_t> lengths;
5565 lengths.push_back(normal7);
5566 size_t batch = 8;
5567 std::vector<size_t> input_strides;
5568 std::vector<size_t> output_strides;
5569 size_t input_distance = 0;
5570 size_t output_distance = 0;
5571 layout::buffer_layout_t layout = layout::hermitian_interleaved;
5572 placeness::placeness_t placeness = placeness::in_place;
5573
5574 data_pattern pattern = sawtooth;
5575 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
5576 }
5577
TEST_F(accuracy_test_pow7_single,normal_1D_array_real_to_hermitian)5578 TEST_F(accuracy_test_pow7_single, normal_1D_array_real_to_hermitian)
5579 {
5580 try { normal_1D_array_real_to_hermitian< float, cl_float, fftwf_complex >(); }
5581 catch (const std::exception& err) { handle_exception(err); }
5582 }
5583
TEST_F(accuracy_test_pow7_double,normal_1D_array_real_to_hermitian)5584 TEST_F(accuracy_test_pow7_double, normal_1D_array_real_to_hermitian)
5585 {
5586 try { normal_1D_array_real_to_hermitian< double, cl_double, fftw_complex >(); }
5587 catch (const std::exception& err) { handle_exception(err); }
5588 }
5589
5590 // *****************************************************
5591 // *****************************************************
5592 template< class T, class cl_T, class fftw_T >
normal_1D_array_real_to_hermitian_with_odd_batch_size()5593 void normal_1D_array_real_to_hermitian_with_odd_batch_size()
5594 {
5595 std::vector<size_t> lengths;
5596 lengths.push_back(normal7);
5597 size_t batch = 5;
5598 std::vector<size_t> input_strides;
5599 std::vector<size_t> output_strides;
5600 size_t input_distance = 0;
5601 size_t output_distance = 0;
5602 layout::buffer_layout_t layout = layout::hermitian_interleaved;
5603 placeness::placeness_t placeness = placeness::in_place;
5604
5605 data_pattern pattern = sawtooth;
5606 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
5607 }
5608
TEST_F(accuracy_test_pow7_single,normal_1D_array_real_to_hermitian_with_odd_batch_size)5609 TEST_F(accuracy_test_pow7_single, normal_1D_array_real_to_hermitian_with_odd_batch_size)
5610 {
5611 try { normal_1D_array_real_to_hermitian_with_odd_batch_size< float, cl_float, fftwf_complex >(); }
5612 catch (const std::exception& err) { handle_exception(err); }
5613 }
5614
TEST_F(accuracy_test_pow7_double,normal_1D_array_real_to_hermitian_with_odd_batch_size)5615 TEST_F(accuracy_test_pow7_double, normal_1D_array_real_to_hermitian_with_odd_batch_size)
5616 {
5617 try { normal_1D_array_real_to_hermitian_with_odd_batch_size< double, cl_double, fftw_complex >(); }
5618 catch (const std::exception& err) { handle_exception(err); }
5619 }
5620
5621 // *****************************************************
5622 // *****************************************************
5623 template< class T, class cl_T, class fftw_T >
normal_1D_array_hermitian_to_real()5624 void normal_1D_array_hermitian_to_real()
5625 {
5626 std::vector<size_t> lengths;
5627 lengths.push_back(normal7);
5628 size_t batch = 8;
5629 std::vector<size_t> input_strides;
5630 std::vector<size_t> output_strides;
5631 size_t input_distance = 0;
5632 size_t output_distance = 0;
5633 layout::buffer_layout_t layout = layout::hermitian_interleaved;
5634 placeness::placeness_t placeness = placeness::in_place;
5635
5636 data_pattern pattern = sawtooth;
5637 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
5638 }
5639
TEST_F(accuracy_test_pow7_single,normal_1D_array_hermitian_to_real)5640 TEST_F(accuracy_test_pow7_single, normal_1D_array_hermitian_to_real)
5641 {
5642 try { normal_1D_array_hermitian_to_real< float, cl_float, fftwf_complex >(); }
5643 catch (const std::exception& err) { handle_exception(err); }
5644 }
5645
TEST_F(accuracy_test_pow7_double,normal_1D_array_hermitian_to_real)5646 TEST_F(accuracy_test_pow7_double, normal_1D_array_hermitian_to_real)
5647 {
5648 try { normal_1D_array_hermitian_to_real< double, cl_double, fftw_complex >(); }
5649 catch (const std::exception& err) { handle_exception(err); }
5650 }
5651
5652 // *****************************************************
5653 // *****************************************************
5654 template< class T, class cl_T, class fftw_T >
normal_1D_array_hermitian_to_real_with_odd_batch_size()5655 void normal_1D_array_hermitian_to_real_with_odd_batch_size()
5656 {
5657 std::vector<size_t> lengths;
5658 lengths.push_back(normal7);
5659 size_t batch = 5;
5660 std::vector<size_t> input_strides;
5661 std::vector<size_t> output_strides;
5662 size_t input_distance = 0;
5663 size_t output_distance = 0;
5664 layout::buffer_layout_t layout = layout::hermitian_planar;
5665 placeness::placeness_t placeness = placeness::out_of_place;
5666
5667 data_pattern pattern = sawtooth;
5668 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
5669 }
5670
TEST_F(accuracy_test_pow7_single,normal_1D_array_hermitian_to_real_with_odd_batch_size)5671 TEST_F(accuracy_test_pow7_single, normal_1D_array_hermitian_to_real_with_odd_batch_size)
5672 {
5673 try { normal_1D_array_hermitian_to_real_with_odd_batch_size< float, cl_float, fftwf_complex >(); }
5674 catch (const std::exception& err) { handle_exception(err); }
5675 }
5676
TEST_F(accuracy_test_pow7_double,normal_1D_array_hermitian_to_real_with_odd_batch_size)5677 TEST_F(accuracy_test_pow7_double, normal_1D_array_hermitian_to_real_with_odd_batch_size)
5678 {
5679 try { normal_1D_array_hermitian_to_real_with_odd_batch_size< double, cl_double, fftw_complex >(); }
5680 catch (const std::exception& err) { handle_exception(err); }
5681 }
5682
5683 // *****************************************************
5684 // *****************************************************
5685 template< class T, class cl_T, class fftw_T >
small_2D_array_real_to_hermitian()5686 void small_2D_array_real_to_hermitian()
5687 {
5688 std::vector<size_t> lengths;
5689 lengths.push_back(small7);
5690 lengths.push_back(small7);
5691 size_t batch = 8;
5692 std::vector<size_t> input_strides;
5693 std::vector<size_t> output_strides;
5694 size_t input_distance = 0;
5695 size_t output_distance = 0;
5696 layout::buffer_layout_t layout = layout::hermitian_interleaved;
5697 placeness::placeness_t placeness = placeness::in_place;
5698
5699 data_pattern pattern = sawtooth;
5700 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
5701 }
5702
TEST_F(accuracy_test_pow7_single,small_2D_array_real_to_hermitian)5703 TEST_F(accuracy_test_pow7_single, small_2D_array_real_to_hermitian)
5704 {
5705 try { small_2D_array_real_to_hermitian< float, cl_float, fftwf_complex >(); }
5706 catch (const std::exception& err) { handle_exception(err); }
5707 }
5708
TEST_F(accuracy_test_pow7_double,small_2D_array_real_to_hermitian)5709 TEST_F(accuracy_test_pow7_double, small_2D_array_real_to_hermitian)
5710 {
5711 try { small_2D_array_real_to_hermitian< double, cl_double, fftw_complex >(); }
5712 catch (const std::exception& err) { handle_exception(err); }
5713 }
5714
5715 // *****************************************************
5716 // *****************************************************
5717 template< class T, class cl_T, class fftw_T >
small_2D_array_real_to_hermitian_with_odd_batch_size()5718 void small_2D_array_real_to_hermitian_with_odd_batch_size()
5719 {
5720 std::vector<size_t> lengths;
5721 lengths.push_back(small7);
5722 lengths.push_back(small7);
5723 size_t batch = 5;
5724 std::vector<size_t> input_strides;
5725 std::vector<size_t> output_strides;
5726 size_t input_distance = 0;
5727 size_t output_distance = 0;
5728 layout::buffer_layout_t layout = layout::hermitian_interleaved;
5729 placeness::placeness_t placeness = placeness::in_place;
5730
5731 data_pattern pattern = sawtooth;
5732 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
5733 }
5734
TEST_F(accuracy_test_pow7_single,small_2D_array_real_to_hermitian_with_odd_batch_size)5735 TEST_F(accuracy_test_pow7_single, small_2D_array_real_to_hermitian_with_odd_batch_size)
5736 {
5737 try { small_2D_array_real_to_hermitian_with_odd_batch_size< float, cl_float, fftwf_complex >(); }
5738 catch (const std::exception& err) { handle_exception(err); }
5739 }
5740
TEST_F(accuracy_test_pow7_double,small_2D_array_real_to_hermitian_with_odd_batch_size)5741 TEST_F(accuracy_test_pow7_double, small_2D_array_real_to_hermitian_with_odd_batch_size)
5742 {
5743 try { small_2D_array_real_to_hermitian_with_odd_batch_size< double, cl_double, fftw_complex >(); }
5744 catch (const std::exception& err) { handle_exception(err); }
5745 }
5746
5747 // *****************************************************
5748 // *****************************************************
5749 template< class T, class cl_T, class fftw_T >
small_2D_array_hermitian_to_real()5750 void small_2D_array_hermitian_to_real()
5751 {
5752 std::vector<size_t> lengths;
5753 lengths.push_back(small7);
5754 lengths.push_back(small7);
5755 size_t batch = 8;
5756 std::vector<size_t> input_strides;
5757 std::vector<size_t> output_strides;
5758 size_t input_distance = 0;
5759 size_t output_distance = 0;
5760 layout::buffer_layout_t layout = layout::hermitian_interleaved;
5761 placeness::placeness_t placeness = placeness::in_place;
5762
5763 data_pattern pattern = sawtooth;
5764 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
5765 }
5766
TEST_F(accuracy_test_pow7_single,small_2D_array_hermitian_to_real)5767 TEST_F(accuracy_test_pow7_single, small_2D_array_hermitian_to_real)
5768 {
5769 try { small_2D_array_hermitian_to_real< float, cl_float, fftwf_complex >(); }
5770 catch (const std::exception& err) { handle_exception(err); }
5771 }
5772
TEST_F(accuracy_test_pow7_double,small_2D_array_hermitian_to_real)5773 TEST_F(accuracy_test_pow7_double, small_2D_array_hermitian_to_real)
5774 {
5775 try { small_2D_array_hermitian_to_real< double, cl_double, fftw_complex >(); }
5776 catch (const std::exception& err) { handle_exception(err); }
5777 }
5778
5779 // *****************************************************
5780 // *****************************************************
5781 template< class T, class cl_T, class fftw_T >
small_2D_array_hermitian_to_real_with_odd_batch_size()5782 void small_2D_array_hermitian_to_real_with_odd_batch_size()
5783 {
5784 std::vector<size_t> lengths;
5785 lengths.push_back(small7);
5786 lengths.push_back(small7);
5787 size_t batch = 5;
5788 std::vector<size_t> input_strides;
5789 std::vector<size_t> output_strides;
5790 size_t input_distance = 0;
5791 size_t output_distance = 0;
5792 layout::buffer_layout_t layout = layout::hermitian_planar;
5793 placeness::placeness_t placeness = placeness::out_of_place;
5794
5795 data_pattern pattern = sawtooth;
5796 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
5797 }
5798
TEST_F(accuracy_test_pow7_single,small_2D_array_hermitian_to_real_with_odd_batch_size)5799 TEST_F(accuracy_test_pow7_single, small_2D_array_hermitian_to_real_with_odd_batch_size)
5800 {
5801 try { small_2D_array_hermitian_to_real_with_odd_batch_size< float, cl_float, fftwf_complex >(); }
5802 catch (const std::exception& err) { handle_exception(err); }
5803 }
5804
TEST_F(accuracy_test_pow7_double,small_2D_array_hermitian_to_real_with_odd_batch_size)5805 TEST_F(accuracy_test_pow7_double, small_2D_array_hermitian_to_real_with_odd_batch_size)
5806 {
5807 try { small_2D_array_hermitian_to_real_with_odd_batch_size< double, cl_double, fftw_complex >(); }
5808 catch (const std::exception& err) { handle_exception(err); }
5809 }
5810
5811 // *****************************************************
5812 // *****************************************************
5813 template< class T, class cl_T, class fftw_T >
large_1D_array_complex_to_complex()5814 void large_1D_array_complex_to_complex()
5815 {
5816 std::vector<size_t> lengths;
5817 lengths.push_back(large7);
5818 size_t batch = 2;
5819 std::vector<size_t> input_strides;
5820 std::vector<size_t> output_strides;
5821 size_t input_distance = 0;
5822 size_t output_distance = 0;
5823 layout::buffer_layout_t in_layout = layout::complex_interleaved;
5824 layout::buffer_layout_t out_layout = layout::complex_interleaved;
5825 placeness::placeness_t placeness = placeness::in_place;
5826 direction::direction_t direction = direction::forward;
5827
5828 data_pattern pattern = sawtooth;
5829 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
5830 }
5831
TEST_F(accuracy_test_pow7_single,large_1D_array_complex_to_complex)5832 TEST_F(accuracy_test_pow7_single, large_1D_array_complex_to_complex)
5833 {
5834 try { large_1D_array_complex_to_complex< float, cl_float, fftwf_complex >(); }
5835 catch (const std::exception& err) { handle_exception(err); }
5836 }
5837
TEST_F(accuracy_test_pow7_double,large_1D_array_complex_to_complex)5838 TEST_F(accuracy_test_pow7_double, large_1D_array_complex_to_complex)
5839 {
5840 try { large_1D_array_complex_to_complex< double, cl_double, fftw_complex >(); }
5841 catch (const std::exception& err) { handle_exception(err); }
5842 }
5843
5844 // *****************************************************
5845 // *****************************************************
5846 template< class T, class cl_T, class fftw_T >
astoundingly_large_1D_complex_to_complex()5847 void astoundingly_large_1D_complex_to_complex()
5848 {
5849 std::vector<size_t> lengths;
5850 lengths.push_back(2187);
5851 size_t batch = 65536;
5852 std::vector<size_t> input_strides;
5853 std::vector<size_t> output_strides;
5854 size_t input_distance = 0;
5855 size_t output_distance = 0;
5856 layout::buffer_layout_t in_layout = layout::complex_interleaved;
5857 layout::buffer_layout_t out_layout = layout::complex_interleaved;
5858 placeness::placeness_t placeness = placeness::in_place;
5859 direction::direction_t direction = direction::forward;
5860
5861 data_pattern pattern = sawtooth;
5862 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
5863 }
5864
TEST_F(accuracy_test_pow7_single,DISABLED_astoundingly_large_1D_complex_to_complex)5865 TEST_F(accuracy_test_pow7_single, DISABLED_astoundingly_large_1D_complex_to_complex)
5866 {
5867 try { astoundingly_large_1D_complex_to_complex< float, cl_float, fftwf_complex >(); }
5868 catch (const std::exception& err) { handle_exception(err); }
5869 }
5870
TEST_F(accuracy_test_pow7_double,DISABLED_astoundingly_large_1D_complex_to_complex)5871 TEST_F(accuracy_test_pow7_double, DISABLED_astoundingly_large_1D_complex_to_complex)
5872 {
5873 try { astoundingly_large_1D_complex_to_complex< double, cl_double, fftw_complex >(); }
5874 catch (const std::exception& err) { handle_exception(err); }
5875 }
5876
5877 // *****************************************************
5878 // *****************************************************
5879 template< class T, class cl_T, class fftw_T >
very_small_1D_non_unit_stride_complex_to_complex()5880 void very_small_1D_non_unit_stride_complex_to_complex()
5881 {
5882 std::vector<size_t> lengths;
5883 lengths.push_back(9);
5884 size_t batch = 1;
5885 std::vector<size_t> input_strides;
5886 std::vector<size_t> output_strides;
5887 input_strides.push_back(3);
5888 output_strides.push_back(3);
5889 size_t input_distance = 0;
5890 size_t output_distance = 0;
5891 layout::buffer_layout_t in_layout = layout::complex_planar;
5892 layout::buffer_layout_t out_layout = layout::complex_interleaved;
5893 placeness::placeness_t placeness = placeness::out_of_place;
5894 direction::direction_t direction = direction::forward;
5895
5896 data_pattern pattern = sawtooth;
5897 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
5898 }
5899
TEST_F(accuracy_test_pow7_single,very_small_1D_non_unit_stride_complex_to_complex)5900 TEST_F(accuracy_test_pow7_single, very_small_1D_non_unit_stride_complex_to_complex)
5901 {
5902 try { very_small_1D_non_unit_stride_complex_to_complex< float, cl_float, fftwf_complex >(); }
5903 catch (const std::exception& err) { handle_exception(err); }
5904 }
5905
TEST_F(accuracy_test_pow7_double,very_small_1D_non_unit_stride_complex_to_complex)5906 TEST_F(accuracy_test_pow7_double, very_small_1D_non_unit_stride_complex_to_complex)
5907 {
5908 try { very_small_1D_non_unit_stride_complex_to_complex< double, cl_double, fftw_complex >(); }
5909 catch (const std::exception& err) { handle_exception(err); }
5910 }
5911
5912 // *****************************************************
5913 // *****************************************************
5914 template< class T, class cl_T, class fftw_T >
small_1D_non_unit_stride_real_to_hermitian()5915 void small_1D_non_unit_stride_real_to_hermitian()
5916 {
5917 std::vector<size_t> lengths;
5918 lengths.push_back(small7);
5919 size_t batch = 1;
5920 std::vector<size_t> input_strides;
5921 std::vector<size_t> output_strides;
5922 input_strides.push_back(3);
5923 output_strides.push_back(3);
5924 size_t input_distance = 0;
5925 size_t output_distance = 0;
5926 layout::buffer_layout_t layout = layout::hermitian_interleaved;
5927 placeness::placeness_t placeness = placeness::out_of_place;
5928
5929 data_pattern pattern = sawtooth;
5930 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
5931 }
5932
TEST_F(accuracy_test_pow7_single,small_1D_non_unit_stride_real_to_hermitian)5933 TEST_F(accuracy_test_pow7_single, small_1D_non_unit_stride_real_to_hermitian)
5934 {
5935 try { small_1D_non_unit_stride_real_to_hermitian< float, cl_float, fftwf_complex >(); }
5936 catch (const std::exception& err) { handle_exception(err); }
5937 }
5938
TEST_F(accuracy_test_pow7_double,small_1D_non_unit_stride_real_to_hermitian)5939 TEST_F(accuracy_test_pow7_double, small_1D_non_unit_stride_real_to_hermitian)
5940 {
5941 try { small_1D_non_unit_stride_real_to_hermitian< double, cl_double, fftw_complex >(); }
5942 catch (const std::exception& err) { handle_exception(err); }
5943 }
5944
5945 // *****************************************************
5946 // *****************************************************
5947 template< class T, class cl_T, class fftw_T >
small_1D_non_unit_stride_hermitian_to_real()5948 void small_1D_non_unit_stride_hermitian_to_real()
5949 {
5950 std::vector<size_t> lengths;
5951 lengths.push_back(small7);
5952 size_t batch = 1;
5953 std::vector<size_t> input_strides;
5954 std::vector<size_t> output_strides;
5955 input_strides.push_back(3);
5956 output_strides.push_back(3);
5957 size_t input_distance = 0;
5958 size_t output_distance = 0;
5959 layout::buffer_layout_t layout = layout::hermitian_interleaved;
5960 placeness::placeness_t placeness = placeness::out_of_place;
5961
5962 data_pattern pattern = sawtooth;
5963 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
5964 }
5965
TEST_F(accuracy_test_pow7_single,small_1D_non_unit_stride_hermitian_to_real)5966 TEST_F(accuracy_test_pow7_single, small_1D_non_unit_stride_hermitian_to_real)
5967 {
5968 try { small_1D_non_unit_stride_hermitian_to_real< float, cl_float, fftwf_complex >(); }
5969 catch (const std::exception& err) { handle_exception(err); }
5970 }
5971
TEST_F(accuracy_test_pow7_double,small_1D_non_unit_stride_hermitian_to_real)5972 TEST_F(accuracy_test_pow7_double, small_1D_non_unit_stride_hermitian_to_real)
5973 {
5974 try { small_1D_non_unit_stride_hermitian_to_real< double, cl_double, fftw_complex >(); }
5975 catch (const std::exception& err) { handle_exception(err); }
5976 }
5977
5978 // *****************************************************
5979 // *****************************************************
5980 template< class T, class cl_T, class fftw_T >
very_small_1D_non_unit_stride_real_to_hermitian()5981 void very_small_1D_non_unit_stride_real_to_hermitian()
5982 {
5983 std::vector<size_t> lengths;
5984 lengths.push_back(27);
5985 size_t batch = 1;
5986 std::vector<size_t> input_strides;
5987 std::vector<size_t> output_strides;
5988 input_strides.push_back(3);
5989 output_strides.push_back(3);
5990 size_t input_distance = 0;
5991 size_t output_distance = 0;
5992 layout::buffer_layout_t layout = layout::hermitian_interleaved;
5993 placeness::placeness_t placeness = placeness::out_of_place;
5994
5995 data_pattern pattern = sawtooth;
5996 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
5997 }
5998
TEST_F(accuracy_test_pow7_single,very_small_1D_non_unit_stride_real_to_hermitian)5999 TEST_F(accuracy_test_pow7_single, very_small_1D_non_unit_stride_real_to_hermitian)
6000 {
6001 try { very_small_1D_non_unit_stride_real_to_hermitian< float, cl_float, fftwf_complex >(); }
6002 catch (const std::exception& err) { handle_exception(err); }
6003 }
6004
TEST_F(accuracy_test_pow7_double,very_small_1D_non_unit_stride_real_to_hermitian)6005 TEST_F(accuracy_test_pow7_double, very_small_1D_non_unit_stride_real_to_hermitian)
6006 {
6007 try { very_small_1D_non_unit_stride_real_to_hermitian< double, cl_double, fftw_complex >(); }
6008 catch (const std::exception& err) { handle_exception(err); }
6009 }
6010
6011 // *****************************************************
6012 // *****************************************************
6013 template< class T, class cl_T, class fftw_T >
very_small_1D_non_unit_stride_hermitian_to_real()6014 void very_small_1D_non_unit_stride_hermitian_to_real()
6015 {
6016 std::vector<size_t> lengths;
6017 lengths.push_back(27);
6018 size_t batch = 1;
6019 std::vector<size_t> input_strides;
6020 std::vector<size_t> output_strides;
6021 input_strides.push_back(3);
6022 output_strides.push_back(3);
6023 size_t input_distance = 0;
6024 size_t output_distance = 0;
6025 layout::buffer_layout_t layout = layout::hermitian_interleaved;
6026 placeness::placeness_t placeness = placeness::out_of_place;
6027
6028 data_pattern pattern = sawtooth;
6029 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
6030 }
6031
TEST_F(accuracy_test_pow7_single,very_small_1D_non_unit_stride_hermitian_to_real)6032 TEST_F(accuracy_test_pow7_single, very_small_1D_non_unit_stride_hermitian_to_real)
6033 {
6034 try { very_small_1D_non_unit_stride_hermitian_to_real< float, cl_float, fftwf_complex >(); }
6035 catch (const std::exception& err) { handle_exception(err); }
6036 }
6037
TEST_F(accuracy_test_pow7_double,very_small_1D_non_unit_stride_hermitian_to_real)6038 TEST_F(accuracy_test_pow7_double, very_small_1D_non_unit_stride_hermitian_to_real)
6039 {
6040 try { very_small_1D_non_unit_stride_hermitian_to_real< double, cl_double, fftw_complex >(); }
6041 catch (const std::exception& err) { handle_exception(err); }
6042 }
6043
6044 // *****************************************************
6045 // *****************************************************
6046 template< class T, class cl_T, class fftw_T >
very_very_small_1D_non_unit_stride_real_to_hermitian()6047 void very_very_small_1D_non_unit_stride_real_to_hermitian()
6048 {
6049 std::vector<size_t> lengths;
6050 lengths.push_back(9);
6051 size_t batch = 1;
6052 std::vector<size_t> input_strides;
6053 std::vector<size_t> output_strides;
6054 input_strides.push_back(3);
6055 output_strides.push_back(3);
6056 size_t input_distance = 0;
6057 size_t output_distance = 0;
6058 layout::buffer_layout_t layout = layout::hermitian_interleaved;
6059 placeness::placeness_t placeness = placeness::out_of_place;
6060
6061 data_pattern pattern = impulse;
6062 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
6063 }
6064
TEST_F(accuracy_test_pow7_single,very_very_small_1D_non_unit_stride_real_to_hermitian)6065 TEST_F(accuracy_test_pow7_single, very_very_small_1D_non_unit_stride_real_to_hermitian)
6066 {
6067 try { very_very_small_1D_non_unit_stride_real_to_hermitian< float, cl_float, fftwf_complex >(); }
6068 catch (const std::exception& err) { handle_exception(err); }
6069 }
6070
TEST_F(accuracy_test_pow7_double,very_very_small_1D_non_unit_stride_real_to_hermitian)6071 TEST_F(accuracy_test_pow7_double, very_very_small_1D_non_unit_stride_real_to_hermitian)
6072 {
6073 try { very_very_small_1D_non_unit_stride_real_to_hermitian< double, cl_double, fftw_complex >(); }
6074 catch (const std::exception& err) { handle_exception(err); }
6075 }
6076
6077 // *****************************************************
6078 // *****************************************************
6079 template< class T, class cl_T, class fftw_T >
very_very_small_1D_non_unit_stride_hermitian_to_real()6080 void very_very_small_1D_non_unit_stride_hermitian_to_real()
6081 {
6082 std::vector<size_t> lengths;
6083 lengths.push_back(9);
6084 size_t batch = 1;
6085 std::vector<size_t> input_strides;
6086 std::vector<size_t> output_strides;
6087 input_strides.push_back(3);
6088 output_strides.push_back(3);
6089 size_t input_distance = 0;
6090 size_t output_distance = 0;
6091 layout::buffer_layout_t layout = layout::hermitian_interleaved;
6092 placeness::placeness_t placeness = placeness::out_of_place;
6093
6094 data_pattern pattern = impulse;
6095 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
6096 }
6097
TEST_F(accuracy_test_pow7_single,very_very_small_1D_non_unit_stride_hermitian_to_real)6098 TEST_F(accuracy_test_pow7_single, very_very_small_1D_non_unit_stride_hermitian_to_real)
6099 {
6100 try { very_very_small_1D_non_unit_stride_hermitian_to_real< float, cl_float, fftwf_complex >(); }
6101 catch (const std::exception& err) { handle_exception(err); }
6102 }
6103
TEST_F(accuracy_test_pow7_double,very_very_small_1D_non_unit_stride_hermitian_to_real)6104 TEST_F(accuracy_test_pow7_double, very_very_small_1D_non_unit_stride_hermitian_to_real)
6105 {
6106 try { very_very_small_1D_non_unit_stride_hermitian_to_real< double, cl_double, fftw_complex >(); }
6107 catch (const std::exception& err) { handle_exception(err); }
6108 }
6109
6110 // *****************************************************
6111 // *****************************************************
6112 template< class T, class cl_T, class fftw_T >
normal_1D_non_unit_stride_and_distance_complex_to_complex()6113 void normal_1D_non_unit_stride_and_distance_complex_to_complex()
6114 {
6115 std::vector<size_t> lengths;
6116 lengths.push_back(normal7);
6117 size_t batch = 2;
6118 std::vector<size_t> input_strides;
6119 std::vector<size_t> output_strides;
6120 input_strides.push_back(42);
6121 output_strides.push_back(42);
6122 size_t input_distance = lengths[lengths.size() - 1] * input_strides[input_strides.size() - 1] + 14;
6123 size_t output_distance = lengths[lengths.size() - 1] * output_strides[output_strides.size() - 1] + 14;
6124 layout::buffer_layout_t in_layout = layout::complex_planar;
6125 layout::buffer_layout_t out_layout = layout::complex_interleaved;
6126 placeness::placeness_t placeness = placeness::out_of_place;
6127 direction::direction_t direction = direction::forward;
6128
6129 data_pattern pattern = sawtooth;
6130 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
6131 }
6132
TEST_F(accuracy_test_pow7_single,normal_1D_non_unit_stride_and_distance_complex_to_complex)6133 TEST_F(accuracy_test_pow7_single, normal_1D_non_unit_stride_and_distance_complex_to_complex)
6134 {
6135 try { normal_1D_non_unit_stride_and_distance_complex_to_complex< float, cl_float, fftwf_complex >(); }
6136 catch (const std::exception& err) { handle_exception(err); }
6137 }
6138
TEST_F(accuracy_test_pow7_double,normal_1D_non_unit_stride_and_distance_complex_to_complex)6139 TEST_F(accuracy_test_pow7_double, normal_1D_non_unit_stride_and_distance_complex_to_complex)
6140 {
6141 try { normal_1D_non_unit_stride_and_distance_complex_to_complex< double, cl_double, fftw_complex >(); }
6142 catch (const std::exception& err) { handle_exception(err); }
6143 }
6144
6145 // *****************************************************
6146 // *****************************************************
6147 template< class T, class cl_T, class fftw_T >
very_small_1D_non_unit_stride_and_distance_real_to_complex()6148 void very_small_1D_non_unit_stride_and_distance_real_to_complex()
6149 {
6150 std::vector<size_t> lengths;
6151 lengths.push_back(9);
6152 size_t batch = 2;
6153
6154 std::vector<size_t> input_strides;
6155 input_strides.push_back(2);
6156
6157 size_t input_distance = lengths[lengths.size() - 1] * input_strides[input_strides.size() - 1] + 2;
6158
6159 std::vector<size_t> output_strides(input_strides);
6160 size_t output_distance = input_distance;
6161
6162 layout::buffer_layout_t layout = layout::hermitian_interleaved;
6163 placeness::placeness_t placeness = placeness::out_of_place;
6164
6165 data_pattern pattern = impulse;
6166 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
6167 }
6168
TEST_F(accuracy_test_pow7_single,very_small_1D_non_unit_stride_and_distance_real_to_complex)6169 TEST_F(accuracy_test_pow7_single, very_small_1D_non_unit_stride_and_distance_real_to_complex)
6170 {
6171 try { very_small_1D_non_unit_stride_and_distance_real_to_complex< float, cl_float, fftwf_complex >(); }
6172 catch (const std::exception& err) { handle_exception(err); }
6173 }
6174
TEST_F(accuracy_test_pow7_double,very_small_1D_non_unit_stride_and_distance_real_to_complex)6175 TEST_F(accuracy_test_pow7_double, very_small_1D_non_unit_stride_and_distance_real_to_complex)
6176 {
6177 try { very_small_1D_non_unit_stride_and_distance_real_to_complex< double, cl_double, fftw_complex >(); }
6178 catch (const std::exception& err) { handle_exception(err); }
6179 }
6180
6181 // *****************************************************
6182 // *****************************************************
6183 template< class T, class cl_T, class fftw_T >
very_small_1D_out_of_place_different_input_output_non_unit_stride_and_distance_real_to_complex()6184 void very_small_1D_out_of_place_different_input_output_non_unit_stride_and_distance_real_to_complex()
6185 {
6186 std::vector<size_t> lengths;
6187 lengths.push_back(9);
6188 size_t batch = 2;
6189
6190 std::vector<size_t> input_strides;
6191 input_strides.push_back(16);
6192
6193 size_t input_distance = lengths[lengths.size() - 1] * input_strides[input_strides.size() - 1] + 128;
6194
6195 std::vector<size_t> output_strides;
6196 output_strides.push_back(2);
6197
6198 size_t output_distance = lengths[lengths.size() - 1] * output_strides[output_strides.size() - 1] + 2;
6199
6200 layout::buffer_layout_t layout = layout::hermitian_interleaved;
6201 placeness::placeness_t placeness = placeness::out_of_place;
6202
6203 data_pattern pattern = impulse;
6204 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
6205 }
6206
TEST_F(accuracy_test_pow7_single,very_small_1D_out_of_place_different_input_output_non_unit_stride_and_distance_real_to_complex)6207 TEST_F(accuracy_test_pow7_single, very_small_1D_out_of_place_different_input_output_non_unit_stride_and_distance_real_to_complex)
6208 {
6209 try { very_small_1D_out_of_place_different_input_output_non_unit_stride_and_distance_real_to_complex< float, cl_float, fftwf_complex >(); }
6210 catch (const std::exception& err) { handle_exception(err); }
6211 }
6212
TEST_F(accuracy_test_pow7_double,very_small_1D_out_of_place_different_input_output_non_unit_stride_and_distance_real_to_complex)6213 TEST_F(accuracy_test_pow7_double, very_small_1D_out_of_place_different_input_output_non_unit_stride_and_distance_real_to_complex)
6214 {
6215 try { very_small_1D_out_of_place_different_input_output_non_unit_stride_and_distance_real_to_complex< double, cl_double, fftw_complex >(); }
6216 catch (const std::exception& err) { handle_exception(err); }
6217 }
6218
6219 // *****************************************************
6220 // *****************************************************
6221 template< class T, class cl_T, class fftw_T >
very_small_1D_in_place_different_input_output_non_unit_stride_and_distance_real_to_complex()6222 void very_small_1D_in_place_different_input_output_non_unit_stride_and_distance_real_to_complex()
6223 {
6224 std::vector<size_t> lengths;
6225 lengths.push_back(9);
6226 size_t batch = 2;
6227
6228 std::vector<size_t> input_strides;
6229 input_strides.push_back(16);
6230
6231 size_t input_distance = lengths[lengths.size() - 1] * input_strides[input_strides.size() - 1] + 128;
6232
6233 std::vector<size_t> output_strides;
6234 output_strides.push_back(2);
6235
6236 size_t output_distance = lengths[lengths.size() - 1] * output_strides[output_strides.size() - 1] + 2;
6237
6238 layout::buffer_layout_t layout = layout::hermitian_interleaved;
6239 placeness::placeness_t placeness = placeness::in_place;
6240
6241 data_pattern pattern = impulse;
6242 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
6243 }
6244
TEST_F(accuracy_test_pow7_single,very_small_1D_in_place_different_input_output_non_unit_stride_and_distance_real_to_complex)6245 TEST_F(accuracy_test_pow7_single, very_small_1D_in_place_different_input_output_non_unit_stride_and_distance_real_to_complex)
6246 {
6247 try { very_small_1D_in_place_different_input_output_non_unit_stride_and_distance_real_to_complex< float, cl_float, fftwf_complex >(); }
6248 catch (const std::exception& err) { handle_exception(err); }
6249 }
6250
TEST_F(accuracy_test_pow7_double,very_small_1D_in_place_different_input_output_non_unit_stride_and_distance_real_to_complex)6251 TEST_F(accuracy_test_pow7_double, very_small_1D_in_place_different_input_output_non_unit_stride_and_distance_real_to_complex)
6252 {
6253 try { very_small_1D_in_place_different_input_output_non_unit_stride_and_distance_real_to_complex< double, cl_double, fftw_complex >(); }
6254 catch (const std::exception& err) { handle_exception(err); }
6255 }
6256
6257 // *****************************************************
6258 // *****************************************************
6259 template< class T, class cl_T, class fftw_T >
normal_1D_forward_user_defined_scale_complex_to_complex()6260 void normal_1D_forward_user_defined_scale_complex_to_complex()
6261 {
6262 std::vector<size_t> lengths;
6263 lengths.push_back(normal7);
6264 size_t batch = 1;
6265 std::vector<size_t> input_strides;
6266 std::vector<size_t> output_strides;
6267 size_t input_distance = 0;
6268 size_t output_distance = 0;
6269 layout::buffer_layout_t in_layout = layout::complex_planar;
6270 layout::buffer_layout_t out_layout = layout::complex_interleaved;
6271 placeness::placeness_t placeness = placeness::out_of_place;
6272 direction::direction_t direction = direction::forward;
6273
6274 data_pattern pattern = sawtooth;
6275 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness, 42.0f);
6276 }
6277
TEST_F(accuracy_test_pow7_single,normal_1D_forward_user_defined_scale_complex_to_complex)6278 TEST_F(accuracy_test_pow7_single, normal_1D_forward_user_defined_scale_complex_to_complex)
6279 {
6280 try { normal_1D_forward_user_defined_scale_complex_to_complex< float, cl_float, fftwf_complex >(); }
6281 catch (const std::exception& err) { handle_exception(err); }
6282 }
6283
TEST_F(accuracy_test_pow7_double,normal_1D_forward_user_defined_scale_complex_to_complex)6284 TEST_F(accuracy_test_pow7_double, normal_1D_forward_user_defined_scale_complex_to_complex)
6285 {
6286 try { normal_1D_forward_user_defined_scale_complex_to_complex< double, cl_double, fftw_complex >(); }
6287 catch (const std::exception& err) { handle_exception(err); }
6288 }
6289
6290 // *****************************************************
6291 // *****************************************************
6292 template< class T, class cl_T, class fftw_T >
normal_1D_backward_user_defined_scale_complex_to_complex()6293 void normal_1D_backward_user_defined_scale_complex_to_complex()
6294 {
6295 std::vector<size_t> lengths;
6296 lengths.push_back(normal7);
6297 size_t batch = 1;
6298 std::vector<size_t> input_strides;
6299 std::vector<size_t> output_strides;
6300 size_t input_distance = 0;
6301 size_t output_distance = 0;
6302 layout::buffer_layout_t in_layout = layout::complex_planar;
6303 layout::buffer_layout_t out_layout = layout::complex_interleaved;
6304 placeness::placeness_t placeness = placeness::out_of_place;
6305 direction::direction_t direction = direction::backward;
6306
6307 data_pattern pattern = sawtooth;
6308 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness, 42.5f);
6309 }
6310
TEST_F(accuracy_test_pow7_single,normal_1D_backward_user_defined_scale_complex_to_complex)6311 TEST_F(accuracy_test_pow7_single, normal_1D_backward_user_defined_scale_complex_to_complex)
6312 {
6313 try { normal_1D_backward_user_defined_scale_complex_to_complex< float, cl_float, fftwf_complex >(); }
6314 catch (const std::exception& err) { handle_exception(err); }
6315 }
6316
TEST_F(accuracy_test_pow7_double,normal_1D_backward_user_defined_scale_complex_to_complex)6317 TEST_F(accuracy_test_pow7_double, normal_1D_backward_user_defined_scale_complex_to_complex)
6318 {
6319 try { normal_1D_backward_user_defined_scale_complex_to_complex< double, cl_double, fftw_complex >(); }
6320 catch (const std::exception& err) { handle_exception(err); }
6321 }
6322
6323 // *****************************************************
6324 // *****************************************************
6325 template< class T, class cl_T, class fftw_T >
normal_1D_non_unit_stride_and_distance_real_to_hermitian()6326 void normal_1D_non_unit_stride_and_distance_real_to_hermitian()
6327 {
6328 std::vector<size_t> lengths;
6329 lengths.push_back(normal7);
6330 size_t batch = 2;
6331 std::vector<size_t> input_strides;
6332 std::vector<size_t> output_strides;
6333 input_strides.push_back(42);
6334 output_strides.push_back(42);
6335 size_t input_distance = lengths[lengths.size() - 1] * input_strides[input_strides.size() - 1] + 14;
6336 size_t output_distance = lengths[lengths.size() - 1] * output_strides[output_strides.size() - 1] + 14;
6337 layout::buffer_layout_t layout = layout::hermitian_interleaved;
6338 placeness::placeness_t placeness = placeness::out_of_place;
6339
6340 data_pattern pattern = sawtooth;
6341 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
6342 }
6343
TEST_F(accuracy_test_pow7_single,normal_1D_non_unit_stride_and_distance_real_to_hermitian)6344 TEST_F(accuracy_test_pow7_single, normal_1D_non_unit_stride_and_distance_real_to_hermitian)
6345 {
6346 try { normal_1D_non_unit_stride_and_distance_real_to_hermitian< float, cl_float, fftwf_complex >(); }
6347 catch (const std::exception& err) { handle_exception(err); }
6348 }
6349
TEST_F(accuracy_test_pow7_double,normal_1D_non_unit_stride_and_distance_real_to_hermitian)6350 TEST_F(accuracy_test_pow7_double, normal_1D_non_unit_stride_and_distance_real_to_hermitian)
6351 {
6352 try { normal_1D_non_unit_stride_and_distance_real_to_hermitian< double, cl_double, fftw_complex >(); }
6353 catch (const std::exception& err) { handle_exception(err); }
6354 }
6355
6356 // *****************************************************
6357 // *****************************************************
6358 template< class T, class cl_T, class fftw_T >
normal_1D_user_defined_scale_real_to_hermitian()6359 void normal_1D_user_defined_scale_real_to_hermitian()
6360 {
6361 std::vector<size_t> lengths;
6362 lengths.push_back(normal7);
6363 size_t batch = 1;
6364 std::vector<size_t> input_strides;
6365 std::vector<size_t> output_strides;
6366 size_t input_distance = 0;
6367 size_t output_distance = 0;
6368 layout::buffer_layout_t layout = layout::hermitian_planar;
6369 placeness::placeness_t placeness = placeness::out_of_place;
6370
6371 data_pattern pattern = impulse;
6372 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness, 42.0f);
6373 }
6374
TEST_F(accuracy_test_pow7_single,normal_1D_user_defined_scale_real_to_hermitian)6375 TEST_F(accuracy_test_pow7_single, normal_1D_user_defined_scale_real_to_hermitian)
6376 {
6377 try { normal_1D_user_defined_scale_real_to_hermitian< float, cl_float, fftwf_complex >(); }
6378 catch (const std::exception& err) { handle_exception(err); }
6379 }
6380
TEST_F(accuracy_test_pow7_double,normal_1D_user_defined_scale_real_to_hermitian)6381 TEST_F(accuracy_test_pow7_double, normal_1D_user_defined_scale_real_to_hermitian)
6382 {
6383 try { normal_1D_user_defined_scale_real_to_hermitian< double, cl_double, fftw_complex >(); }
6384 catch (const std::exception& err) { handle_exception(err); }
6385 }
6386
6387 // *****************************************************
6388 // *****************************************************
6389 template< class T, class cl_T, class fftw_T >
normal_1D_non_unit_stride_and_distance_hermitian_to_real()6390 void normal_1D_non_unit_stride_and_distance_hermitian_to_real()
6391 {
6392 std::vector<size_t> lengths;
6393 lengths.push_back(normal7);
6394 size_t batch = 2;
6395 std::vector<size_t> input_strides;
6396 std::vector<size_t> output_strides;
6397 input_strides.push_back(42);
6398 output_strides.push_back(42);
6399 size_t input_distance = lengths[lengths.size() - 1] * input_strides[input_strides.size() - 1] + 14;
6400 size_t output_distance = lengths[lengths.size() - 1] * output_strides[output_strides.size() - 1] + 14;
6401 layout::buffer_layout_t layout = layout::hermitian_interleaved;
6402 placeness::placeness_t placeness = placeness::out_of_place;
6403
6404 data_pattern pattern = sawtooth;
6405 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
6406 }
6407
TEST_F(accuracy_test_pow7_single,normal_1D_non_unit_stride_and_distance_hermitian_to_real)6408 TEST_F(accuracy_test_pow7_single, normal_1D_non_unit_stride_and_distance_hermitian_to_real)
6409 {
6410 try { normal_1D_non_unit_stride_and_distance_hermitian_to_real< float, cl_float, fftwf_complex >(); }
6411 catch (const std::exception& err) { handle_exception(err); }
6412 }
6413
TEST_F(accuracy_test_pow7_double,normal_1D_non_unit_stride_and_distance_hermitian_to_real)6414 TEST_F(accuracy_test_pow7_double, normal_1D_non_unit_stride_and_distance_hermitian_to_real)
6415 {
6416 try { normal_1D_non_unit_stride_and_distance_hermitian_to_real< double, cl_double, fftw_complex >(); }
6417 catch (const std::exception& err) { handle_exception(err); }
6418 }
6419
6420 // *****************************************************
6421 // *****************************************************
6422 template< class T, class cl_T, class fftw_T >
small_2D_non_unit_stride_real_to_hermitian()6423 void small_2D_non_unit_stride_real_to_hermitian()
6424 {
6425 std::vector<size_t> lengths;
6426 lengths.push_back(9);
6427 lengths.push_back(9);
6428 size_t batch = 2;
6429
6430 std::vector<size_t> input_strides;
6431 input_strides.push_back(5);
6432 input_strides.push_back(lengths[0] * input_strides[0] + 1);
6433
6434 std::vector<size_t> output_strides;
6435 output_strides.push_back(2);
6436 output_strides.push_back(lengths[0] * output_strides[0] + 2);
6437
6438 size_t input_distance = 0;
6439 size_t output_distance = 0;
6440
6441 layout::buffer_layout_t layout = layout::hermitian_interleaved;
6442 placeness::placeness_t placeness = placeness::out_of_place;
6443
6444 data_pattern pattern = sawtooth;
6445 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
6446 }
6447
TEST_F(accuracy_test_pow7_single,small_2D_non_unit_stride_real_to_hermitian)6448 TEST_F(accuracy_test_pow7_single, small_2D_non_unit_stride_real_to_hermitian)
6449 {
6450 try { small_2D_non_unit_stride_real_to_hermitian< float, cl_float, fftwf_complex >(); }
6451 catch (const std::exception& err) { handle_exception(err); }
6452 }
6453
TEST_F(accuracy_test_pow7_double,small_2D_non_unit_stride_real_to_hermitian)6454 TEST_F(accuracy_test_pow7_double, small_2D_non_unit_stride_real_to_hermitian)
6455 {
6456 try { small_2D_non_unit_stride_real_to_hermitian< double, cl_double, fftw_complex >(); }
6457 catch (const std::exception& err) { handle_exception(err); }
6458 }
6459
6460 // *****************************************************
6461 // *****************************************************
6462 template< class T, class cl_T, class fftw_T >
small_2D_non_unit_distance_real_to_hermitian()6463 void small_2D_non_unit_distance_real_to_hermitian()
6464 {
6465 std::vector<size_t> lengths;
6466 lengths.push_back(9);
6467 lengths.push_back(9);
6468 size_t batch = 2;
6469
6470 std::vector<size_t> input_strides;
6471 std::vector<size_t> output_strides;
6472
6473 size_t input_distance = lengths[0] * lengths[1] + 4;
6474 size_t output_distance = lengths[0] * lengths[1] + 5;
6475
6476 layout::buffer_layout_t layout = layout::hermitian_interleaved;
6477 placeness::placeness_t placeness = placeness::out_of_place;
6478
6479 data_pattern pattern = sawtooth;
6480 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
6481 }
6482
TEST_F(accuracy_test_pow7_single,small_2D_non_unit_distance_real_to_hermitian)6483 TEST_F(accuracy_test_pow7_single, small_2D_non_unit_distance_real_to_hermitian)
6484 {
6485 try { small_2D_non_unit_distance_real_to_hermitian< float, cl_float, fftwf_complex >(); }
6486 catch (const std::exception& err) { handle_exception(err); }
6487 }
6488
TEST_F(accuracy_test_pow7_double,small_2D_non_unit_distance_real_to_hermitian)6489 TEST_F(accuracy_test_pow7_double, small_2D_non_unit_distance_real_to_hermitian)
6490 {
6491 try { small_2D_non_unit_distance_real_to_hermitian< double, cl_double, fftw_complex >(); }
6492 catch (const std::exception& err) { handle_exception(err); }
6493 }
6494
6495 // *****************************************************
6496 // *****************************************************
6497 template< class T, class cl_T, class fftw_T >
small_2D_non_unit_stride_and_distance_real_to_hermitian()6498 void small_2D_non_unit_stride_and_distance_real_to_hermitian()
6499 {
6500 std::vector<size_t> lengths;
6501 lengths.push_back(9);
6502 lengths.push_back(9);
6503 size_t batch = 2;
6504
6505 std::vector<size_t> input_strides;
6506 input_strides.push_back(5);
6507 input_strides.push_back(lengths[0] * input_strides[0] + 1);
6508
6509 std::vector<size_t> output_strides;
6510 output_strides.push_back(2);
6511 output_strides.push_back(lengths[0] * output_strides[0] + 2);
6512
6513 size_t input_distance = lengths[lengths.size() - 1] * input_strides[input_strides.size() - 1] + 30;
6514 size_t output_distance = lengths[lengths.size() - 1] * output_strides[output_strides.size() - 1] + 42;
6515
6516 layout::buffer_layout_t layout = layout::hermitian_interleaved;
6517 placeness::placeness_t placeness = placeness::out_of_place;
6518
6519 data_pattern pattern = sawtooth;
6520 real_to_complex<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
6521 }
6522
TEST_F(accuracy_test_pow7_single,small_2D_non_unit_stride_and_distance_real_to_hermitian)6523 TEST_F(accuracy_test_pow7_single, small_2D_non_unit_stride_and_distance_real_to_hermitian)
6524 {
6525 try { small_2D_non_unit_stride_and_distance_real_to_hermitian< float, cl_float, fftwf_complex >(); }
6526 catch (const std::exception& err) { handle_exception(err); }
6527 }
6528
TEST_F(accuracy_test_pow7_double,small_2D_non_unit_stride_and_distance_real_to_hermitian)6529 TEST_F(accuracy_test_pow7_double, small_2D_non_unit_stride_and_distance_real_to_hermitian)
6530 {
6531 try { small_2D_non_unit_stride_and_distance_real_to_hermitian< double, cl_double, fftw_complex >(); }
6532 catch (const std::exception& err) { handle_exception(err); }
6533 }
6534
6535 // *****************************************************
6536 // *****************************************************
6537 template< class T, class cl_T, class fftw_T >
small_2D_non_unit_stride_and_distance_hermitian_to_real()6538 void small_2D_non_unit_stride_and_distance_hermitian_to_real()
6539 {
6540 std::vector<size_t> lengths;
6541 lengths.push_back(9);
6542 lengths.push_back(9);
6543 size_t batch = 2;
6544
6545 std::vector<size_t> input_strides;
6546 input_strides.push_back(12);
6547 input_strides.push_back(lengths[0] * input_strides[0] + 9);
6548
6549 std::vector<size_t> output_strides;
6550 output_strides.push_back(7);
6551 output_strides.push_back(lengths[0] * output_strides[0] + 32);
6552
6553 size_t input_distance = lengths[lengths.size() - 1] * input_strides[input_strides.size() - 1] + 50;
6554 size_t output_distance = lengths[lengths.size() - 1] * output_strides[output_strides.size() - 1] + 60;
6555
6556 layout::buffer_layout_t layout = layout::hermitian_interleaved;
6557 placeness::placeness_t placeness = placeness::out_of_place;
6558
6559 data_pattern pattern = sawtooth;
6560 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness);
6561 }
6562
TEST_F(accuracy_test_pow7_single,small_2D_non_unit_stride_and_distance_hermitian_to_real)6563 TEST_F(accuracy_test_pow7_single, small_2D_non_unit_stride_and_distance_hermitian_to_real)
6564 {
6565 try { small_2D_non_unit_stride_and_distance_hermitian_to_real< float, cl_float, fftwf_complex >(); }
6566 catch (const std::exception& err) { handle_exception(err); }
6567 }
6568
TEST_F(accuracy_test_pow7_double,small_2D_non_unit_stride_and_distance_hermitian_to_real)6569 TEST_F(accuracy_test_pow7_double, small_2D_non_unit_stride_and_distance_hermitian_to_real)
6570 {
6571 try { small_2D_non_unit_stride_and_distance_hermitian_to_real< double, cl_double, fftw_complex >(); }
6572 catch (const std::exception& err) { handle_exception(err); }
6573 }
6574
6575 // *****************************************************
6576 // *****************************************************
6577 template< class T, class cl_T, class fftw_T >
normal_1D_user_defined_scale_hermitian_to_real()6578 void normal_1D_user_defined_scale_hermitian_to_real()
6579 {
6580 std::vector<size_t> lengths;
6581 lengths.push_back(normal7);
6582 size_t batch = 1;
6583 std::vector<size_t> input_strides;
6584 std::vector<size_t> output_strides;
6585 size_t input_distance = 0;
6586 size_t output_distance = 0;
6587 layout::buffer_layout_t layout = layout::hermitian_planar;
6588 placeness::placeness_t placeness = placeness::out_of_place;
6589
6590 data_pattern pattern = sawtooth;
6591 complex_to_real<T, cl_T, fftw_T>(pattern, lengths, batch, input_strides, output_strides, input_distance, output_distance, layout, placeness, 42.0f);
6592 }
6593
TEST_F(accuracy_test_pow7_single,normal_1D_user_defined_scale_hermitian_to_real)6594 TEST_F(accuracy_test_pow7_single, normal_1D_user_defined_scale_hermitian_to_real)
6595 {
6596 try { normal_1D_user_defined_scale_hermitian_to_real< float, cl_float, fftwf_complex >(); }
6597 catch (const std::exception& err) { handle_exception(err); }
6598 }
6599
TEST_F(accuracy_test_pow7_double,normal_1D_user_defined_scale_hermitian_to_real)6600 TEST_F(accuracy_test_pow7_double, normal_1D_user_defined_scale_hermitian_to_real)
6601 {
6602 try { normal_1D_user_defined_scale_hermitian_to_real< double, cl_double, fftw_complex >(); }
6603 catch (const std::exception& err) { handle_exception(err); }
6604 }
6605
6606 // *****************************************************
6607 // *****************************************************
6608 template< class T, class cl_T, class fftw_T >
single_point_1D_forward_complex_to_complex()6609 void single_point_1D_forward_complex_to_complex()
6610 {
6611 std::vector<size_t> lengths;
6612 lengths.push_back(1);
6613 size_t batch = 1;
6614 std::vector<size_t> input_strides;
6615 std::vector<size_t> output_strides;
6616 size_t input_distance = 0;
6617 size_t output_distance = 0;
6618 layout::buffer_layout_t in_layout = layout::complex_planar;
6619 layout::buffer_layout_t out_layout = layout::complex_interleaved;
6620 placeness::placeness_t placeness = placeness::out_of_place;
6621 direction::direction_t direction = direction::forward;
6622
6623 data_pattern pattern = impulse;
6624 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness, 0.42f);
6625 }
6626
TEST_F(accuracy_test_pow7_single,single_point_1D_forward_complex_to_complex)6627 TEST_F(accuracy_test_pow7_single, single_point_1D_forward_complex_to_complex)
6628 {
6629 try { single_point_1D_forward_complex_to_complex< float, cl_float, fftwf_complex >(); }
6630 catch (const std::exception& err) { handle_exception(err); }
6631 }
6632
TEST_F(accuracy_test_pow7_double,single_point_1D_forward_complex_to_complex)6633 TEST_F(accuracy_test_pow7_double, single_point_1D_forward_complex_to_complex)
6634 {
6635 try { single_point_1D_forward_complex_to_complex< double, cl_double, fftw_complex >(); }
6636 catch (const std::exception& err) { handle_exception(err); }
6637 }
6638
6639 // *****************************************************
6640 // *****************************************************
6641 template< class T, class cl_T, class fftw_T >
single_point_1D_backward_complex_to_complex()6642 void single_point_1D_backward_complex_to_complex()
6643 {
6644 std::vector<size_t> lengths;
6645 lengths.push_back(1);
6646 size_t batch = 1;
6647 std::vector<size_t> input_strides;
6648 std::vector<size_t> output_strides;
6649 size_t input_distance = 0;
6650 size_t output_distance = 0;
6651 layout::buffer_layout_t in_layout = layout::complex_interleaved;
6652 layout::buffer_layout_t out_layout = layout::complex_planar;
6653 placeness::placeness_t placeness = placeness::out_of_place;
6654 direction::direction_t direction = direction::backward;
6655
6656 data_pattern pattern = impulse;
6657 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness, 0.42f);
6658 }
6659
TEST_F(accuracy_test_pow7_single,single_point_1D_backward_complex_to_complex)6660 TEST_F(accuracy_test_pow7_single, single_point_1D_backward_complex_to_complex)
6661 {
6662 try { single_point_1D_backward_complex_to_complex< float, cl_float, fftwf_complex >(); }
6663 catch (const std::exception& err) { handle_exception(err); }
6664 }
6665
TEST_F(accuracy_test_pow7_double,single_point_1D_backward_complex_to_complex)6666 TEST_F(accuracy_test_pow7_double, single_point_1D_backward_complex_to_complex)
6667 {
6668 try { single_point_1D_backward_complex_to_complex< double, cl_double, fftw_complex >(); }
6669 catch (const std::exception& err) { handle_exception(err); }
6670 }
6671
6672 // *****************************************************
6673 // *****************************************************
6674 template< class T, class cl_T, class fftw_T >
small_2D_non_unit_stride_complex_to_complex()6675 void small_2D_non_unit_stride_complex_to_complex()
6676 {
6677 std::vector<size_t> lengths;
6678 lengths.push_back(small7);
6679 lengths.push_back(small7);
6680 size_t batch = 1;
6681 std::vector<size_t> input_strides;
6682 std::vector<size_t> output_strides;
6683 input_strides.push_back(3);
6684 output_strides.push_back(3);
6685 input_strides.push_back(lengths[0] * input_strides[0] + 20);
6686 output_strides.push_back(lengths[0] * output_strides[0] + 20);
6687 size_t input_distance = 0;
6688 size_t output_distance = 0;
6689 layout::buffer_layout_t in_layout = layout::complex_planar;
6690 layout::buffer_layout_t out_layout = layout::complex_interleaved;
6691 placeness::placeness_t placeness = placeness::out_of_place;
6692 direction::direction_t direction = direction::forward;
6693
6694 data_pattern pattern = sawtooth;
6695 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
6696 }
6697
TEST_F(accuracy_test_pow7_single,small_2D_non_unit_stride_complex_to_complex)6698 TEST_F(accuracy_test_pow7_single, small_2D_non_unit_stride_complex_to_complex)
6699 {
6700 try { small_2D_non_unit_stride_complex_to_complex< float, cl_float, fftwf_complex >(); }
6701 catch (const std::exception& err) { handle_exception(err); }
6702 }
6703
TEST_F(accuracy_test_pow7_double,small_2D_non_unit_stride_complex_to_complex)6704 TEST_F(accuracy_test_pow7_double, small_2D_non_unit_stride_complex_to_complex)
6705 {
6706 try { small_2D_non_unit_stride_complex_to_complex< double, cl_double, fftw_complex >(); }
6707 catch (const std::exception& err) { handle_exception(err); }
6708 }
6709
6710 // *****************************************************
6711 // *****************************************************
6712 template< class T, class cl_T, class fftw_T >
small_2D_non_unit_stride_and_distance_complex_to_complex()6713 void small_2D_non_unit_stride_and_distance_complex_to_complex()
6714 {
6715 std::vector<size_t> lengths;
6716 lengths.push_back(small7);
6717 lengths.push_back(small7);
6718 size_t batch = 2;
6719 std::vector<size_t> input_strides;
6720 std::vector<size_t> output_strides;
6721 input_strides.push_back(42);
6722 output_strides.push_back(42);
6723 input_strides.push_back(lengths[0] * input_strides[0] + 19);
6724 output_strides.push_back(lengths[0] * output_strides[0] + 19);
6725 size_t input_distance = lengths[lengths.size() - 1] * input_strides[input_strides.size() - 1] + 14;
6726 size_t output_distance = lengths[lengths.size() - 1] * output_strides[output_strides.size() - 1] + 14;
6727 layout::buffer_layout_t in_layout = layout::complex_interleaved;
6728 layout::buffer_layout_t out_layout = layout::complex_planar;
6729 placeness::placeness_t placeness = placeness::out_of_place;
6730 direction::direction_t direction = direction::forward;
6731
6732 data_pattern pattern = sawtooth;
6733 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
6734 }
6735
TEST_F(accuracy_test_pow7_single,small_2D_non_unit_stride_and_distance_complex_to_complex)6736 TEST_F(accuracy_test_pow7_single, small_2D_non_unit_stride_and_distance_complex_to_complex)
6737 {
6738 try { small_2D_non_unit_stride_and_distance_complex_to_complex< float, cl_float, fftwf_complex >(); }
6739 catch (const std::exception& err) { handle_exception(err); }
6740 }
6741
TEST_F(accuracy_test_pow7_double,small_2D_non_unit_stride_and_distance_complex_to_complex)6742 TEST_F(accuracy_test_pow7_double, small_2D_non_unit_stride_and_distance_complex_to_complex)
6743 {
6744 try { small_2D_non_unit_stride_and_distance_complex_to_complex< double, cl_double, fftw_complex >(); }
6745 catch (const std::exception& err) { handle_exception(err); }
6746 }
6747
6748 // *****************************************************
6749 // *****************************************************
6750 template< class T, class cl_T, class fftw_T >
normal_2D_forward_user_defined_scale_complex_to_complex()6751 void normal_2D_forward_user_defined_scale_complex_to_complex()
6752 {
6753 std::vector<size_t> lengths;
6754 lengths.push_back(normal7);
6755 lengths.push_back(normal7);
6756 size_t batch = 1;
6757 std::vector<size_t> input_strides;
6758 std::vector<size_t> output_strides;
6759 size_t input_distance = 0;
6760 size_t output_distance = 0;
6761 layout::buffer_layout_t in_layout = layout::complex_planar;
6762 layout::buffer_layout_t out_layout = layout::complex_interleaved;
6763 placeness::placeness_t placeness = placeness::out_of_place;
6764 direction::direction_t direction = direction::forward;
6765
6766 data_pattern pattern = sawtooth;
6767 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness, 42.0f);
6768 }
6769
TEST_F(accuracy_test_pow7_single,normal_2D_forward_user_defined_scale_complex_to_complex)6770 TEST_F(accuracy_test_pow7_single, normal_2D_forward_user_defined_scale_complex_to_complex)
6771 {
6772 try { normal_2D_forward_user_defined_scale_complex_to_complex< float, cl_float, fftwf_complex >(); }
6773 catch (const std::exception& err) { handle_exception(err); }
6774 }
6775
TEST_F(accuracy_test_pow7_double,normal_2D_forward_user_defined_scale_complex_to_complex)6776 TEST_F(accuracy_test_pow7_double, normal_2D_forward_user_defined_scale_complex_to_complex)
6777 {
6778 try { normal_2D_forward_user_defined_scale_complex_to_complex< double, cl_double, fftw_complex >(); }
6779 catch (const std::exception& err) { handle_exception(err); }
6780 }
6781
6782 // *****************************************************
6783 // *****************************************************
6784 template< class T, class cl_T, class fftw_T >
normal_2D_backward_user_defined_scale_complex_to_complex()6785 void normal_2D_backward_user_defined_scale_complex_to_complex()
6786 {
6787 std::vector<size_t> lengths;
6788 lengths.push_back(normal7);
6789 lengths.push_back(normal7);
6790 size_t batch = 1;
6791 std::vector<size_t> input_strides;
6792 std::vector<size_t> output_strides;
6793 size_t input_distance = 0;
6794 size_t output_distance = 0;
6795 layout::buffer_layout_t in_layout = layout::complex_planar;
6796 layout::buffer_layout_t out_layout = layout::complex_interleaved;
6797 placeness::placeness_t placeness = placeness::out_of_place;
6798 direction::direction_t direction = direction::backward;
6799
6800 data_pattern pattern = sawtooth;
6801 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness, 42.5f);
6802 }
6803
TEST_F(accuracy_test_pow7_single,normal_2D_backward_user_defined_scale_complex_to_complex)6804 TEST_F(accuracy_test_pow7_single, normal_2D_backward_user_defined_scale_complex_to_complex)
6805 {
6806 try { normal_2D_backward_user_defined_scale_complex_to_complex< float, cl_float, fftwf_complex >(); }
6807 catch (const std::exception& err) { handle_exception(err); }
6808 }
6809
TEST_F(accuracy_test_pow7_double,normal_2D_backward_user_defined_scale_complex_to_complex)6810 TEST_F(accuracy_test_pow7_double, normal_2D_backward_user_defined_scale_complex_to_complex)
6811 {
6812 try { normal_2D_backward_user_defined_scale_complex_to_complex< double, cl_double, fftw_complex >(); }
6813 catch (const std::exception& err) { handle_exception(err); }
6814 }
6815
6816 // *****************************************************
6817 // *****************************************************
6818 template< class T, class cl_T, class fftw_T >
rectangular_2D_array_complex_to_complex()6819 void rectangular_2D_array_complex_to_complex()
6820 {
6821 std::vector<size_t> lengths;
6822 lengths.push_back(small7);
6823 lengths.push_back(normal7);
6824 size_t batch = 8;
6825 std::vector<size_t> input_strides;
6826 std::vector<size_t> output_strides;
6827 size_t input_distance = 0;
6828 size_t output_distance = 0;
6829 layout::buffer_layout_t in_layout = layout::complex_interleaved;
6830 layout::buffer_layout_t out_layout = layout::complex_interleaved;
6831 placeness::placeness_t placeness = placeness::in_place;
6832 direction::direction_t direction = direction::forward;
6833
6834 data_pattern pattern = sawtooth;
6835 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
6836 }
6837
TEST_F(accuracy_test_pow7_single,rectangular_2D_array_complex_to_complex)6838 TEST_F(accuracy_test_pow7_single, rectangular_2D_array_complex_to_complex)
6839 {
6840 try { rectangular_2D_array_complex_to_complex< float, cl_float, fftwf_complex >(); }
6841 catch (const std::exception& err) { handle_exception(err); }
6842 }
6843
TEST_F(accuracy_test_pow7_double,rectangular_2D_array_complex_to_complex)6844 TEST_F(accuracy_test_pow7_double, rectangular_2D_array_complex_to_complex)
6845 {
6846 try { rectangular_2D_array_complex_to_complex< double, cl_double, fftw_complex >(); }
6847 catch (const std::exception& err) { handle_exception(err); }
6848 }
6849
6850 // *****************************************************
6851 // *****************************************************
6852 template< class T, class cl_T, class fftw_T >
normal_2D_array_complex_to_complex_with_odd_batch_size()6853 void normal_2D_array_complex_to_complex_with_odd_batch_size()
6854 {
6855 std::vector<size_t> lengths;
6856 lengths.push_back(normal7);
6857 lengths.push_back(small7);
6858 size_t batch = 5;
6859 std::vector<size_t> input_strides;
6860 std::vector<size_t> output_strides;
6861 size_t input_distance = 0;
6862 size_t output_distance = 0;
6863 layout::buffer_layout_t in_layout = layout::complex_planar;
6864 layout::buffer_layout_t out_layout = layout::complex_planar;
6865 placeness::placeness_t placeness = placeness::in_place;
6866 direction::direction_t direction = direction::forward;
6867
6868 data_pattern pattern = sawtooth;
6869 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
6870 }
6871
TEST_F(accuracy_test_pow7_single,normal_2D_array_complex_to_complex_with_odd_batch_size)6872 TEST_F(accuracy_test_pow7_single, normal_2D_array_complex_to_complex_with_odd_batch_size)
6873 {
6874 try { normal_2D_array_complex_to_complex_with_odd_batch_size< float, cl_float, fftwf_complex >(); }
6875 catch (const std::exception& err) { handle_exception(err); }
6876 }
6877
TEST_F(accuracy_test_pow7_double,normal_2D_array_complex_to_complex_with_odd_batch_size)6878 TEST_F(accuracy_test_pow7_double, normal_2D_array_complex_to_complex_with_odd_batch_size)
6879 {
6880 try { normal_2D_array_complex_to_complex_with_odd_batch_size< double, cl_double, fftw_complex >(); }
6881 catch (const std::exception& err) { handle_exception(err); }
6882 }
6883
6884 // *****************************************************
6885 // *****************************************************
6886 template< class T, class cl_T, class fftw_T >
large_2D_array_forward_complex_to_complex()6887 void large_2D_array_forward_complex_to_complex()
6888 {
6889 std::vector<size_t> lengths;
6890 lengths.push_back(small7);
6891 lengths.push_back(large7);
6892 size_t batch = 8;
6893 std::vector<size_t> input_strides;
6894 std::vector<size_t> output_strides;
6895 size_t input_distance = 0;
6896 size_t output_distance = 0;
6897 layout::buffer_layout_t in_layout = layout::complex_interleaved;
6898 layout::buffer_layout_t out_layout = layout::complex_interleaved;
6899 placeness::placeness_t placeness = placeness::in_place;
6900 direction::direction_t direction = direction::forward;
6901
6902 data_pattern pattern = sawtooth;
6903 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
6904 }
6905
TEST_F(accuracy_test_pow7_single,large_2D_array_forward_complex_to_complex)6906 TEST_F(accuracy_test_pow7_single, large_2D_array_forward_complex_to_complex)
6907 {
6908 try { large_2D_array_forward_complex_to_complex< float, cl_float, fftwf_complex >(); }
6909 catch (const std::exception& err) { handle_exception(err); }
6910 }
6911
TEST_F(accuracy_test_pow7_double,large_2D_array_forward_complex_to_complex)6912 TEST_F(accuracy_test_pow7_double, large_2D_array_forward_complex_to_complex)
6913 {
6914 try { large_2D_array_forward_complex_to_complex< double, cl_double, fftw_complex >(); }
6915 catch (const std::exception& err) { handle_exception(err); }
6916 }
6917
6918 // *****************************************************
6919 // *****************************************************
6920 template< class T, class cl_T, class fftw_T >
large_2D_array_backward_complex_to_complex()6921 void large_2D_array_backward_complex_to_complex()
6922 {
6923 std::vector<size_t> lengths;
6924 lengths.push_back(small7);
6925 lengths.push_back(large7);
6926 size_t batch = 8;
6927 std::vector<size_t> input_strides;
6928 std::vector<size_t> output_strides;
6929 size_t input_distance = 0;
6930 size_t output_distance = 0;
6931 layout::buffer_layout_t in_layout = layout::complex_interleaved;
6932 layout::buffer_layout_t out_layout = layout::complex_interleaved;
6933 placeness::placeness_t placeness = placeness::in_place;
6934 direction::direction_t direction = direction::backward;
6935
6936 data_pattern pattern = sawtooth;
6937 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
6938 }
6939
TEST_F(accuracy_test_pow7_single,large_2D_array_backward_complex_to_complex)6940 TEST_F(accuracy_test_pow7_single, large_2D_array_backward_complex_to_complex)
6941 {
6942 try { large_2D_array_backward_complex_to_complex< float, cl_float, fftwf_complex >(); }
6943 catch (const std::exception& err) { handle_exception(err); }
6944 }
6945
TEST_F(accuracy_test_pow7_double,large_2D_array_backward_complex_to_complex)6946 TEST_F(accuracy_test_pow7_double, large_2D_array_backward_complex_to_complex)
6947 {
6948 try { large_2D_array_backward_complex_to_complex< double, cl_double, fftw_complex >(); }
6949 catch (const std::exception& err) { handle_exception(err); }
6950 }
6951
6952 // *****************************************************
6953 // *****************************************************
6954 template< class T, class cl_T, class fftw_T >
single_point_2D_forward_complex_to_complex()6955 void single_point_2D_forward_complex_to_complex()
6956 {
6957 std::vector<size_t> lengths;
6958 lengths.push_back(1);
6959 lengths.push_back(1);
6960 size_t batch = 1;
6961 std::vector<size_t> input_strides;
6962 std::vector<size_t> output_strides;
6963 size_t input_distance = 0;
6964 size_t output_distance = 0;
6965 layout::buffer_layout_t in_layout = layout::complex_planar;
6966 layout::buffer_layout_t out_layout = layout::complex_interleaved;
6967 placeness::placeness_t placeness = placeness::out_of_place;
6968 direction::direction_t direction = direction::forward;
6969
6970 data_pattern pattern = impulse;
6971 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness, 0.42f);
6972 }
6973
TEST_F(accuracy_test_pow7_single,single_point_2D_forward_complex_to_complex)6974 TEST_F(accuracy_test_pow7_single, single_point_2D_forward_complex_to_complex)
6975 {
6976 try { single_point_2D_forward_complex_to_complex< float, cl_float, fftwf_complex >(); }
6977 catch (const std::exception& err) { handle_exception(err); }
6978 }
6979
TEST_F(accuracy_test_pow7_double,single_point_2D_forward_complex_to_complex)6980 TEST_F(accuracy_test_pow7_double, single_point_2D_forward_complex_to_complex)
6981 {
6982 try { single_point_2D_forward_complex_to_complex< double, cl_double, fftw_complex >(); }
6983 catch (const std::exception& err) { handle_exception(err); }
6984 }
6985
6986 // *****************************************************
6987 // *****************************************************
6988 template< class T, class cl_T, class fftw_T >
single_point_2D_backward_complex_to_complex()6989 void single_point_2D_backward_complex_to_complex()
6990 {
6991 std::vector<size_t> lengths;
6992 lengths.push_back(1);
6993 lengths.push_back(1);
6994 size_t batch = 1;
6995 std::vector<size_t> input_strides;
6996 std::vector<size_t> output_strides;
6997 size_t input_distance = 0;
6998 size_t output_distance = 0;
6999 layout::buffer_layout_t in_layout = layout::complex_interleaved;
7000 layout::buffer_layout_t out_layout = layout::complex_planar;
7001 placeness::placeness_t placeness = placeness::out_of_place;
7002 direction::direction_t direction = direction::backward;
7003
7004 data_pattern pattern = impulse;
7005 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness, 0.42f);
7006 }
7007
TEST_F(accuracy_test_pow7_single,single_point_2D_backward_complex_to_complex)7008 TEST_F(accuracy_test_pow7_single, single_point_2D_backward_complex_to_complex)
7009 {
7010 try { single_point_2D_backward_complex_to_complex< float, cl_float, fftwf_complex >(); }
7011 catch (const std::exception& err) { handle_exception(err); }
7012 }
7013
TEST_F(accuracy_test_pow7_double,single_point_2D_backward_complex_to_complex)7014 TEST_F(accuracy_test_pow7_double, single_point_2D_backward_complex_to_complex)
7015 {
7016 try { single_point_2D_backward_complex_to_complex< double, cl_double, fftw_complex >(); }
7017 catch (const std::exception& err) { handle_exception(err); }
7018 }
7019
7020 // *****************************************************
7021 // *****************************************************
7022 template< class T, class cl_T, class fftw_T >
single_point_3D_forward_complex_to_complex()7023 void single_point_3D_forward_complex_to_complex()
7024 {
7025 std::vector<size_t> lengths;
7026 lengths.push_back(1);
7027 lengths.push_back(1);
7028 lengths.push_back(1);
7029 size_t batch = 1;
7030 std::vector<size_t> input_strides;
7031 std::vector<size_t> output_strides;
7032 size_t input_distance = 0;
7033 size_t output_distance = 0;
7034 layout::buffer_layout_t in_layout = layout::complex_planar;
7035 layout::buffer_layout_t out_layout = layout::complex_interleaved;
7036 placeness::placeness_t placeness = placeness::out_of_place;
7037 direction::direction_t direction = direction::forward;
7038
7039 data_pattern pattern = impulse;
7040 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness, 0.42f);
7041 }
7042
TEST_F(accuracy_test_pow7_single,single_point_3D_forward_complex_to_complex)7043 TEST_F(accuracy_test_pow7_single, single_point_3D_forward_complex_to_complex)
7044 {
7045 try { single_point_3D_forward_complex_to_complex< float, cl_float, fftwf_complex >(); }
7046 catch (const std::exception& err) { handle_exception(err); }
7047 }
7048
TEST_F(accuracy_test_pow7_double,single_point_3D_forward_complex_to_complex)7049 TEST_F(accuracy_test_pow7_double, single_point_3D_forward_complex_to_complex)
7050 {
7051 try { single_point_3D_forward_complex_to_complex< double, cl_double, fftw_complex >(); }
7052 catch (const std::exception& err) { handle_exception(err); }
7053 }
7054
7055 // *****************************************************
7056 // *****************************************************
7057 template< class T, class cl_T, class fftw_T >
single_point_3D_backward_complex_to_complex()7058 void single_point_3D_backward_complex_to_complex()
7059 {
7060 std::vector<size_t> lengths;
7061 lengths.push_back(1);
7062 lengths.push_back(1);
7063 lengths.push_back(1);
7064 size_t batch = 1;
7065 std::vector<size_t> input_strides;
7066 std::vector<size_t> output_strides;
7067 size_t input_distance = 0;
7068 size_t output_distance = 0;
7069 layout::buffer_layout_t in_layout = layout::complex_interleaved;
7070 layout::buffer_layout_t out_layout = layout::complex_planar;
7071 placeness::placeness_t placeness = placeness::out_of_place;
7072 direction::direction_t direction = direction::backward;
7073
7074 data_pattern pattern = impulse;
7075 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness, 0.42f);
7076 }
7077
TEST_F(accuracy_test_pow7_single,single_point_3D_backward_complex_to_complex)7078 TEST_F(accuracy_test_pow7_single, single_point_3D_backward_complex_to_complex)
7079 {
7080 try { single_point_3D_backward_complex_to_complex< float, cl_float, fftwf_complex >(); }
7081 catch (const std::exception& err) { handle_exception(err); }
7082 }
7083
TEST_F(accuracy_test_pow7_double,single_point_3D_backward_complex_to_complex)7084 TEST_F(accuracy_test_pow7_double, single_point_3D_backward_complex_to_complex)
7085 {
7086 try { single_point_3D_backward_complex_to_complex< double, cl_double, fftw_complex >(); }
7087 catch (const std::exception& err) { handle_exception(err); }
7088 }
7089
7090 // *****************************************************
7091 // *****************************************************
7092 template< class T, class cl_T, class fftw_T >
small_3D_non_unit_stride_complex_to_complex()7093 void small_3D_non_unit_stride_complex_to_complex()
7094 {
7095 std::vector<size_t> lengths;
7096 lengths.push_back(small7);
7097 lengths.push_back(small7);
7098 lengths.push_back(small7);
7099 size_t batch = 1;
7100 std::vector<size_t> input_strides;
7101 input_strides.push_back(2);
7102 input_strides.push_back(lengths[0] * input_strides[0] + 20);
7103 input_strides.push_back(lengths[1] * input_strides[1] + 17);
7104
7105 std::vector<size_t> output_strides(input_strides);
7106
7107 size_t input_distance = 0;
7108 size_t output_distance = input_distance;
7109
7110 layout::buffer_layout_t in_layout = layout::complex_planar;
7111 layout::buffer_layout_t out_layout = layout::complex_interleaved;
7112 placeness::placeness_t placeness = placeness::out_of_place;
7113 direction::direction_t direction = direction::forward;
7114
7115 data_pattern pattern = sawtooth;
7116 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
7117 }
7118
TEST_F(accuracy_test_pow7_single,small_3D_non_unit_stride_complex_to_complex)7119 TEST_F(accuracy_test_pow7_single, small_3D_non_unit_stride_complex_to_complex)
7120 {
7121 try { small_3D_non_unit_stride_complex_to_complex< float, cl_float, fftwf_complex >(); }
7122 catch (const std::exception& err) { handle_exception(err); }
7123 }
7124
TEST_F(accuracy_test_pow7_double,small_3D_non_unit_stride_complex_to_complex)7125 TEST_F(accuracy_test_pow7_double, small_3D_non_unit_stride_complex_to_complex)
7126 {
7127 try { small_3D_non_unit_stride_complex_to_complex< double, cl_double, fftw_complex >(); }
7128 catch (const std::exception& err) { handle_exception(err); }
7129 }
7130
7131 // *****************************************************
7132 // *****************************************************
7133 template< class T, class cl_T, class fftw_T >
small_3D_non_unit_stride_and_distance_complex_to_complex()7134 void small_3D_non_unit_stride_and_distance_complex_to_complex()
7135 {
7136 std::vector<size_t> lengths;
7137 lengths.push_back(small7);
7138 lengths.push_back(small7);
7139 lengths.push_back(small7);
7140 size_t batch = 2;
7141 std::vector<size_t> input_strides;
7142 input_strides.push_back(2);
7143 input_strides.push_back(lengths[0] * input_strides[0] + 19);
7144 input_strides.push_back(lengths[1] * input_strides[1] + 3);
7145
7146 size_t input_distance = lengths[lengths.size() - 1] * input_strides[input_strides.size() - 1] + 14;
7147
7148 std::vector<size_t> output_strides(input_strides);
7149 size_t output_distance = input_distance;
7150
7151 layout::buffer_layout_t in_layout = layout::complex_interleaved;
7152 layout::buffer_layout_t out_layout = layout::complex_planar;
7153 placeness::placeness_t placeness = placeness::out_of_place;
7154 direction::direction_t direction = direction::forward;
7155
7156 data_pattern pattern = sawtooth;
7157 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
7158 }
7159
TEST_F(accuracy_test_pow7_single,small_3D_non_unit_stride_and_distance_complex_to_complex)7160 TEST_F(accuracy_test_pow7_single, small_3D_non_unit_stride_and_distance_complex_to_complex)
7161 {
7162 try { small_3D_non_unit_stride_and_distance_complex_to_complex< float, cl_float, fftwf_complex >(); }
7163 catch (const std::exception& err) { handle_exception(err); }
7164 }
7165
TEST_F(accuracy_test_pow7_double,small_3D_non_unit_stride_and_distance_complex_to_complex)7166 TEST_F(accuracy_test_pow7_double, small_3D_non_unit_stride_and_distance_complex_to_complex)
7167 {
7168 try { small_3D_non_unit_stride_and_distance_complex_to_complex< double, cl_double, fftw_complex >(); }
7169 catch (const std::exception& err) { handle_exception(err); }
7170 }
7171
7172 // *****************************************************
7173 // *****************************************************
7174 template< class T, class cl_T, class fftw_T >
normal_1D_round_trip_complex_to_complex()7175 void normal_1D_round_trip_complex_to_complex()
7176 {
7177 std::vector<size_t> lengths;
7178 lengths.push_back(normal7);
7179 size_t batch = 1;
7180 layout::buffer_layout_t layout = layout::complex_interleaved;
7181
7182 data_pattern pattern = sawtooth;
7183 complex_to_complex_round_trip<T, cl_T, fftw_T>(pattern, lengths, batch, layout);
7184 }
7185
TEST_F(accuracy_test_pow7_single,normal_1D_round_trip_complex_to_complex)7186 TEST_F(accuracy_test_pow7_single, normal_1D_round_trip_complex_to_complex)
7187 {
7188 try { normal_1D_round_trip_complex_to_complex< float, cl_float, fftwf_complex >(); }
7189 catch (const std::exception& err) { handle_exception(err); }
7190 }
7191
TEST_F(accuracy_test_pow7_double,normal_1D_round_trip_complex_to_complex)7192 TEST_F(accuracy_test_pow7_double, normal_1D_round_trip_complex_to_complex)
7193 {
7194 try { normal_1D_round_trip_complex_to_complex< double, cl_double, fftw_complex >(); }
7195 catch (const std::exception& err) { handle_exception(err); }
7196 }
7197
7198 // *****************************************************
7199 // *****************************************************
7200 template< class T, class cl_T, class fftw_T >
normal_2D_round_trip_complex_to_complex()7201 void normal_2D_round_trip_complex_to_complex()
7202 {
7203 std::vector<size_t> lengths;
7204 lengths.push_back(normal7);
7205 lengths.push_back(normal7);
7206 size_t batch = 1;
7207 layout::buffer_layout_t layout = layout::complex_planar;
7208
7209 data_pattern pattern = sawtooth;
7210 complex_to_complex_round_trip<T, cl_T, fftw_T>(pattern, lengths, batch, layout);
7211 }
7212
TEST_F(accuracy_test_pow7_single,normal_2D_round_trip_complex_to_complex)7213 TEST_F(accuracy_test_pow7_single, normal_2D_round_trip_complex_to_complex)
7214 {
7215 try { normal_2D_round_trip_complex_to_complex< float, cl_float, fftwf_complex >(); }
7216 catch (const std::exception& err) { handle_exception(err); }
7217 }
7218
TEST_F(accuracy_test_pow7_double,normal_2D_round_trip_complex_to_complex)7219 TEST_F(accuracy_test_pow7_double, normal_2D_round_trip_complex_to_complex)
7220 {
7221 try { normal_2D_round_trip_complex_to_complex< double, cl_double, fftw_complex >(); }
7222 catch (const std::exception& err) { handle_exception(err); }
7223 }
7224
7225 // *****************************************************
7226 // *****************************************************
7227 template< class T, class cl_T, class fftw_T >
small_3D_round_trip_complex_to_complex()7228 void small_3D_round_trip_complex_to_complex()
7229 {
7230 std::vector<size_t> lengths;
7231 lengths.push_back(small7);
7232 lengths.push_back(small7);
7233 lengths.push_back(small7);
7234 size_t batch = 1;
7235 layout::buffer_layout_t layout = layout::complex_planar;
7236
7237 data_pattern pattern = sawtooth;
7238 complex_to_complex_round_trip<T, cl_T, fftw_T>(pattern, lengths, batch, layout);
7239 }
7240
TEST_F(accuracy_test_pow7_single,small_3D_round_trip_complex_to_complex)7241 TEST_F(accuracy_test_pow7_single, small_3D_round_trip_complex_to_complex)
7242 {
7243 try { small_3D_round_trip_complex_to_complex< float, cl_float, fftwf_complex >(); }
7244 catch (const std::exception& err) { handle_exception(err); }
7245 }
7246
TEST_F(accuracy_test_pow7_double,small_3D_round_trip_complex_to_complex)7247 TEST_F(accuracy_test_pow7_double, small_3D_round_trip_complex_to_complex)
7248 {
7249 try { small_3D_round_trip_complex_to_complex< double, cl_double, fftw_complex >(); }
7250 catch (const std::exception& err) { handle_exception(err); }
7251 }
7252
7253 // *****************************************************
7254 // *****************************************************
7255 template< class T, class cl_T, class fftw_T >
normal_1D_round_trip_real_to_complex()7256 void normal_1D_round_trip_real_to_complex()
7257 {
7258 std::vector<size_t> lengths;
7259 lengths.push_back(normal7);
7260 size_t batch = 1;
7261
7262 data_pattern pattern = impulse;
7263 real_to_complex_round_trip<T, cl_T, fftw_T>(pattern, lengths, batch);
7264 }
7265
TEST_F(accuracy_test_pow7_single,normal_1D_round_trip_real_to_complex)7266 TEST_F(accuracy_test_pow7_single, normal_1D_round_trip_real_to_complex)
7267 {
7268 try { normal_1D_round_trip_real_to_complex< float, cl_float, fftwf_complex >(); }
7269 catch (const std::exception& err) { handle_exception(err); }
7270 }
7271
TEST_F(accuracy_test_pow7_double,normal_1D_round_trip_real_to_complex)7272 TEST_F(accuracy_test_pow7_double, normal_1D_round_trip_real_to_complex)
7273 {
7274 try { normal_1D_round_trip_real_to_complex< double, cl_double, fftw_complex >(); }
7275 catch (const std::exception& err) { handle_exception(err); }
7276 }
7277
7278 // *****************************************************
7279 // *****************************************************
7280 template< class T, class cl_T, class fftw_T >
large_1D_round_trip_real_to_complex()7281 void large_1D_round_trip_real_to_complex()
7282 {
7283 std::vector<size_t> lengths;
7284 lengths.push_back(large7);
7285 size_t batch = 1;
7286
7287 data_pattern pattern = impulse;
7288 real_to_complex_round_trip<T, cl_T, fftw_T>(pattern, lengths, batch);
7289 }
7290
TEST_F(accuracy_test_pow7_single,large_1D_round_trip_real_to_complex)7291 TEST_F(accuracy_test_pow7_single, large_1D_round_trip_real_to_complex)
7292 {
7293 try { large_1D_round_trip_real_to_complex< float, cl_float, fftwf_complex >(); }
7294 catch (const std::exception& err) { handle_exception(err); }
7295 }
7296
TEST_F(accuracy_test_pow7_double,large_1D_round_trip_real_to_complex)7297 TEST_F(accuracy_test_pow7_double, large_1D_round_trip_real_to_complex)
7298 {
7299 try { large_1D_round_trip_real_to_complex< double, cl_double, fftw_complex >(); }
7300 catch (const std::exception& err) { handle_exception(err); }
7301 }
7302
7303 // *****************************************************
7304 // *****************************************************
7305 template< class T, class cl_T, class fftw_T >
normal_2D_round_trip_real_to_complex()7306 void normal_2D_round_trip_real_to_complex()
7307 {
7308 std::vector<size_t> lengths;
7309 lengths.push_back(normal7);
7310 lengths.push_back(normal7);
7311 size_t batch = 1;
7312
7313 data_pattern pattern = impulse;
7314 real_to_complex_round_trip<T, cl_T, fftw_T>(pattern, lengths, batch);
7315 }
7316
TEST_F(accuracy_test_pow7_single,normal_2D_round_trip_real_to_complex)7317 TEST_F(accuracy_test_pow7_single, normal_2D_round_trip_real_to_complex)
7318 {
7319 try { normal_2D_round_trip_real_to_complex< float, cl_float, fftwf_complex >(); }
7320 catch (const std::exception& err) { handle_exception(err); }
7321 }
7322
TEST_F(accuracy_test_pow7_double,normal_2D_round_trip_real_to_complex)7323 TEST_F(accuracy_test_pow7_double, normal_2D_round_trip_real_to_complex)
7324 {
7325 try { normal_2D_round_trip_real_to_complex< double, cl_double, fftw_complex >(); }
7326 catch (const std::exception& err) { handle_exception(err); }
7327 }
7328
7329 // *****************************************************
7330 // *****************************************************
7331 template< class T, class cl_T, class fftw_T >
small_3D_round_trip_real_to_complex()7332 void small_3D_round_trip_real_to_complex()
7333 {
7334 std::vector<size_t> lengths;
7335 lengths.push_back(small7);
7336 lengths.push_back(small7);
7337 lengths.push_back(small7);
7338 size_t batch = 1;
7339
7340 data_pattern pattern = impulse;
7341 real_to_complex_round_trip<T, cl_T, fftw_T>(pattern, lengths, batch);
7342 }
7343
TEST_F(accuracy_test_pow7_single,small_3D_round_trip_real_to_complex)7344 TEST_F(accuracy_test_pow7_single, small_3D_round_trip_real_to_complex)
7345 {
7346 try { small_3D_round_trip_real_to_complex< float, cl_float, fftwf_complex >(); }
7347 catch (const std::exception& err) { handle_exception(err); }
7348 }
7349
TEST_F(accuracy_test_pow7_double,small_3D_round_trip_real_to_complex)7350 TEST_F(accuracy_test_pow7_double, small_3D_round_trip_real_to_complex)
7351 {
7352 try { small_3D_round_trip_real_to_complex< double, cl_double, fftw_complex >(); }
7353 catch (const std::exception& err) { handle_exception(err); }
7354 }
7355
7356 // *****************************************************
7357 // *****************************************************
7358
7359 struct InpSizeParameters {
7360 unsigned int x_dim;
7361 unsigned int y_dim;
7362 unsigned int z_dim;
7363 clfftPrecision precision;
7364
InpSizeParameterspower7::InpSizeParameters7365 InpSizeParameters(unsigned int ip_x_dim, unsigned int ip_y_dim, unsigned int ip_z_dim, clfftPrecision ip_precision)
7366 {
7367 x_dim = ip_x_dim;
7368 y_dim = ip_y_dim;
7369 z_dim = ip_z_dim;
7370 precision = ip_precision;
7371 }
7372 };
7373
7374 class TestParameterGenerator {
7375 private:
7376 std::vector<InpSizeParameters> data_sets;
7377 public:
TestParameterGenerator()7378 TestParameterGenerator()
7379 {
7380 generate();
7381 }
7382
parameter_sets()7383 std::vector<InpSizeParameters> & parameter_sets() { return data_sets; }
7384
7385 private:
generate(void)7386 void generate(void) {
7387
7388 size_t SP_MAX_LEN = 1 << 24;
7389 size_t DP_MAX_LEN = 1 << 22;
7390 int x, y, z, is_1D_parameters_pushed = 0;
7391 size_t max_pow7 = 8; /*because 7 ^ 9 is greater than SP_MAX_LEN*/
7392
7393 /*Generate test parameters*/
7394 for ( z = 0; z <= max_pow7; z++)
7395 {
7396 for ( y = is_1D_parameters_pushed; y <= max_pow7; y++)
7397 {
7398 for ( x = 1; x <= max_pow7; x++)
7399 {
7400 is_1D_parameters_pushed = 1;
7401 if (pow(7,(x + y + z)) <= (SP_MAX_LEN))
7402 {
7403 data_sets.push_back(InpSizeParameters((unsigned int)pow(7 , x), (unsigned int)pow(7 , y), (unsigned int)pow(7 , z), CLFFT_SINGLE));
7404 }
7405 else
7406 {
7407 break;
7408 }
7409 if (pow(7,(x + y + z)) <= (DP_MAX_LEN))
7410 {
7411 data_sets.push_back(InpSizeParameters((unsigned int)pow(7 , x), (unsigned int)pow(7 , y), (unsigned int)pow(7 , z), CLFFT_DOUBLE));
7412 }
7413 }
7414 }
7415 }
7416 }
7417 }; //class TestParameterGenerator
7418
7419 }; //namespace
7420
7421 // *****************************************************
7422 // *****************************************************
7423
7424 class accuracy_test_pow7_all_ip_size : public ::testing::TestWithParam<power7::InpSizeParameters> {
7425 protected:
accuracy_test_pow7_all_ip_size()7426 accuracy_test_pow7_all_ip_size() {}
~accuracy_test_pow7_all_ip_size()7427 virtual ~accuracy_test_pow7_all_ip_size() {}
SetUp()7428 virtual void SetUp() {}
TearDown()7429 virtual void TearDown() {}
7430 };
7431
7432 template< class T, class cl_T, class fftw_T >
accuracy_test_pow7_all_ip_size_in_place(power7::InpSizeParameters params)7433 void accuracy_test_pow7_all_ip_size_in_place(power7::InpSizeParameters params)
7434 {
7435 std::vector<size_t> lengths;
7436 if (params.x_dim > 1) lengths.push_back(params.x_dim);
7437 if (params.y_dim > 1) lengths.push_back(params.y_dim);
7438 if (params.z_dim > 1) lengths.push_back(params.z_dim);
7439
7440 size_t batch = (1 << 24) / (params.x_dim * params.y_dim * params.z_dim);
7441 std::vector<size_t> input_strides;
7442 std::vector<size_t> output_strides;
7443 size_t input_distance = 0;
7444 size_t output_distance = 0;
7445
7446 layout::buffer_layout_t in_layout = layout::complex_interleaved;
7447 layout::buffer_layout_t out_layout = layout::complex_interleaved;
7448 placeness::placeness_t placeness = placeness::in_place;
7449 direction::direction_t direction = direction::forward;
7450
7451 data_pattern pattern = sawtooth;
7452
7453 complex_to_complex<T, cl_T, fftw_T>(pattern, direction, lengths, batch, input_strides, output_strides, input_distance, output_distance, in_layout, out_layout, placeness);
7454 }
7455
TEST_P(accuracy_test_pow7_all_ip_size,power7_all_input_size)7456 TEST_P(accuracy_test_pow7_all_ip_size, power7_all_input_size) {
7457 power7::InpSizeParameters params = GetParam();
7458
7459 RecordProperty("x_dim_size", params.x_dim);
7460 RecordProperty("y_dim_size", params.y_dim);
7461 RecordProperty("z_dim_size", params.z_dim);
7462 RecordProperty("precision", params.precision);
7463
7464 switch(params.precision )
7465 {
7466 case CLFFT_SINGLE:
7467 try { accuracy_test_pow7_all_ip_size_in_place< float, cl_float, fftwf_complex >(params); }
7468 catch (const std::exception& err) { handle_exception(err); }
7469 break;
7470 case CLFFT_DOUBLE:
7471 try { accuracy_test_pow7_all_ip_size_in_place< double, cl_double, fftw_complex >(params); }
7472 catch (const std::exception& err) { handle_exception(err); }
7473 break;
7474 default:
7475 FAIL() << "input parameter corruption in the test:accuracy_test_pow7_all_ip_size.";
7476 };
7477
7478 }
7479
7480 INSTANTIATE_TEST_CASE_P(
7481 clfft_pow7_AllInpSizeTest,
7482 accuracy_test_pow7_all_ip_size,
7483 ::testing::ValuesIn(power7::TestParameterGenerator
7484 ().parameter_sets())
7485 );
7486