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

Function VarShapeNormalizeInto

python/mod_cvcuda/operators/OpNormalize.cpp:74–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

72}
73
74ImageBatchVarShape VarShapeNormalizeInto(ImageBatchVarShape &output, ImageBatchVarShape &input, Tensor &base,
75 Tensor &scale, std::optional<uint32_t> flags, float globalScale,
76 float globalShift, float epsilon, std::optional<Stream> pstream)
77{
78 if (!pstream)
79 {
80 pstream = Stream::Current();
81 }
82
83 if (!flags)
84 {
85 flags = 0;
86 }
87
88 auto normalize = CreateOperator<cvcuda::Normalize>();
89
90 ResourceGuard guard(*pstream);
91 guard.add(LockMode::LOCK_MODE_READ, {input, base, scale});
92 guard.add(LockMode::LOCK_MODE_WRITE, {output});
93 guard.add(LockMode::LOCK_MODE_NONE, {*normalize});
94
95 normalize->submit(pstream->cudaHandle(), input, base, scale, output, globalScale, globalShift, epsilon, *flags);
96
97 return output;
98}
99
100ImageBatchVarShape VarShapeNormalize(ImageBatchVarShape &input, Tensor &base, Tensor &scale,
101 std::optional<uint32_t> flags, float globalScale, float globalShift, float epsilon,

Callers 1

VarShapeNormalizeFunction · 0.85

Calls 3

cudaHandleMethod · 0.80
addMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected