| 28 | |
| 29 | namespace { |
| 30 | Tensor AdvCvtColorInto(Tensor &output, Tensor &input, NVCVColorConversionCode code, NVCVColorSpec spec, |
| 31 | std::optional<Stream> pstream) |
| 32 | { |
| 33 | if (!pstream) |
| 34 | { |
| 35 | pstream = Stream::Current(); |
| 36 | } |
| 37 | |
| 38 | auto op = CreateOperator<cvcuda::AdvCvtColor>(); |
| 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_NONE, {*op}); |
| 43 | op->submit(pstream->cudaHandle(), input, output, code, spec); |
| 44 | return std::move(output); |
| 45 | } |
| 46 | |
| 47 | Tensor AdvCvtColor(Tensor &input, NVCVColorConversionCode code, NVCVColorSpec spec, std::optional<Stream> pstream) |
| 48 | { |
no test coverage detected