| 126 | } |
| 127 | |
| 128 | clfftStatus clfftSetPlanScale( clfftPlanHandle plHandle, clfftDirection dir, cl_float scale ) |
| 129 | { |
| 130 | FFTRepo& fftRepo = FFTRepo::getInstance( ); |
| 131 | FFTPlan* fftPlan = NULL; |
| 132 | lockRAII* planLock = NULL; |
| 133 | |
| 134 | OPENCL_V( fftRepo.getPlan( plHandle, fftPlan, planLock ), _T( "fftRepo.getPlan failed" ) ); |
| 135 | scopedLock sLock( *planLock, _T( "clfftSetPlanScale" ) ); |
| 136 | |
| 137 | if( dir >= ENDDIRECTION ) |
| 138 | return CLFFT_INVALID_ARG_VALUE; |
| 139 | |
| 140 | // If we modify the state of the plan, we assume that we can't trust any pre-calculated contents anymore |
| 141 | fftPlan->baked = false; |
| 142 | |
| 143 | if( dir == CLFFT_FORWARD || dir == CLFFT_MINUS ) |
| 144 | fftPlan->forwardScale = scale; |
| 145 | else |
| 146 | fftPlan->backwardScale = scale; |
| 147 | |
| 148 | return CLFFT_SUCCESS; |
| 149 | } |
| 150 | |
| 151 | clfftStatus clfftGetPlanDim( const clfftPlanHandle plHandle, clfftDim* dim, cl_uint* size ) |
| 152 | { |