| 17 | } |
| 18 | |
| 19 | void CPUInputProcess::submitKernels(const Ref<CancellationToken>& ct) |
| 20 | { |
| 21 | check(); |
| 22 | |
| 23 | ispc::CPUInputProcessKernel kernel; |
| 24 | Image nullImage; |
| 25 | |
| 26 | kernel.input = color ? *color : (albedo ? *albedo : *normal); |
| 27 | kernel.albedo = (color && albedo) ? *albedo : nullImage; |
| 28 | kernel.normal = (color && normal) ? *normal : nullImage; |
| 29 | kernel.dst = *dst; |
| 30 | kernel.tile = toISPC(tile); |
| 31 | kernel.transferFunc = toISPC(*transferFunc); |
| 32 | kernel.hdr = hdr; |
| 33 | kernel.snorm = snorm; |
| 34 | |
| 35 | auto kernelFunc = (dst->getDataType() == DataType::Float16) |
| 36 | ? ispc::CPUInputProcessKernel_run_f16 |
| 37 | : ispc::CPUInputProcessKernel_run_f32; |
| 38 | |
| 39 | engine->submitFunc([=] |
| 40 | { |
| 41 | parallel_for(kernel.dst.H, [&](int hDst) |
| 42 | { |
| 43 | kernelFunc(&kernel, hDst); |
| 44 | }); |
| 45 | }, ct); |
| 46 | } |
| 47 | |
| 48 | OIDN_NAMESPACE_END |
nothing calls this directly
no test coverage detected