| 200 | |
| 201 | template<class InputContainer> |
| 202 | TupleTensor3 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 | |
| 218 | TupleTensor3 MaxLocTensor(Tensor &input, int maxLocs, std::optional<Stream> pstream) |
| 219 | { |
no test coverage detected