| 145 | } |
| 146 | |
| 147 | ImageBatchVarShape InpaintVarShapeInto(ImageBatchVarShape &output, ImageBatchVarShape &input, ImageBatchVarShape &masks, |
| 148 | double inpaintRadius, std::optional<Stream> pstream) |
| 149 | { |
| 150 | if (!pstream) |
| 151 | { |
| 152 | pstream = Stream::Current(); |
| 153 | } |
| 154 | nvcv::Size2D maxShape = input.maxSize(); |
| 155 | auto inpaint = CreateOperatorEx<PyOpInpaint>(input.numImages(), maxShape); |
| 156 | |
| 157 | ResourceGuard guard(*pstream); |
| 158 | guard.add(LockMode::LOCK_MODE_READ, {input, masks}); |
| 159 | guard.add(LockMode::LOCK_MODE_WRITE, {output}); |
| 160 | guard.add(LockMode::LOCK_MODE_READWRITE, {*inpaint}); |
| 161 | |
| 162 | inpaint->submit(pstream->cudaHandle(), input, masks, output, inpaintRadius); |
| 163 | |
| 164 | return output; |
| 165 | } |
| 166 | |
| 167 | ImageBatchVarShape InpaintVarShape(ImageBatchVarShape &input, ImageBatchVarShape &masks, double inpaintRadius, |
| 168 | std::optional<Stream> pstream) |
no test coverage detected