MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / auto_padding

Method auto_padding

src/core/TensorInfo.cpp:234–245  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234bool TensorInfo::auto_padding()
235{
236 ARM_COMPUTE_ERROR_ON(!_is_resizable);
237
238 // Some kernels compute 32 elements at the time, worst case scenario they
239 // will read 32 values after the last element
240 const size_t extra_pad_x = _tensor_shape.num_dimensions() < 1 ? 0 : 32;
241 const size_t pad_x = _tensor_shape.num_dimensions() < 1 ? 0 : 4;
242 const size_t pad_y = _tensor_shape.num_dimensions() < 2 ? 0 : 4;
243
244 return extend_padding(PaddingSize(pad_y, pad_x + extra_pad_x, pad_y, pad_x));
245}
246
247std::tuple<Strides, size_t, size_t> TensorInfo::calculate_padding_requirements(const PaddingSize &padding)
248{

Callers 2

TensorInfo.cppFile · 0.45

Calls 1

num_dimensionsMethod · 0.45

Tested by

no test coverage detected