| 33 | |
| 34 | namespace { |
| 35 | Tensor LaplacianInto(Tensor &output, Tensor &input, const int &ksize, const float &scale, NVCVBorderType border, |
| 36 | std::optional<Stream> pstream) |
| 37 | { |
| 38 | if (!pstream) |
| 39 | { |
| 40 | pstream = Stream::Current(); |
| 41 | } |
| 42 | |
| 43 | auto laplacian = CreateOperator<cvcuda::Laplacian>(); |
| 44 | |
| 45 | ResourceGuard guard(*pstream); |
| 46 | guard.add(LockMode::LOCK_MODE_READ, {input}); |
| 47 | guard.add(LockMode::LOCK_MODE_WRITE, {output}); |
| 48 | guard.add(LockMode::LOCK_MODE_NONE, {*laplacian}); |
| 49 | |
| 50 | laplacian->submit(pstream->cudaHandle(), input, output, ksize, scale, border); |
| 51 | |
| 52 | return output; |
| 53 | } |
| 54 | |
| 55 | Tensor Laplacian(Tensor &input, const int &ksize, const float &scale, NVCVBorderType border, |
| 56 | std::optional<Stream> pstream) |
no test coverage detected