| 297 | |
| 298 | template <> |
| 299 | Spectrogram<CPUBackend>::Spectrogram(const OpSpec &spec) |
| 300 | : StatelessOperator<CPUBackend>(spec) { |
| 301 | auto layout = spec.GetArgument<std::string>("layout"); |
| 302 | DALI_ENFORCE(layout == "tf" || layout == "ft", |
| 303 | make_string("Unexpected layout: ", layout)); |
| 304 | bool time_major = layout == "tf"; |
| 305 | if (time_major) |
| 306 | impl_ = std::make_unique<SpectrogramImplCpu<true>>(spec); |
| 307 | else |
| 308 | impl_ = std::make_unique<SpectrogramImplCpu<false>>(spec); |
| 309 | } |
| 310 | |
| 311 | DALI_REGISTER_OPERATOR(Spectrogram, Spectrogram<CPUBackend>, CPU); |
| 312 |
no test coverage detected