| 56 | } |
| 57 | |
| 58 | ImageBatchVarShape ResizeVarShapeInto(ImageBatchVarShape &output, ImageBatchVarShape &input, |
| 59 | NVCVInterpolationType interp, std::optional<Stream> pstream) |
| 60 | { |
| 61 | if (!pstream) |
| 62 | { |
| 63 | pstream = Stream::Current(); |
| 64 | } |
| 65 | |
| 66 | auto resize = CreateOperator<cvcuda::Resize>(); |
| 67 | |
| 68 | ResourceGuard guard(*pstream); |
| 69 | guard.add(LockMode::LOCK_MODE_READ, {input}); |
| 70 | guard.add(LockMode::LOCK_MODE_WRITE, {output}); |
| 71 | guard.add(LockMode::LOCK_MODE_NONE, {*resize}); |
| 72 | |
| 73 | resize->submit(pstream->cudaHandle(), input, output, interp); |
| 74 | |
| 75 | return output; |
| 76 | } |
| 77 | |
| 78 | ImageBatchVarShape ResizeVarShape(ImageBatchVarShape &input, const std::vector<std::tuple<int, int>> &out_size, |
| 79 | NVCVInterpolationType interp, std::optional<Stream> pstream) |
no test coverage detected