| 309 | } |
| 310 | |
| 311 | void FinalizeOpsForCPU(OpRcPtrVec & ops, const OpRcPtrVec & rawOps, |
| 312 | BitDepth in, BitDepth out, |
| 313 | OptimizationFlags oFlags) |
| 314 | { |
| 315 | ops = rawOps; |
| 316 | |
| 317 | if(!ops.empty()) |
| 318 | { |
| 319 | // Finalize of all ops. |
| 320 | ops.finalize(); |
| 321 | |
| 322 | // Optimize the ops. |
| 323 | ops.optimize(oFlags); |
| 324 | ops.optimizeForBitdepth(in, out, oFlags); |
| 325 | } |
| 326 | |
| 327 | // The previous code could change the list of ops so an explicit check to empty is still needed. |
| 328 | if(ops.empty()) |
| 329 | { |
| 330 | // Needs at least one op (even an identity one) as the input and output buffers could be |
| 331 | // different. |
| 332 | CreateIdentityMatrixOp(ops); |
| 333 | } |
| 334 | |
| 335 | if (!((oFlags & OPTIMIZATION_NO_DYNAMIC_PROPERTIES) == OPTIMIZATION_NO_DYNAMIC_PROPERTIES)) |
| 336 | { |
| 337 | ops.validateDynamicProperties(); |
| 338 | } |
| 339 | } |
| 340 | |
| 341 | void CPUProcessor::Impl::finalize(const OpRcPtrVec & rawOps, |
| 342 | BitDepth in, BitDepth out, |
no test coverage detected