MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / ResizeInto

Function ResizeInto

python/mod_cvcuda/operators/OpResize.cpp:32–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

30
31namespace {
32Tensor ResizeInto(Tensor &output, Tensor &input, NVCVInterpolationType interp, std::optional<Stream> pstream)
33{
34 if (!pstream)
35 {
36 pstream = Stream::Current();
37 }
38
39 auto resize = CreateOperator<cvcuda::Resize>();
40
41 ResourceGuard guard(*pstream);
42 guard.add(LockMode::LOCK_MODE_READ, {input});
43 guard.add(LockMode::LOCK_MODE_WRITE, {output});
44 guard.add(LockMode::LOCK_MODE_NONE, {*resize});
45
46 resize->submit(pstream->cudaHandle(), input, output, interp);
47
48 return std::move(output);
49}
50
51Tensor Resize(Tensor &input, const Shape &out_shape, NVCVInterpolationType interp, std::optional<Stream> pstream)
52{

Callers 1

ResizeFunction · 0.85

Calls 3

cudaHandleMethod · 0.80
addMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected