| 28 | |
| 29 | namespace { |
| 30 | Tensor PadAndStackInto(Tensor &output, ImageBatchVarShape &input, Tensor &top, Tensor &left, NVCVBorderType border, |
| 31 | float borderValue, std::optional<Stream> pstream) |
| 32 | { |
| 33 | if (!pstream) |
| 34 | { |
| 35 | pstream = Stream::Current(); |
| 36 | } |
| 37 | |
| 38 | auto padstack = CreateOperator<cvcuda::PadAndStack>(); |
| 39 | |
| 40 | ResourceGuard guard(*pstream); |
| 41 | guard.add(LockMode::LOCK_MODE_READ, {input, top, left}); |
| 42 | guard.add(LockMode::LOCK_MODE_WRITE, {output}); |
| 43 | guard.add(LockMode::LOCK_MODE_NONE, {*padstack}); |
| 44 | |
| 45 | padstack->submit(pstream->cudaHandle(), input, output, top, left, border, borderValue); |
| 46 | |
| 47 | return std::move(output); |
| 48 | } |
| 49 | |
| 50 | Tensor PadAndStack(ImageBatchVarShape &input, Tensor &top, Tensor &left, NVCVBorderType border, float borderValue, |
| 51 | std::optional<Stream> pstream) |
no test coverage detected