| 167 | |
| 168 | template<class InputContainer> |
| 169 | TupleTensor3 MinLoc(InputContainer &input, nvcv::DataType inDataType, int numSamples, int maxLocs, |
| 170 | std::optional<Stream> pstream) |
| 171 | { |
| 172 | // Row align must be 1 in below tensors so last 2 dimensions are packed |
| 173 | |
| 174 | // clang-format off |
| 175 | |
| 176 | Tensor minVal = Tensor::Create({{numSamples, 1}, "NC"}, GetValDataType(inDataType), 1); |
| 177 | Tensor minLoc = Tensor::Create({{numSamples, maxLocs, 2}, "NMC"}, nvcv::TYPE_S32, 1); |
| 178 | Tensor numMin = Tensor::Create({{numSamples, 1}, "NC"}, nvcv::TYPE_S32, 1); |
| 179 | |
| 180 | // clang-format on |
| 181 | |
| 182 | return MinLocInto(minVal, minLoc, numMin, input, pstream); |
| 183 | } |
| 184 | |
| 185 | TupleTensor3 MinLocTensor(Tensor &input, int maxLocs, std::optional<Stream> pstream) |
| 186 | { |
no test coverage detected