| 359 | ROCMFftPlan::~ROCMFftPlan() { wrap::hipfftDestroy(parent_, plan_); } |
| 360 | |
| 361 | int ROCMFftPlan::GetFftDirection() const { |
| 362 | if (!IsInitialized()) { |
| 363 | LOG(FATAL) << "Try to get fft direction before initialization."; |
| 364 | } else { |
| 365 | switch (fft_type_) { |
| 366 | case fft::Type::kC2CForward: |
| 367 | case fft::Type::kZ2ZForward: |
| 368 | case fft::Type::kR2C: |
| 369 | case fft::Type::kD2Z: |
| 370 | return HIPFFT_FORWARD; |
| 371 | case fft::Type::kC2CInverse: |
| 372 | case fft::Type::kZ2ZInverse: |
| 373 | case fft::Type::kC2R: |
| 374 | case fft::Type::kZ2D: |
| 375 | return HIPFFT_BACKWARD; |
| 376 | default: |
| 377 | LOG(FATAL) << "Invalid value of fft::Type."; |
| 378 | } |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | std::unique_ptr<fft::Plan> ROCMFft::Create1dPlan(Stream *stream, uint64 num_x, |
| 383 | fft::Type type, |
no outgoing calls
no test coverage detected