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

Function CompositeInto

python/mod_cvcuda/operators/OpComposite.cpp:34–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32
33namespace {
34Tensor CompositeInto(Tensor &output, Tensor &foreground, Tensor &background, Tensor &fgMask,
35 std::optional<Stream> pstream)
36{
37 if (!pstream)
38 {
39 pstream = Stream::Current();
40 }
41
42 auto composite = CreateOperator<cvcuda::Composite>();
43
44 ResourceGuard guard(*pstream);
45 guard.add(LockMode::LOCK_MODE_READ, {foreground, background, fgMask});
46 guard.add(LockMode::LOCK_MODE_WRITE, {output});
47 guard.add(LockMode::LOCK_MODE_NONE, {*composite});
48
49 composite->submit(pstream->cudaHandle(), foreground, background, fgMask, output);
50
51 return output;
52}
53
54Tensor Composite(Tensor &foreground, Tensor &background, Tensor &fgMask, int outChannels, std::optional<Stream> pstream)
55{

Callers 1

CompositeFunction · 0.85

Calls 3

cudaHandleMethod · 0.80
addMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected