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

Function UpsampleDesc

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

Source from the content-addressed store, hash-verified

4#include "upsample.h"
5
6OIDN_NAMESPACE_BEGIN
7
8 Upsample::Upsample(const UpsampleDesc& desc)
9 : UpsampleDesc(desc)
10 {
11 if (srcDesc.getRank() != 3)
12 throw std::invalid_argument("invalid upsampling 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 Upsample::setSrc(const Ref<Tensor>& src)
20 {

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected