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

Function CvtColorVarShapeInto

python/mod_cvcuda/operators/OpCvtColor.cpp:77–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77ImageBatchVarShape CvtColorVarShapeInto(ImageBatchVarShape &output, ImageBatchVarShape &input,
78 NVCVColorConversionCode code, std::optional<Stream> pstream)
79{
80 if (!pstream)
81 {
82 pstream = Stream::Current();
83 }
84
85 auto cvtColor = CreateOperator<cvcuda::CvtColor>();
86
87 ResourceGuard guard(*pstream);
88 guard.add(LockMode::LOCK_MODE_READWRITE, {input});
89 guard.add(LockMode::LOCK_MODE_READWRITE, {output});
90 guard.add(LockMode::LOCK_MODE_NONE, {*cvtColor});
91
92 cvtColor->submit(pstream->cudaHandle(), input, output, code);
93
94 return output;
95}
96
97ImageBatchVarShape CvtColorVarShape(ImageBatchVarShape &input, NVCVColorConversionCode code,
98 std::optional<Stream> pstream)

Callers 1

CvtColorVarShapeFunction · 0.85

Calls 3

cudaHandleMethod · 0.80
addMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected