| 65 | } |
| 66 | |
| 67 | Tensor 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 | |
| 80 | Tensor VarShapeCopyMakeBorderStackInto(Tensor &output, ImageBatchVarShape &input, NVCVBorderType borderMode, |
| 81 | const std::vector<float> &borderValue, Tensor &top, Tensor &left, |
nothing calls this directly
no test coverage detected