| 407 | } |
| 408 | |
| 409 | Tensor TensorHQResizeInto(Tensor &dst, Tensor &src, std::optional<bool> antialias, std::optional<Roi> maybeRoi, |
| 410 | std::optional<NVCVInterpolationType> interpolation, |
| 411 | std::optional<NVCVInterpolationType> minInterpolation, |
| 412 | std::optional<NVCVInterpolationType> magInterpolation, std::optional<Stream> pstream) |
| 413 | { |
| 414 | Stream stream = pstream ? *pstream : Stream::Current(); |
| 415 | auto op = CreatePyOpHQResize(); |
| 416 | |
| 417 | bool hasDepth = src.layout().find('D') >= 0; |
| 418 | int resizeNDim = hasDepth ? 3 : 2; |
| 419 | RoiHelper parsedRoi(maybeRoi, resizeNDim); |
| 420 | const HQResizeRoiF *roi = parsedRoi.NonOwningHandle().roi; |
| 421 | |
| 422 | NVCVInterpolationType minInterpolationArg, magInterpolationArg; |
| 423 | GetMinMagInterpolation(minInterpolationArg, magInterpolationArg, interpolation, minInterpolation, magInterpolation); |
| 424 | |
| 425 | RunGuard(op, src, dst, stream, |
| 426 | [&]() |
| 427 | { |
| 428 | op->submit(stream.cudaHandle(), src, dst, minInterpolationArg, magInterpolationArg, |
| 429 | antialias.value_or(false), roi); |
| 430 | }); |
| 431 | return dst; |
| 432 | } |
| 433 | |
| 434 | Tensor TensorHQResize(Tensor &src, const Shape &outShape, std::optional<bool> antialias, std::optional<Roi> roi, |
| 435 | std::optional<NVCVInterpolationType> interpolation, |
no test coverage detected