MCPcopy Create free account
hub / github.com/NVIDIA/DALI / Resize

Method Resize

dali/c_api_2/data_objects.h:421–435  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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,

Callers

nothing calls this directly

Calls 5

ValidateFunction · 0.85
ValidateShapeFunction · 0.85
TensorLayoutClass · 0.50
ResizeMethod · 0.45
SetLayoutMethod · 0.45

Tested by

no test coverage detected