MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / dft_2d

Function dft_2d

tests/validation/reference/DFT.cpp:372–395  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

370
371template <typename T>
372SimpleTensor<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
397template <typename T>
398SimpleTensor<T> conv2d_dft(const SimpleTensor<T> &src, const SimpleTensor<T> &w, const PadStrideInfo &conv_info)

Callers 2

DATA_TEST_CASEFunction · 0.85
compute_referenceMethod · 0.85

Calls 5

dft_1d_coreFunction · 0.85
permuteFunction · 0.70
scaleFunction · 0.70
num_channelsMethod · 0.45
shapeMethod · 0.45

Tested by

no test coverage detected