| 233 | |
| 234 | template<class InputContainer> |
| 235 | TupleTensor6 MinMaxLoc(InputContainer &input, nvcv::DataType inDataType, int numSamples, int maxLocs, |
| 236 | std::optional<Stream> pstream) |
| 237 | { |
| 238 | // Row align must be 1 in below tensors so last 2 dimensions are packed |
| 239 | |
| 240 | // clang-format off |
| 241 | |
| 242 | Tensor minVal = Tensor::Create({{numSamples, 1}, "NC"}, GetValDataType(inDataType), 1); |
| 243 | Tensor minLoc = Tensor::Create({{numSamples, maxLocs, 2}, "NMC"}, nvcv::TYPE_S32, 1); |
| 244 | Tensor numMin = Tensor::Create({{numSamples, 1}, "NC"}, nvcv::TYPE_S32, 1); |
| 245 | Tensor maxVal = Tensor::Create({{numSamples, 1}, "NC"}, GetValDataType(inDataType), 1); |
| 246 | Tensor maxLoc = Tensor::Create({{numSamples, maxLocs, 2}, "NMC"}, nvcv::TYPE_S32, 1); |
| 247 | Tensor numMax = Tensor::Create({{numSamples, 1}, "NC"}, nvcv::TYPE_S32, 1); |
| 248 | |
| 249 | // clang-format on |
| 250 | |
| 251 | return MinMaxLocInto(minVal, minLoc, numMin, maxVal, maxLoc, numMax, input, pstream); |
| 252 | } |
| 253 | |
| 254 | TupleTensor6 MinMaxLocTensor(Tensor &input, int maxLocs, std::optional<Stream> pstream) |
| 255 | { |
no test coverage detected