| 4637 | class RFftFunctor { |
| 4638 | public: |
| 4639 | Maybe<Tensor> operator()(const std::shared_ptr<one::Tensor>& input, int64_t n, int64_t dim, |
| 4640 | const Optional<std::string>& norm) const { |
| 4641 | CHECK_OR_RETURN(!(input->dtype()->is_complex())) |
| 4642 | << "RuntimeError: expects the dtype of input Tensor is Real, but gets " |
| 4643 | << input->dtype()->name(); |
| 4644 | |
| 4645 | std::string norm_str = norm.value_or("backward"); |
| 4646 | std::vector<int64_t> fft_dim{dim}; |
| 4647 | bool forward = true; |
| 4648 | fft_norm_mode norm_mode = fft_norm_mode::none; |
| 4649 | norm_mode = fft_norm_from_string(norm_str, forward); |
| 4650 | |
| 4651 | std::vector<int64_t> len{n}; |
| 4652 | return functional::FftR2C(input, len, fft_dim, static_cast<int32_t>(norm_mode), |
| 4653 | /*onesided=*/true, /*forward=*/forward, /*normalized=*/true); |
| 4654 | } |
| 4655 | }; |
| 4656 | |
| 4657 | class IRFftFunctor { |
nothing calls this directly
no test coverage detected