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

Function MaxLoc

python/mod_cvcuda/operators/OpMinMaxLoc.cpp:202–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200
201template<class InputContainer>
202TupleTensor3 MaxLoc(InputContainer &input, nvcv::DataType inDataType, int numSamples, int maxLocs,
203 std::optional<Stream> pstream)
204{
205 // Row align must be 1 in below tensors so last 2 dimensions are packed
206
207 // clang-format off
208
209 Tensor maxVal = Tensor::Create({{numSamples, 1}, "NC"}, GetValDataType(inDataType), 1);
210 Tensor maxLoc = Tensor::Create({{numSamples, maxLocs, 2}, "NMC"}, nvcv::TYPE_S32, 1);
211 Tensor numMax = Tensor::Create({{numSamples, 1}, "NC"}, nvcv::TYPE_S32, 1);
212
213 // clang-format on
214
215 return MaxLocInto(maxVal, maxLoc, numMax, input, pstream);
216}
217
218TupleTensor3 MaxLocTensor(Tensor &input, int maxLocs, std::optional<Stream> pstream)
219{

Callers 2

MaxLocTensorFunction · 0.85
MaxLocVarShapeFunction · 0.85

Calls 2

MaxLocIntoFunction · 0.85
GetValDataTypeFunction · 0.70

Tested by

no test coverage detected