MCPcopy Create free account
hub / github.com/clMathLibraries/clFFT / clfftSetPlanDim

Function clfftSetPlanDim

src/library/accessors.cpp:187–230  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185}
186
187clfftStatus clfftSetPlanDim( clfftPlanHandle plHandle, const clfftDim dim )
188{
189 FFTRepo& fftRepo = FFTRepo::getInstance( );
190 FFTPlan* fftPlan = NULL;
191 lockRAII* planLock = NULL;
192
193 OPENCL_V( fftRepo.getPlan( plHandle, fftPlan, planLock ), _T( "fftRepo.getPlan failed" ) );
194 scopedLock sLock( *planLock, _T( "clfftGetPlanDim" ) );
195
196 // We resize the vectors in the plan to keep their sizes consistent with the value of the dimension
197 switch( dim )
198 {
199 case CLFFT_1D:
200 {
201 fftPlan->length.resize( 1 );
202 fftPlan->inStride.resize( 1 );
203 fftPlan->outStride.resize( 1 );
204 }
205 break;
206 case CLFFT_2D:
207 {
208 fftPlan->length.resize( 2 );
209 fftPlan->inStride.resize( 2 );
210 fftPlan->outStride.resize( 2 );
211 }
212 break;
213 case CLFFT_3D:
214 {
215 fftPlan->length.resize( 3 );
216 fftPlan->inStride.resize( 3 );
217 fftPlan->outStride.resize( 3 );
218 }
219 break;
220 default:
221 return CLFFT_NOTIMPLEMENTED;
222 break;
223 }
224
225 // If we modify the state of the plan, we assume that we can't trust any pre-calculated contents anymore
226 fftPlan->baked = false;
227 fftPlan->dim = dim;
228
229 return CLFFT_SUCCESS;
230}
231
232clfftStatus clfftGetPlanLength( const clfftPlanHandle plHandle, const clfftDim dim, size_t* clLengths )
233{

Callers 2

TEST_FFunction · 0.85
clAmdFftSetPlanDimFunction · 0.85

Calls 1

getPlanMethod · 0.80

Tested by 1

TEST_FFunction · 0.68