| 224 | } |
| 225 | |
| 226 | clfftStatus FFTRepo::getclProgram( const clfftGenerators gen, const FFTKernelSignatureHeader * data, cl_program& prog, const cl_device_id &device, const cl_context& planContext ) |
| 227 | { |
| 228 | scopedLock sLock( lockRepo, _T( "getclProgram" ) ); |
| 229 | |
| 230 | FFTRepoKey key(gen, data, planContext, device); |
| 231 | |
| 232 | fftRepo_iterator pos = mapFFTs.find( key ); |
| 233 | if( pos == mapFFTs.end( ) ) |
| 234 | return CLFFT_INVALID_PROGRAM; |
| 235 | prog = pos->second.clProgram; |
| 236 | if (NULL == prog) |
| 237 | return CLFFT_INVALID_PROGRAM; |
| 238 | |
| 239 | cl_context progContext; |
| 240 | clGetProgramInfo(prog, CL_PROGRAM_CONTEXT, sizeof(cl_context), &progContext, NULL); |
| 241 | if (planContext!=progContext) |
| 242 | return CLFFT_INVALID_PROGRAM; |
| 243 | |
| 244 | return CLFFT_SUCCESS; |
| 245 | } |
| 246 | |
| 247 | clfftStatus FFTRepo::setclKernel( cl_program prog, clfftDirection dir, const cl_kernel& kernel ) |
| 248 | { |
no outgoing calls
no test coverage detected