| 4611 | |
| 4612 | |
| 4613 | clfftStatus clfftDestroyPlan( clfftPlanHandle* plHandle ) |
| 4614 | { |
| 4615 | FFTRepo& fftRepo = FFTRepo::getInstance( ); |
| 4616 | FFTPlan* fftPlan = NULL; |
| 4617 | lockRAII* planLock = NULL; |
| 4618 | |
| 4619 | OPENCL_V( fftRepo.getPlan( *plHandle, fftPlan, planLock ), _T( "fftRepo.getPlan failed" ) ); |
| 4620 | |
| 4621 | // Recursively destroy subplans, that are used for higher dimensional FFT's |
| 4622 | if( fftPlan->planX ) |
| 4623 | clfftDestroyPlan( &fftPlan->planX ); |
| 4624 | if( fftPlan->planY ) |
| 4625 | clfftDestroyPlan( &fftPlan->planY ); |
| 4626 | if( fftPlan->planZ ) |
| 4627 | clfftDestroyPlan( &fftPlan->planZ ); |
| 4628 | if( fftPlan->planTX ) |
| 4629 | clfftDestroyPlan( &fftPlan->planTX ); |
| 4630 | if( fftPlan->planTY ) |
| 4631 | clfftDestroyPlan( &fftPlan->planTY ); |
| 4632 | if( fftPlan->planTZ ) |
| 4633 | clfftDestroyPlan( &fftPlan->planTZ ); |
| 4634 | if( fftPlan->planRCcopy ) |
| 4635 | clfftDestroyPlan( &fftPlan->planRCcopy ); |
| 4636 | if( fftPlan->planCopy ) |
| 4637 | clfftDestroyPlan( &fftPlan->planCopy ); |
| 4638 | |
| 4639 | fftRepo.deletePlan( plHandle ); |
| 4640 | |
| 4641 | return CLFFT_SUCCESS; |
| 4642 | } |
| 4643 | |
| 4644 | // This routine will query the OpenCL context for it's devices |
| 4645 | // and their hardware limitations, which we synthesize into a |