| 58 | } |
| 59 | |
| 60 | ImageBatchVarShape 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 | |
| 80 | ImageBatchVarShape FlipVarShape(ImageBatchVarShape &input, Tensor &flipCode, std::optional<Stream> pstream) |
| 81 | { |
no test coverage detected