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

Function PoolDesc

core/pool.cpp:6–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4#include "pool.h"
5
6OIDN_NAMESPACE_BEGIN
7
8 Pool::Pool(const PoolDesc& desc)
9 : PoolDesc(desc)
10 {
11 if (srcDesc.getRank() != 3 || srcDesc.getH() % 2 != 0 || srcDesc.getW() % 2 != 0)
12 throw std::invalid_argument("invalid pooling source shape");
13
14 TensorDims dstDims{srcDesc.getC(), srcDesc.getH() / 2, srcDesc.getW() / 2};
15 TensorDims dstPaddedDims{srcDesc.getPaddedC(), dstDims[1], dstDims[2]};
16 dstDesc = {dstDims, dstPaddedDims, srcDesc.layout, srcDesc.dataType};
17 }
18
19 void Pool::setSrc(const Ref<Tensor>& src)
20 {

Callers

nothing calls this directly

Calls 5

getRankMethod · 0.80
getPaddedCMethod · 0.80
getHMethod · 0.45
getWMethod · 0.45
getCMethod · 0.45

Tested by

no test coverage detected