| 67 | |
| 68 | template<class InputContainer> |
| 69 | TupleTensor3 MinLocInto(Tensor &minVal, Tensor &minLoc, Tensor &numMin, InputContainer &input, |
| 70 | std::optional<Stream> pstream) |
| 71 | { |
| 72 | if (!pstream) |
| 73 | { |
| 74 | pstream = Stream::Current(); |
| 75 | } |
| 76 | |
| 77 | auto op = CreateOperator<cvcuda::MinMaxLoc>(); |
| 78 | |
| 79 | ResourceGuard guard(*pstream); |
| 80 | guard.add(LockMode::LOCK_MODE_READ, {input}); |
| 81 | guard.add(LockMode::LOCK_MODE_WRITE, {minVal, minLoc, numMin}); |
| 82 | guard.add(LockMode::LOCK_MODE_NONE, {*op}); |
| 83 | |
| 84 | op->submit(pstream->cudaHandle(), input, minVal, minLoc, numMin, nullptr, nullptr, nullptr); |
| 85 | |
| 86 | return TupleTensor3(std::move(minVal), std::move(minLoc), std::move(numMin)); |
| 87 | } |
| 88 | |
| 89 | TupleTensor3 MinLocTensorInto(Tensor &minVal, Tensor &minLoc, Tensor &numMin, Tensor &input, |
| 90 | std::optional<Stream> pstream) |
no test coverage detected