| 492 | } |
| 493 | |
| 494 | TensorBatch TensorBatchHQResizeInto(TensorBatch &dst, const TensorBatch &src, std::optional<bool> antialias, |
| 495 | const std::optional<Rois> &roi, std::optional<NVCVInterpolationType> interpolation, |
| 496 | std::optional<NVCVInterpolationType> minInterpolation, |
| 497 | std::optional<NVCVInterpolationType> magInterpolation, |
| 498 | std::optional<Stream> pstream) |
| 499 | { |
| 500 | Stream stream = pstream ? *pstream : Stream::Current(); |
| 501 | auto op = CreatePyOpHQResize(); |
| 502 | |
| 503 | bool hasDepth = src.layout().find('D') >= 0; |
| 504 | int resizeNDim = hasDepth ? 3 : 2; |
| 505 | RoiHelper parsedRoi(roi, resizeNDim); |
| 506 | |
| 507 | NVCVInterpolationType minInterpolationArg, magInterpolationArg; |
| 508 | GetMinMagInterpolation(minInterpolationArg, magInterpolationArg, interpolation, minInterpolation, magInterpolation); |
| 509 | |
| 510 | RunGuard(op, src, dst, stream, |
| 511 | [&]() |
| 512 | { |
| 513 | op->submit(stream.cudaHandle(), src, dst, minInterpolationArg, magInterpolationArg, |
| 514 | antialias.value_or(false), parsedRoi.NonOwningHandle()); |
| 515 | }); |
| 516 | return dst; |
| 517 | } |
| 518 | |
| 519 | TensorBatch TensorBatchHQResize(TensorBatch &src, const std::vector<Shape> &outShape, std::optional<bool> antialias, |
| 520 | const std::optional<Rois> &roi, std::optional<NVCVInterpolationType> interpolation, |
no test coverage detected