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

Function AverageBlurVarShapeInto

python/mod_cvcuda/operators/OpAverageBlur.cpp:65–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 1

AverageBlurVarShapeFunction · 0.85

Calls 4

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

Tested by

no test coverage detected