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

Function VarShapePillowResizeInto

python/mod_cvcuda/operators/OpPillowResize.cpp:214–233  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

212}
213
214ImageBatchVarShape VarShapePillowResizeInto(ImageBatchVarShape &output, ImageBatchVarShape &input,
215 NVCVInterpolationType interpolation, std::optional<Stream> pstream)
216{
217 if (!pstream)
218 {
219 pstream = Stream::Current();
220 }
221
222 // The same PyOpPillowResize class and CreateOperatorEx function can be used regardless of Tensors or VarShape.
223 auto pillowResize = CreateOperatorEx<PyOpPillowResize>();
224
225 ResourceGuard guard(*pstream);
226 guard.add(LockMode::LOCK_MODE_READ, {input});
227 guard.add(LockMode::LOCK_MODE_WRITE, {output});
228 guard.add(LockMode::LOCK_MODE_READWRITE, {*pillowResize});
229
230 pillowResize->submit(pstream->cudaHandle(), input, output, interpolation);
231
232 return output;
233}
234
235ImageBatchVarShape VarShapePillowResize(ImageBatchVarShape &input, const std::vector<std::tuple<int, int>> &outSizes,
236 NVCVInterpolationType interpolation, std::optional<Stream> pstream)

Callers 1

VarShapePillowResizeFunction · 0.85

Calls 3

cudaHandleMethod · 0.80
addMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected