| 4753 | class IHFftFunctor { |
| 4754 | public: |
| 4755 | Maybe<Tensor> operator()(const std::shared_ptr<one::Tensor>& input, int64_t n, int64_t dim, |
| 4756 | const Optional<std::string>& norm) const { |
| 4757 | CHECK_OR_RETURN(!(input->dtype()->is_complex())) |
| 4758 | << "RuntimeError: expects the dtype of input Tensor is Real, but gets " |
| 4759 | << input->dtype()->name(); |
| 4760 | |
| 4761 | std::string norm_str = norm.value_or("backward"); |
| 4762 | std::vector<int64_t> fft_dim{dim}; |
| 4763 | |
| 4764 | bool forward = false; |
| 4765 | fft_norm_mode norm_mode = fft_norm_mode::none; |
| 4766 | norm_mode = fft_norm_from_string(norm_str, forward); |
| 4767 | |
| 4768 | std::vector<int64_t> len{n}; |
| 4769 | return functional::FftR2C(input, len, fft_dim, static_cast<int32_t>(norm_mode), |
| 4770 | /*onesided=*/true, |
| 4771 | /*forward=*/forward, /*normalized=*/true); |
| 4772 | } |
| 4773 | }; |
| 4774 | |
| 4775 | class HFft2Functor { |
nothing calls this directly
no test coverage detected