| 28 | |
| 29 | namespace { |
| 30 | Tensor HistogramEqInto(Tensor &output, Tensor &input, std::optional<Stream> pstream) |
| 31 | { |
| 32 | if (!pstream) |
| 33 | { |
| 34 | pstream = Stream::Current(); |
| 35 | } |
| 36 | nvcv::TensorShape shape = input.shape(); |
| 37 | auto op = CreateOperator<cvcuda::HistogramEq>((uint32_t)shape[0]); |
| 38 | |
| 39 | ResourceGuard guard(*pstream); |
| 40 | guard.add(LockMode::LOCK_MODE_READ, {input}); |
| 41 | guard.add(LockMode::LOCK_MODE_WRITE, {output}); |
| 42 | guard.add(LockMode::LOCK_MODE_READWRITE, {*op}); |
| 43 | |
| 44 | op->submit(pstream->cudaHandle(), input, output); |
| 45 | |
| 46 | return std::move(output); |
| 47 | } |
| 48 | |
| 49 | Tensor HistogramEq(Tensor &input, nvcv::DataType dtype, std::optional<Stream> pstream) |
| 50 | { |
no test coverage detected