MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / VarShapeGaussianInto

Function VarShapeGaussianInto

python/mod_cvcuda/operators/OpGaussian.cpp:66–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66ImageBatchVarShape 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
89ImageBatchVarShape VarShapeGaussian(ImageBatchVarShape &input, const std::tuple<int, int> &max_kernel_size,
90 Tensor &ksize, Tensor &sigma, NVCVBorderType border, std::optional<Stream> pstream)

Callers 1

VarShapeGaussianFunction · 0.85

Calls 4

cudaHandleMethod · 0.80
capacityMethod · 0.45
addMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected