11 #include "etl/impl/fft.hpp" 53 if constexpr (is_2d<derived_t>) {
68 if constexpr (is_3d<D>) {
69 for (
size_t i = 0; i < etl::dim<0>(mat); ++i) {
70 mat(i).fflip_inplace();
73 for (
size_t i = 0; i < etl::dim<0>(mat); ++i) {
74 mat(i).deep_fflip_inplace();
87 if constexpr (is_dyn_matrix<derived_t>) {
88 if constexpr (is_3d<derived_t>) {
89 for (
size_t i = 0; i < etl::dim<0>(mat); ++i) {
90 mat(i).direct_transpose_inplace();
93 for (
size_t i = 0; i < etl::dim<0>(mat); ++i) {
94 mat(i).direct_deep_transpose_inplace();
101 swap(mat.unsafe_dimension_access(d - 1), mat.unsafe_dimension_access(d - 2));
103 if constexpr (is_3d<derived_t>) {
104 for (
size_t i = 0; i < etl::dim<0>(mat); ++i) {
105 mat(i).transpose_inplace();
108 for (
size_t i = 0; i < etl::dim<0>(mat); ++i) {
109 mat(i).deep_transpose_inplace();
123 if constexpr (is_3d<derived_t>) {
124 for (
size_t i = 0; i < etl::dim<0>(mat); ++i) {
125 mat(i).direct_transpose_inplace();
128 for (
size_t i = 0; i < etl::dim<0>(mat); ++i) {
129 mat(i).direct_deep_transpose_inplace();
144 if constexpr (is_dyn_matrix<derived_t>) {
145 if (etl::dim<0>(mat) == etl::dim<1>(mat)) {
151 swap(mat.unsafe_dimension_access(0), mat.unsafe_dimension_access(1));
154 cpp_assert(etl::dim<0>(mat) == etl::dim<1>(mat),
"Only square fast matrices can be tranposed inplace");
170 if (etl::dim<0>(mat) == etl::dim<1>(mat)) {
derived_t & deep_transpose_inplace()
Transpose each sub 2D matrix in place.
Definition: inplace_assignable.hpp:84
derived_t & deep_fflip_inplace()
Fully flip each sub 2D matrix in place.
Definition: inplace_assignable.hpp:65
derived_t & direct_deep_transpose_inplace()
Transpose each sub 2D matrix in place.
Definition: inplace_assignable.hpp:120
derived_t & as_derived() noexcept
Returns a reference to the derived object, i.e. the object using the CRTP injector.
Definition: inplace_assignable.hpp:33
static void apply(C &&c)
Apply the functor.
Definition: fft.hpp:613
static void apply(C &&c)
Apply the functor.
Definition: fft.hpp:537
D D
The number of dimensions.
Definition: dyn_matrix_view.hpp:24
derived_t & ifft_many_inplace() requires(matrix< derived_t > &&etl_complex_expr< derived_t >)
Perform many inplace 1D Inverse FFT of the vector.
Definition: inplace_assignable.hpp:217
derived_t & direct_transpose_inplace() requires(etl_2d< derived_t >)
Transpose the matrix in place.
Definition: inplace_assignable.hpp:167
Implementations of inplace matrix transposition.
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
derived_t & ifft_inplace() requires(etl_1d< derived_t > &&etl_complex_expr< derived_t >)
Perform inplace 1D Inverse FFT of the vector.
Definition: inplace_assignable.hpp:206
derived_t & fft2_many_inplace() requires(deep_mat< derived_t > &&etl_complex_expr< derived_t >)
Perform many inplace 2D FFT of the matrix.
Definition: inplace_assignable.hpp:241
static void apply(C &&c)
Apply the functor.
Definition: fft.hpp:727
CRTP class to inject inplace operations to matrix and vector structures.
Definition: inplace_assignable.hpp:26
void swap(custom_dyn_matrix_impl< T, SO, D > &lhs, custom_dyn_matrix_impl< T, SO, D > &rhs)
Swap two dyn matrix.
Definition: custom_dyn.hpp:403
derived_t & scale_inplace(E &&e)
Scale the matrix by the factor e, in place.
Definition: inplace_assignable.hpp:43
static void apply(C &&c)
Apply the functor.
Definition: fft.hpp:955
derived_t & ifft2_inplace() requires(etl_2d< derived_t > &&etl_complex_expr< derived_t >)
Perform inplace 2D Inverse FFT of the matrix.
Definition: inplace_assignable.hpp:252
requires(D > 0) struct dyn_base
Matrix with run-time fixed dimensions.
Definition: dyn_base.hpp:113
derived_t & fft_inplace() requires(etl_1d< derived_t > &&etl_complex_expr< derived_t >)
Perform inplace 1D FFT of the vector.
Definition: inplace_assignable.hpp:182
static void apply(C &&c)
Apply the functor.
Definition: fft.hpp:879
static void apply(C &&c)
Apply the functor.
Definition: fft.hpp:347
static void apply(C &&c)
Tranpose c inplace.
Definition: transpose.hpp:302
Matrix with compile-time fixed dimensions.
Definition: custom_fast.hpp:27
derived_t & fft_many_inplace() requires(matrix< derived_t > &&etl_complex_expr< derived_t >)
Perform many inplace 1D FFT of the matrix.
Definition: inplace_assignable.hpp:195
derived_t & fft2_inplace() requires(etl_2d< derived_t > &&etl_complex_expr< derived_t >)
Perform inplace 2D FFT of the matrix.
Definition: inplace_assignable.hpp:228
derived_t & ifft2_many_inplace() requires(deep_mat< derived_t > &&etl_complex_expr< derived_t >)
Perform many inplace 2D Inverse FFT of the matrix.
Definition: inplace_assignable.hpp:263
static void apply(C &&c)
Apply the functor.
Definition: fft.hpp:423
static void apply(C &&c)
Tranpose c inplace.
Definition: transpose.hpp:269
derived_t & fflip_inplace() requires(mat_or_vec< derived_t >)
Flip the matrix horizontally and vertically, in place.
Definition: inplace_assignable.hpp:52
derived_t & transpose_inplace() requires(etl_2d< derived_t >)
Transpose the matrix in place.
Definition: inplace_assignable.hpp:141
static void apply(C &&c)
Apply the functor.
Definition: fft.hpp:803