| 65 | |
| 66 | TEST_SUITE(DFT1D) |
| 67 | DATA_TEST_CASE(Real, framework::DatasetMode::ALL, shapes_1d_dft, shape) |
| 68 | { |
| 69 | SimpleTensor<float> src{shape, DataType::F32, 1}; |
| 70 | std::uniform_real_distribution<float> distribution(-5.f, 5.f); |
| 71 | library->fill(src, distribution, 0); |
| 72 | |
| 73 | const bool is_odd = shape.x() % 2; |
| 74 | |
| 75 | // Forward pass |
| 76 | auto forward = reference::rdft_1d(src); |
| 77 | // Backward pass |
| 78 | auto backward = reference::ridft_1d(forward, is_odd); |
| 79 | |
| 80 | // Validate with input |
| 81 | validate(SimpleTensorAccessor<float>(src), backward, RelativeTolerance<float>(0.1f)); |
| 82 | } |
| 83 | |
| 84 | DATA_TEST_CASE(Complex, framework::DatasetMode::ALL, shapes_1d_dft, shape) |
| 85 | { |
no test coverage detected