Determine, which implementation of 1D transform to use and call it.
| 926 | |
| 927 | // Determine, which implementation of 1D transform to use and call it. |
| 928 | void Dft1D(int64 length, int64 start, int64 stride, bool inverse, |
| 929 | bool contract_output, bool expand_input, absl::Span<complex128> data, |
| 930 | absl::Span<complex128> buffer) { |
| 931 | if (IsPowerOfTwo(static_cast<uint64>(length))) { |
| 932 | Fft1D(length, start, stride, inverse, contract_output, expand_input, data, |
| 933 | buffer); |
| 934 | } else { |
| 935 | NaiveDft1D(length, start, stride, inverse, contract_output, expand_input, |
| 936 | data, buffer); |
| 937 | } |
| 938 | } |
| 939 | |
| 940 | // Helper to reverse the order of dimension lengths in the passed-in literal. |
| 941 | std::vector<int64> GetDimensionLengths(const Literal& literal) { |
no test coverage detected