| 64 | } |
| 65 | |
| 66 | ImageBatchVarShape VarShapeGaussianInto(ImageBatchVarShape &output, ImageBatchVarShape &input, |
| 67 | const std::tuple<int, int> &max_kernel_size, Tensor &ksize, Tensor &sigma, |
| 68 | NVCVBorderType border, std::optional<Stream> pstream) |
| 69 | { |
| 70 | if (!pstream) |
| 71 | { |
| 72 | pstream = Stream::Current(); |
| 73 | } |
| 74 | |
| 75 | nvcv::Size2D maxKernelSizeArg{std::get<0>(max_kernel_size), std::get<1>(max_kernel_size)}; |
| 76 | |
| 77 | auto gaussian = CreateOperator<cvcuda::Gaussian>(maxKernelSizeArg, input.capacity()); |
| 78 | |
| 79 | ResourceGuard guard(*pstream); |
| 80 | guard.add(LockMode::LOCK_MODE_READ, {input, ksize, sigma}); |
| 81 | guard.add(LockMode::LOCK_MODE_WRITE, {output}); |
| 82 | guard.add(LockMode::LOCK_MODE_READWRITE, {*gaussian}); |
| 83 | |
| 84 | gaussian->submit(pstream->cudaHandle(), input, output, ksize, sigma, border); |
| 85 | |
| 86 | return output; |
| 87 | } |
| 88 | |
| 89 | ImageBatchVarShape VarShapeGaussian(ImageBatchVarShape &input, const std::tuple<int, int> &max_kernel_size, |
| 90 | Tensor &ksize, Tensor &sigma, NVCVBorderType border, std::optional<Stream> pstream) |
no test coverage detected