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

Function clfftCreateDefaultPlanInternal

src/library/plan.cpp:200–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

198}
199
200clfftStatus clfftCreateDefaultPlanInternal( clfftPlanHandle* plHandle, cl_context context, const clfftDim dim,
201 const size_t* clLengths )
202{
203 if( clLengths == NULL )
204 return CLFFT_INVALID_HOST_PTR;
205
206 size_t lenX = 1, lenY = 1, lenZ = 1;
207
208 switch( dim )
209 {
210 case CLFFT_1D:
211 {
212 // Minimum length size is 1
213 if( clLengths[ DimX ] == 0 )
214 return CLFFT_INVALID_ARG_VALUE;
215
216 if( !IsASupportedLength( clLengths[ DimX ] ) )
217 {
218 return CLFFT_NOTIMPLEMENTED;
219 }
220
221 lenX = clLengths[ DimX ];
222 }
223 break;
224 case CLFFT_2D:
225 {
226 // Minimum length size is 1
227 if( clLengths[ DimX ] == 0 || clLengths[ DimY ] == 0 )
228 return CLFFT_INVALID_ARG_VALUE;
229
230 if( !IsASupportedLength( clLengths[ DimX ] ) || !IsASupportedLength( clLengths[ DimY ] ) )
231 {
232 return CLFFT_NOTIMPLEMENTED;
233 }
234
235 lenX = clLengths[ DimX ];
236 lenY = clLengths[ DimY ];
237 }
238 break;
239 case CLFFT_3D:
240 {
241 // Minimum length size is 1
242 if( clLengths[ DimX ] == 0 || clLengths[ DimY ] == 0 || clLengths[ DimZ ] == 0 )
243 return CLFFT_INVALID_ARG_VALUE;
244
245 if( !IsASupportedLength( clLengths[ DimX ] ) || !IsASupportedLength( clLengths[ DimY ] ) ||
246 !IsASupportedLength( clLengths[ DimZ ] ))
247 {
248 return CLFFT_NOTIMPLEMENTED;
249 }
250
251 lenX = clLengths[ DimX ];
252 lenY = clLengths[ DimY ];
253 lenZ = clLengths[ DimZ ];
254 }
255 break;
256 default:
257 return CLFFT_NOTIMPLEMENTED;

Callers 2

clfftCreateDefaultPlanFunction · 0.85
clfftBakePlanFunction · 0.85

Calls 5

IsASupportedLengthFunction · 0.85
createPlanMethod · 0.80
SetEnvelopeMethod · 0.80
getPlanMethod · 0.80
setNameMethod · 0.45

Tested by

no test coverage detected