| 54 | } |
| 55 | |
| 56 | ImageBatchVarShape HistogramEqVarShapeInto(ImageBatchVarShape &output, ImageBatchVarShape &input, |
| 57 | std::optional<Stream> pstream) |
| 58 | { |
| 59 | if (!pstream) |
| 60 | { |
| 61 | pstream = Stream::Current(); |
| 62 | } |
| 63 | |
| 64 | auto op = CreateOperator<cvcuda::HistogramEq>((uint32_t)input.numImages()); |
| 65 | |
| 66 | ResourceGuard guard(*pstream); |
| 67 | guard.add(LockMode::LOCK_MODE_READ, {input}); |
| 68 | guard.add(LockMode::LOCK_MODE_WRITE, {output}); |
| 69 | guard.add(LockMode::LOCK_MODE_READWRITE, {*op}); |
| 70 | |
| 71 | op->submit(pstream->cudaHandle(), input, output); |
| 72 | |
| 73 | return output; |
| 74 | } |
| 75 | |
| 76 | ImageBatchVarShape HistogramEqVarShape(ImageBatchVarShape &input, std::optional<Stream> pstream) |
| 77 | { |
no test coverage detected