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

Function FlipVarShapeInto

python/mod_cvcuda/operators/OpFlip.cpp:60–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60ImageBatchVarShape FlipVarShapeInto(ImageBatchVarShape &output, ImageBatchVarShape &input, Tensor &flipCode,
61 std::optional<Stream> pstream)
62{
63 if (!pstream)
64 {
65 pstream = Stream::Current();
66 }
67
68 auto flip = CreateOperator<cvcuda::Flip>(0);
69
70 ResourceGuard guard(*pstream);
71 guard.add(LockMode::LOCK_MODE_READ, {input, flipCode});
72 guard.add(LockMode::LOCK_MODE_WRITE, {output});
73 guard.add(LockMode::LOCK_MODE_NONE, {*flip});
74
75 flip->submit(pstream->cudaHandle(), input, output, flipCode);
76
77 return output;
78}
79
80ImageBatchVarShape FlipVarShape(ImageBatchVarShape &input, Tensor &flipCode, std::optional<Stream> pstream)
81{

Callers 1

FlipVarShapeFunction · 0.85

Calls 3

cudaHandleMethod · 0.80
addMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected