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

Function CopyMakeBorder

python/mod_cvcuda/operators/OpCopyMakeBorder.cpp:67–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

65}
66
67Tensor CopyMakeBorder(Tensor &input, NVCVBorderType borderMode, const std::vector<float> &borderValue, int top,
68 int bottom, int left, int right, std::optional<Stream> pstream)
69{
70 Shape out_shape = CreateShape(input.shape());
71 int cdim = out_shape.size() - 1;
72 out_shape[cdim - 2] = out_shape[cdim - 2].cast<int64_t>() + top + bottom;
73 out_shape[cdim - 1] = out_shape[cdim - 1].cast<int64_t>() + left + right;
74
75 Tensor output = Tensor::Create(out_shape, input.dtype(), input.layout());
76
77 return CopyMakeBorderInto(output, input, borderMode, borderValue, top, left, pstream);
78}
79
80Tensor VarShapeCopyMakeBorderStackInto(Tensor &output, ImageBatchVarShape &input, NVCVBorderType borderMode,
81 const std::vector<float> &borderValue, Tensor &top, Tensor &left,

Callers

nothing calls this directly

Calls 6

CreateShapeFunction · 0.85
CopyMakeBorderIntoFunction · 0.85
shapeMethod · 0.45
sizeMethod · 0.45
dtypeMethod · 0.45
layoutMethod · 0.45

Tested by

no test coverage detected