| 81 | |
| 82 | |
| 83 | clfftStatus clfftSetPlanPrecision( clfftPlanHandle plHandle, clfftPrecision precision ) |
| 84 | { |
| 85 | FFTRepo& fftRepo = FFTRepo::getInstance( ); |
| 86 | FFTPlan* fftPlan = NULL; |
| 87 | lockRAII* planLock = NULL; |
| 88 | |
| 89 | OPENCL_V( fftRepo.getPlan( plHandle, fftPlan, planLock ), _T( "fftRepo.getPlan failed" ) ); |
| 90 | scopedLock sLock( *planLock, _T( "clfftSetPlanPrecision" ) ); |
| 91 | |
| 92 | if( precision >= ENDPRECISION ) |
| 93 | return CLFFT_INVALID_ARG_VALUE; |
| 94 | |
| 95 | // We do not support CLFFT_*_FAST currently |
| 96 | if( precision == CLFFT_SINGLE_FAST || precision == CLFFT_DOUBLE_FAST ) |
| 97 | return CLFFT_NOTIMPLEMENTED; |
| 98 | |
| 99 | |
| 100 | |
| 101 | // If we modify the state of the plan, we assume that we can't trust any pre-calculated contents anymore |
| 102 | fftPlan->baked = false; |
| 103 | fftPlan->precision = precision; |
| 104 | |
| 105 | return CLFFT_SUCCESS; |
| 106 | } |
| 107 | |
| 108 | clfftStatus clfftGetPlanScale( const clfftPlanHandle plHandle, clfftDirection dir, cl_float* scale ) |
| 109 | { |