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

Function MinMaxLocInto

python/mod_cvcuda/operators/OpMinMaxLoc.cpp:135–154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

133
134template<class InputContainer>
135TupleTensor6 MinMaxLocInto(Tensor &minVal, Tensor &minLoc, Tensor &numMin, Tensor &maxVal, Tensor &maxLoc,
136 Tensor &numMax, InputContainer &input, std::optional<Stream> pstream)
137{
138 if (!pstream)
139 {
140 pstream = Stream::Current();
141 }
142
143 auto op = CreateOperator<cvcuda::MinMaxLoc>();
144
145 ResourceGuard guard(*pstream);
146 guard.add(LockMode::LOCK_MODE_READ, {input});
147 guard.add(LockMode::LOCK_MODE_WRITE, {minVal, minLoc, numMin, maxVal, maxLoc, numMax});
148 guard.add(LockMode::LOCK_MODE_NONE, {*op});
149
150 op->submit(pstream->cudaHandle(), input, minVal, minLoc, numMin, maxVal, maxLoc, numMax);
151
152 return TupleTensor6(std::move(minVal), std::move(minLoc), std::move(numMin), std::move(maxVal), std::move(maxLoc),
153 std::move(numMax));
154}
155
156TupleTensor6 MinMaxLocTensorInto(Tensor &minVal, Tensor &minLoc, Tensor &numMin, Tensor &maxVal, Tensor &maxLoc,
157 Tensor &numMax, Tensor &input, std::optional<Stream> pstream)

Callers 3

MinMaxLocTensorIntoFunction · 0.85
MinMaxLocVarShapeIntoFunction · 0.85
MinMaxLocFunction · 0.85

Calls 3

cudaHandleMethod · 0.80
addMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected