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

Function PadAndStackInto

python/mod_cvcuda/operators/OpPadAndStack.cpp:30–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28
29namespace {
30Tensor PadAndStackInto(Tensor &output, ImageBatchVarShape &input, Tensor &top, Tensor &left, NVCVBorderType border,
31 float borderValue, std::optional<Stream> pstream)
32{
33 if (!pstream)
34 {
35 pstream = Stream::Current();
36 }
37
38 auto padstack = CreateOperator<cvcuda::PadAndStack>();
39
40 ResourceGuard guard(*pstream);
41 guard.add(LockMode::LOCK_MODE_READ, {input, top, left});
42 guard.add(LockMode::LOCK_MODE_WRITE, {output});
43 guard.add(LockMode::LOCK_MODE_NONE, {*padstack});
44
45 padstack->submit(pstream->cudaHandle(), input, output, top, left, border, borderValue);
46
47 return std::move(output);
48}
49
50Tensor PadAndStack(ImageBatchVarShape &input, Tensor &top, Tensor &left, NVCVBorderType border, float borderValue,
51 std::optional<Stream> pstream)

Callers 1

PadAndStackFunction · 0.85

Calls 3

cudaHandleMethod · 0.80
addMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected