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

Method setclProgram

src/library/repo.cpp:203–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201}
202
203clfftStatus FFTRepo::setclProgram( const clfftGenerators gen, const FFTKernelSignatureHeader * data, const cl_program& prog, const cl_device_id &device, const cl_context& planContext )
204{
205 scopedLock sLock( lockRepo, _T( "setclProgram" ) );
206
207 FFTRepoKey key(gen, data, planContext, device);
208
209 fftRepo_iterator pos = mapFFTs.find( key );
210 if( pos == mapFFTs.end( ) )
211 {
212 key.privatizeData(); // the key owns the data
213 mapFFTs[ key ].clProgram = prog;
214 }
215 else {
216 cl_program p = pos->second.clProgram;
217 assert (NULL == p);
218 if (NULL != p)
219 clReleaseProgram (p);
220 pos->second.clProgram = prog;
221 }
222
223 return CLFFT_SUCCESS;
224}
225
226clfftStatus FFTRepo::getclProgram( const clfftGenerators gen, const FFTKernelSignatureHeader * data, cl_program& prog, const cl_device_id &device, const cl_context& planContext )
227{

Callers 1

compileKernelsMethod · 0.80

Calls 1

privatizeDataMethod · 0.80

Tested by

no test coverage detected