10 #include "etl/expr/base_temporary_expr.hpp" 18 template <etl_expr A,
typename T,
typename Impl>
47 template <same_dimensions<A> C>
51 Impl::apply(this->
a(), c);
58 template <same_dimensions<A> L>
67 template <same_dimensions<A> L>
76 template <same_dimensions<A> L>
85 template <same_dimensions<A> L>
94 template <same_dimensions<A> L>
106 return os <<
"fft(" << expr.
_a <<
")";
114 template <
typename A,
typename T,
typename Impl>
121 static constexpr
bool is_etl =
true;
126 static constexpr
bool is_linear =
false;
128 static constexpr
bool is_value =
false;
129 static constexpr
bool is_direct =
true;
130 static constexpr
bool is_generator =
false;
131 static constexpr
bool is_padded =
false;
132 static constexpr
bool is_aligned =
true;
133 static constexpr
bool is_temporary =
true;
142 template <vector_mode_t V>
143 static constexpr
bool vectorizable =
true;
150 static constexpr
size_t dim() {
170 return sub_traits::size(e.
_a);
177 static constexpr
size_t size() {
178 return sub_traits::size();
205 template <
typename A>
206 using fft_value_type = std::conditional_t<is_complex<A>,
value_t<A>, std::complex<value_t<A>>>;
211 template <
typename A>
212 using ifft_value_type = std::conditional_t<is_complex<A>, value_t<A>, std::complex<value_t<A>>>;
217 template <
typename A>
218 using ifft_real_value_type = std::conditional_t<is_complex<A>,
typename value_t<A>::value_type, value_t<A>>;
227 template <etl_expr A>
238 template <etl_expr A, etl_expr C>
240 validate_assign(c,
a);
251 template <etl_expr A>
262 template <etl_expr A, etl_expr C>
264 validate_assign(c,
a);
275 template <etl_expr A>
286 template <etl_expr A, etl_expr C>
288 validate_assign(c,
a);
299 template <etl_expr A>
310 template <etl_expr A, etl_expr C>
312 validate_assign(c,
a);
323 template <etl_expr A>
334 template <etl_expr A, etl_expr C>
336 validate_assign(c,
a);
347 template <etl_expr A>
358 template <etl_expr A, etl_expr C>
360 validate_assign(c,
a);
388 template <matrix A, matrix C>
390 validate_assign(c,
a);
418 template <matrix A, matrix C>
420 validate_assign(c,
a);
434 template <deep_mat A>
448 template <deep_mat A, deep_mat C>
450 validate_assign(c,
a);
464 template <deep_mat A>
478 template <deep_mat A, deep_mat C>
480 validate_assign(c,
a);
void assign_sub_to(L &&lhs) const
Sub from the given left-hand-side expression.
Definition: fft_expr.hpp:68
fft_expr< detail::build_type< A >, detail::ifft_value_type< A >, detail::ifft2_many_impl > ifft_2d_many(A &&a)
Creates an expression representing several 2D Fast-Fourrier-Transform of the given expression...
Definition: fft_expr.hpp:465
fft_expr< detail::build_type< A >, detail::fft_value_type< A >, detail::fft1_impl > fft_1d(A &&a)
Creates an expression representing the 1D Fast-Fourrier-Transform of the given expression.
Definition: fft_expr.hpp:228
Functor for 2D IFFT (real)
Definition: fft.hpp:637
std::decay_t< A > sub_expr_t
The sub expression type.
Definition: fft_expr.hpp:117
std::add_lvalue_reference_t< A > a()
Returns the sub expression.
Definition: base_temporary_expr.hpp:489
Functor for 2D FFT.
Definition: fft.hpp:485
static constexpr size_t dimensions()
Returns the number of dimensions of the expression.
Definition: fft_expr.hpp:185
fft_expr< detail::build_type< A >, detail::ifft_value_type< A >, detail::ifft1_impl > ifft_1d(A &&a)
Creates an expression representing the 1D inverse Fast-Fourrier-Transform of the given expression...
Definition: fft_expr.hpp:252
Functor for Batched 2D IFFT.
Definition: fft.hpp:903
constexpr bool is_magic_view
Traits indicating if the given ETL type is a magic view expression.
Definition: traits.hpp:311
fft_expr< detail::build_type< A >, detail::fft_value_type< A >, detail::fft2_many_impl > fft_2d_many(A &&a)
Creates an expression representing several 2D Fast-Fourrier-Transform of the given expression...
Definition: fft_expr.hpp:435
static constexpr size_t dim()
Returns the DDth dimension of the expression.
Definition: fft_expr.hpp:150
T value_type
The value type of the expression.
Definition: fft_expr.hpp:119
friend std::ostream & operator<<(std::ostream &os, const fft_expr &expr)
Print a representation of the expression on the given stream.
Definition: fft_expr.hpp:105
fft_expr< detail::build_type< A >, detail::fft_value_type< A >, detail::fft1_many_impl > fft_1d_many(A &&a)
Creates an expression representing several 1D Fast-Fourrier-Transform of the given expression...
Definition: fft_expr.hpp:375
Functor for Batched 1D IFFT.
Definition: fft.hpp:827
Functor for 1D IFFT.
Definition: fft.hpp:371
order
Storage order of a matrix.
Definition: order.hpp:15
constexpr bool cuda_enabled
Indicates if CUDA is available.
Definition: config.hpp:94
static constexpr int complexity() noexcept
Estimate the complexity of computation.
Definition: fft_expr.hpp:193
A _a
The sub expression reference.
Definition: base_temporary_expr.hpp:447
fft_expr< detail::build_type< A >, detail::fft_value_type< A >, detail::fft2_impl > fft_2d(A &&a)
Creates an expression representing the 2D Fast-Fourrier-Transform of the given expression.
Definition: fft_expr.hpp:300
constexpr bool is_fast
Traits to test if the given ETL expresion type is fast (sizes known at compile-time) ...
Definition: traits.hpp:588
Traits to get information about ETL types.
Definition: tmp.hpp:68
T value_type
The type of value of the expression.
Definition: fft_expr.hpp:20
Root namespace for the ETL library.
Definition: adapter.hpp:15
static constexpr size_t dimensions()
Return the number of dimensions of the expression.
Definition: traits_base.hpp:31
fft_expr(A a)
Construct a new expression.
Definition: fft_expr.hpp:37
void assign_mod_to(L &&lhs) const
Modulo the given left-hand-side expression.
Definition: fft_expr.hpp:95
auto dim(E &&value, size_t i) -> detail::identity_helper< E, dim_view< detail::build_identity_type< E >, D >>
Return a view representing the ith Dth dimension.
Definition: view_expression_builder.hpp:25
void assign_add_to(L &&lhs) const
Add to the given left-hand-side expression.
Definition: fft_expr.hpp:59
void std_mod_evaluate(Expr &&expr, Result &&result)
Compound modulo evaluation of the expr into result.
Definition: evaluator.hpp:1271
static constexpr size_t size()
Returns the size of the expression.
Definition: fft_expr.hpp:177
void assign_div_to(L &&lhs) const
Divide the given left-hand-side expression.
Definition: fft_expr.hpp:86
void assign_mul_to(L &&lhs) const
Multiply the given left-hand-side expression.
Definition: fft_expr.hpp:77
Functor for Batched 2D FFT.
Definition: fft.hpp:751
A transposition expression.
Definition: fft_expr.hpp:19
void std_mul_evaluate(Expr &&expr, Result &&result)
Compound multiply evaluation of the expr into result.
Definition: evaluator.hpp:1233
constexpr bool is_transformer
Traits indicating if the given ETL type is a transformer expression.
Definition: traits.hpp:297
Functor for 1D FFT.
Definition: fft.hpp:295
constexpr bool is_view
Traits indicating if the given ETL type is a view expression.
Definition: traits.hpp:304
void assign_to(C &&c) const
Assign to a matrix of the same storage order.
Definition: fft_expr.hpp:48
static constexpr bool is_fast
Indicates if T is a fast structure.
Definition: traits_base.hpp:25
Functor for Batched 1D FFT.
Definition: fft.hpp:675
void std_sub_evaluate(Expr &&expr, Result &&result)
Compound subtract evaluation of the expr into result.
Definition: evaluator.hpp:1214
static size_t dim(const expr_t &e, size_t d)
Returns the dth dimension of the expression.
Definition: fft_expr.hpp:160
Abstract base class for temporary unary expression.
Definition: base_temporary_expr.hpp:443
constexpr bool is_thread_safe
Traits to test if the given ETL expresion type is thread safe.
Definition: traits.hpp:687
static size_t size(const expr_t &e)
Returns the size of the expression.
Definition: fft_expr.hpp:169
fft_expr< detail::build_type< A >, detail::ifft_value_type< A >, detail::ifft1_many_impl > ifft_1d_many(A &&a)
Creates an expression representing several 1D Inverse Fast-Fourrier-Transform of the given expression...
Definition: fft_expr.hpp:405
static constexpr bool gpu_computable
Indicates if the temporary expression can be directly evaluated using only GPU.
Definition: fft_expr.hpp:31
fft_expr< detail::build_type< A >, detail::ifft_value_type< A >, detail::ifft2_impl > ifft_2d(A &&a)
Creates an expression representing the 2D inverse Fast-Fourrier-Transform of the given expression...
Definition: fft_expr.hpp:324
typename decay_traits< E >::value_type value_t
Traits to extract the value type out of an ETL type.
Definition: tmp.hpp:81
Functor for 2D IFFT.
Definition: fft.hpp:561
void std_div_evaluate(Expr &&expr, Result &&result)
Compound divide evaluation of the expr into result.
Definition: evaluator.hpp:1252
void inc_counter([[maybe_unused]] const char *name)
Increase the given counter.
Definition: counters.hpp:25
fft_expr< detail::build_type< A >, detail::ifft_real_value_type< A >, detail::ifft2_real_impl > ifft_2d_real(A &&a)
Creates an expression representing the real part of the 2D inverse Fast-Fourrier-Transform of the giv...
Definition: fft_expr.hpp:348
fft_expr< detail::build_type< A >, detail::ifft_real_value_type< A >, detail::ifft1_real_impl > ifft_1d_real(A &&a)
Creates an expression representing the real part of the 1D inverse Fast-Fourrier-Transform of the giv...
Definition: fft_expr.hpp:276
void std_add_evaluate(Expr &&expr, Result &&result)
Compound add evaluation of the expr into result.
Definition: evaluator.hpp:1195
Functor for 1D IFFT (real)
Definition: fft.hpp:447
static constexpr auto storage_order
The sub storage order.
Definition: fft_expr.hpp:25