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