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

Function runGuard

python/mod_cvcuda/operators/OpColorTwist.cpp:51–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49
50template<typename Op, typename Src, typename Dst, typename Call>
51auto runGuard(Op &op, Src &src, Dst &dst, const Tensor &twist, std::optional<Stream> &pstream, Call &&call)
52{
53 if (!pstream)
54 {
55 pstream = Stream::Current();
56 }
57
58 ResourceGuard guard(*pstream);
59 guard.add(LockMode::LOCK_MODE_READ, {src, twist});
60 guard.add(LockMode::LOCK_MODE_WRITE, {dst});
61 guard.add(LockMode::LOCK_MODE_NONE, {*op});
62
63 call(*pstream);
64}
65
66Tensor ColorTwistMatrixInto(Tensor &dst, Tensor &src, Tensor &twist, std::optional<Stream> pstream)
67{

Callers 2

ColorTwistMatrixIntoFunction · 0.70

Calls 1

addMethod · 0.45

Tested by

no test coverage detected