| 33 | // Tensor into ----------------------------------------------------------------- |
| 34 | |
| 35 | Tensor RemapInto(Tensor &dst, Tensor &src, Tensor &map, NVCVInterpolationType srcInterp, |
| 36 | NVCVInterpolationType mapInterp, NVCVRemapMapValueType mapValueType, bool alignCorners, |
| 37 | NVCVBorderType borderMode, const pyarray &borderValue, std::optional<Stream> pstream) |
| 38 | { |
| 39 | if (!pstream) |
| 40 | { |
| 41 | pstream = Stream::Current(); |
| 42 | } |
| 43 | |
| 44 | float4 bValue = GetFloat4FromPyArray(borderValue); |
| 45 | |
| 46 | auto op = CreateOperator<cvcuda::Remap>(); |
| 47 | |
| 48 | ResourceGuard guard(*pstream); |
| 49 | guard.add(LockMode::LOCK_MODE_READ, {src, map}); |
| 50 | guard.add(LockMode::LOCK_MODE_WRITE, {dst}); |
| 51 | guard.add(LockMode::LOCK_MODE_NONE, {*op}); |
| 52 | |
| 53 | op->submit(pstream->cudaHandle(), src, dst, map, srcInterp, mapInterp, mapValueType, alignCorners, borderMode, |
| 54 | bValue); |
| 55 | |
| 56 | return std::move(dst); |
| 57 | } |
| 58 | |
| 59 | Tensor Remap(Tensor &src, Tensor &map, NVCVInterpolationType srcInterp, NVCVInterpolationType mapInterp, |
| 60 | NVCVRemapMapValueType mapValueType, bool alignCorners, NVCVBorderType borderMode, |
no test coverage detected