| 370 | |
| 371 | template <typename T> |
| 372 | SimpleTensor<T> dft_2d(const SimpleTensor<T> &src, FFTDirection direction) |
| 373 | { |
| 374 | ARM_COMPUTE_ERROR_ON(src.num_channels() != 2); |
| 375 | |
| 376 | if (direction == FFTDirection::Forward) |
| 377 | { |
| 378 | auto first_pass = dft_1d_core(src, direction); |
| 379 | auto transposed = permute(first_pass, PermutationVector(1U, 0U)); |
| 380 | auto second_pass = dft_1d_core(transposed, direction); |
| 381 | return permute(second_pass, PermutationVector(1U, 0U)); |
| 382 | } |
| 383 | else |
| 384 | { |
| 385 | auto transposed = permute(src, PermutationVector(1U, 0U)); |
| 386 | auto first_pass = dft_1d_core(transposed, direction); |
| 387 | auto transposed_2 = permute(first_pass, PermutationVector(1U, 0U)); |
| 388 | auto dst = dft_1d_core(transposed_2, direction); |
| 389 | |
| 390 | const T scaling_factor = T(dst.shape()[0] * dst.shape()[1]); |
| 391 | scale(dst, scaling_factor); |
| 392 | |
| 393 | return dst; |
| 394 | } |
| 395 | } |
| 396 | |
| 397 | template <typename T> |
| 398 | SimpleTensor<T> conv2d_dft(const SimpleTensor<T> &src, const SimpleTensor<T> &w, const PadStrideInfo &conv_info) |
no test coverage detected