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

Method Resize

dali/c_api_2/data_objects.h:233–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231 explicit TensorWrapper(std::shared_ptr<Tensor<Backend>> t) : t_(std::move(t)) {}
232
233 void Resize(
234 int ndim,
235 const int64_t *shape,
236 daliDataType_t dtype,
237 const char *layout) override {
238 ValidateShape(ndim, shape);
239 Validate(dtype);
240 if (layout)
241 Validate(TensorLayout(layout), ndim);
242 t_->Resize(TensorShape<>(make_cspan(shape, ndim)), dtype);
243 if (layout)
244 t_->SetLayout(layout);
245 }
246
247 void AttachBuffer(
248 int ndim,

Callers 8

FillRandomTensorListFunction · 0.45
daliTensorResizeFunction · 0.45
daliTensorListResizeFunction · 0.45
ResizeMethod · 0.45
TESTFunction · 0.45
FillTensorListFunction · 0.45
TESTFunction · 0.45
TYPED_TESTFunction · 0.45

Calls 5

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

Tested by 5

FillRandomTensorListFunction · 0.36
TESTFunction · 0.36
FillTensorListFunction · 0.36
TESTFunction · 0.36
TYPED_TESTFunction · 0.36