| 419 | explicit TensorListWrapper(std::shared_ptr<TensorList<Backend>> tl) : tl_(std::move(tl)) {} |
| 420 | |
| 421 | void Resize( |
| 422 | int num_samples, |
| 423 | int ndim, |
| 424 | const int64_t *shapes, |
| 425 | daliDataType_t dtype, |
| 426 | const char *layout) override { |
| 427 | Validate(dtype); |
| 428 | ValidateShape(num_samples, ndim, shapes); |
| 429 | if (layout) |
| 430 | Validate(TensorLayout(layout), ndim); |
| 431 | std::vector<int64_t> shape_data(shapes, shapes + ndim * num_samples); |
| 432 | tl_->Resize(TensorListShape<>(std::move(shape_data), num_samples, ndim), dtype); |
| 433 | if (layout) |
| 434 | tl_->SetLayout(layout); |
| 435 | } |
| 436 | |
| 437 | void AttachBuffer( |
| 438 | int num_samples, |
nothing calls this directly
no test coverage detected