MCPcopy Create free account
hub / github.com/RenderKit/oidn / submitKernels

Method submitKernels

devices/cpu/cpu_pool.cpp:23–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21 }
22
23 void CPUPool::submitKernels(const Ref<CancellationToken>& ct)
24 {
25 if (!src || !dst)
26 throw std::logic_error("pooling source/destination not set");
27
28 const int blockC = getTensorLayoutInfo(dstDesc.layout).blockC;
29
30 ispc::CPUPoolKernel kernel;
31 kernel.src = *src;
32 kernel.dst = *dst;
33
34 auto kernelFunc = (src->getDataType() == DataType::Float16)
35 ? ispc::CPUPoolKernel_run_f16
36 : ispc::CPUPoolKernel_run_f32;
37
38 engine->submitFunc([=]
39 {
40 parallel_for(kernel.dst.C / blockC, kernel.dst.H, [&](int cb, int h)
41 {
42 kernelFunc(&kernel, cb, h);
43 });
44 }, ct);
45 }
46
47OIDN_NAMESPACE_END

Callers

nothing calls this directly

Calls 3

parallel_forFunction · 0.85
submitFuncMethod · 0.80
getDataTypeMethod · 0.45

Tested by

no test coverage detected