| 94 | } |
| 95 | |
| 96 | Tensor StackInto(Tensor &output, std::vector<Tensor> &tensorList, std::optional<Stream> pstream) |
| 97 | { |
| 98 | int64_t outputShape[4] = {}; // NCHW/NHWC |
| 99 | nvcv::TensorLayout layout = nvcv::TENSOR_CHW; |
| 100 | nvcv::DataType dtype; |
| 101 | |
| 102 | checkTensorList(tensorList, outputShape, layout, dtype); |
| 103 | |
| 104 | if (output.shape().layout() != nvcv::TENSOR_NCHW && output.shape().layout() != nvcv::TENSOR_NHWC) |
| 105 | throw std::runtime_error("Invalid output tensor shape"); |
| 106 | |
| 107 | if (output.shape()[0] != outputShape[0]) |
| 108 | throw std::runtime_error("Invalid output tensor shape"); |
| 109 | |
| 110 | StackIntoInternal(output, tensorList, pstream, outputShape[0]); |
| 111 | return std::move(output); |
| 112 | } |
| 113 | |
| 114 | Tensor Stack(std::vector<Tensor> &tensorList, std::optional<Stream> pstream) |
| 115 | { |
nothing calls this directly
no test coverage detected