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

Function MaxLocInto

python/mod_cvcuda/operators/OpMinMaxLoc.cpp:102–120  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

100
101template<class InputContainer>
102TupleTensor3 MaxLocInto(Tensor &maxVal, Tensor &maxLoc, Tensor &numMax, InputContainer &input,
103 std::optional<Stream> pstream)
104{
105 if (!pstream)
106 {
107 pstream = Stream::Current();
108 }
109
110 auto op = CreateOperator<cvcuda::MinMaxLoc>();
111
112 ResourceGuard guard(*pstream);
113 guard.add(LockMode::LOCK_MODE_READ, {input});
114 guard.add(LockMode::LOCK_MODE_WRITE, {maxVal, maxLoc, numMax});
115 guard.add(LockMode::LOCK_MODE_NONE, {*op});
116
117 op->submit(pstream->cudaHandle(), input, nullptr, nullptr, nullptr, maxVal, maxLoc, numMax);
118
119 return TupleTensor3(std::move(maxVal), std::move(maxLoc), std::move(numMax));
120}
121
122TupleTensor3 MaxLocTensorInto(Tensor &maxVal, Tensor &maxLoc, Tensor &numMax, Tensor &input,
123 std::optional<Stream> pstream)

Callers 3

MaxLocTensorIntoFunction · 0.85
MaxLocVarShapeIntoFunction · 0.85
MaxLocFunction · 0.85

Calls 3

cudaHandleMethod · 0.80
addMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected