|
32 | 32 |
|
33 | 33 | #include <fftw3.h> |
34 | 34 |
|
| 35 | +#include "xtensor-fftw_config.hpp" |
| 36 | + |
35 | 37 | #ifdef __CLING__ |
36 | 38 | #pragma cling load("fftw3") |
37 | 39 | #endif |
@@ -386,7 +388,8 @@ namespace xt { |
386 | 388 |
|
387 | 389 | auto plan = fftw_plan_dft_caller<dim, fftw_direction, fftw_123dim, input_t, output_t, fftw_plan_dft, half_plus_one_out, half_plus_one_in>(input, output, FFTW_ESTIMATE, odd_last_dim); |
388 | 390 | if (plan == nullptr) { |
389 | | - throw std::runtime_error("Plan creation returned nullptr. This usually means FFTW cannot create a plan for the given arguments (e.g. a non-destructive multi-dimensional real FFT is impossible in FFTW)."); |
| 391 | + XTENSOR_FFTW_THROW(std::runtime_error, |
| 392 | + "Plan creation returned nullptr. This usually means FFTW cannot create a plan for the given arguments (e.g. a non-destructive multi-dimensional real FFT is impossible in FFTW)."); |
390 | 393 | } |
391 | 394 |
|
392 | 395 | fftw_execute(plan); |
@@ -414,7 +417,8 @@ namespace xt { |
414 | 417 |
|
415 | 418 | auto plan = fftw_plan_dft_caller<dim, fftw_direction, fftw_123dim, input_t, output_t, fftw_plan_dft, half_plus_one_out, half_plus_one_in>(input, output, FFTW_ESTIMATE, odd_last_dim); |
416 | 419 | if (plan == nullptr) { |
417 | | - throw std::runtime_error("Plan creation returned nullptr. This usually means FFTW cannot create a plan for the given arguments (e.g. a non-destructive multi-dimensional real FFT is impossible in FFTW)."); |
| 420 | + XTENSOR_FFTW_THROW(std::runtime_error, |
| 421 | + "Plan creation returned nullptr. This usually means FFTW cannot create a plan for the given arguments (e.g. a non-destructive multi-dimensional real FFT is impossible in FFTW)."); |
418 | 422 | } |
419 | 423 |
|
420 | 424 | fftw_execute(plan); |
@@ -446,7 +450,8 @@ namespace xt { |
446 | 450 |
|
447 | 451 | auto plan = fftw_plan_dft_caller<dim, fftw_direction, fftw_123dim, input_t, output_t, fftw_plan_dft, half_plus_one_out, half_plus_one_in>(input_conj, output, FFTW_ESTIMATE); |
448 | 452 | if (plan == nullptr) { |
449 | | - throw std::runtime_error("Plan creation returned nullptr. This usually means FFTW cannot create a plan for the given arguments (e.g. a non-destructive multi-dimensional real FFT is impossible in FFTW)."); |
| 453 | + XTENSOR_FFTW_THROW(std::runtime_error, |
| 454 | + "Plan creation returned nullptr. This usually means FFTW cannot create a plan for the given arguments (e.g. a non-destructive multi-dimensional real FFT is impossible in FFTW)."); |
450 | 455 | } |
451 | 456 |
|
452 | 457 | fftw_execute(plan); |
@@ -474,7 +479,8 @@ namespace xt { |
474 | 479 |
|
475 | 480 | auto plan = fftw_plan_dft_caller<dim, fftw_direction, fftw_123dim, input_t, output_t, fftw_plan_dft, half_plus_one_out, half_plus_one_in>(input, output, FFTW_ESTIMATE); |
476 | 481 | if (plan == nullptr) { |
477 | | - throw std::runtime_error("Plan creation returned nullptr. This usually means FFTW cannot create a plan for the given arguments (e.g. a non-destructive multi-dimensional real FFT is impossible in FFTW)."); |
| 482 | + XTENSOR_FFTW_THROW(std::runtime_error, |
| 483 | + "Plan creation returned nullptr. This usually means FFTW cannot create a plan for the given arguments (e.g. a non-destructive multi-dimensional real FFT is impossible in FFTW)."); |
478 | 484 | } |
479 | 485 |
|
480 | 486 | fftw_execute(plan); |
|
0 commit comments