MCPcopy Create free account
hub / github.com/CVCUDA/CV-CUDA / RemapInto

Function RemapInto

python/mod_cvcuda/operators/OpRemap.cpp:35–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33// Tensor into -----------------------------------------------------------------
34
35Tensor 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
59Tensor Remap(Tensor &src, Tensor &map, NVCVInterpolationType srcInterp, NVCVInterpolationType mapInterp,
60 NVCVRemapMapValueType mapValueType, bool alignCorners, NVCVBorderType borderMode,

Callers 1

RemapFunction · 0.85

Calls 4

GetFloat4FromPyArrayFunction · 0.85
cudaHandleMethod · 0.80
addMethod · 0.45
submitMethod · 0.45

Tested by

no test coverage detected