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

Function VarShapeRemapInto

python/mod_cvcuda/operators/OpRemap.cpp:98–121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

96// VarShape into ---------------------------------------------------------------
97
98ImageBatchVarShape VarShapeRemapInto(ImageBatchVarShape &dst, ImageBatchVarShape &src, Tensor &map,
99 NVCVInterpolationType srcInterp, NVCVInterpolationType mapInterp,
100 NVCVRemapMapValueType mapValueType, bool alignCorners, NVCVBorderType borderMode,
101 const pyarray &borderValue, std::optional<Stream> pstream)
102{
103 if (!pstream)
104 {
105 pstream = Stream::Current();
106 }
107
108 float4 bValue = GetFloat4FromPyArray(borderValue);
109
110 auto op = CreateOperator<cvcuda::Remap>();
111
112 ResourceGuard guard(*pstream);
113 guard.add(LockMode::LOCK_MODE_READ, {src, map});
114 guard.add(LockMode::LOCK_MODE_WRITE, {dst});
115 guard.add(LockMode::LOCK_MODE_NONE, {*op});
116
117 op->submit(pstream->cudaHandle(), src, dst, map, srcInterp, mapInterp, mapValueType, alignCorners, borderMode,
118 bValue);
119
120 return std::move(dst);
121}
122
123ImageBatchVarShape VarShapeRemap(ImageBatchVarShape &src, Tensor &map, NVCVInterpolationType srcInterp,
124 NVCVInterpolationType mapInterp, NVCVRemapMapValueType mapValueType, bool alignCorners,

Callers 1

VarShapeRemapFunction · 0.85

Calls 4

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

Tested by

no test coverage detected