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

Method update_padding_if_needed

src/core/AccessWindowStatic.cpp:165–185  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163}
164
165bool AccessWindowStatic::update_padding_if_needed(const Window &window)
166{
167 ARM_COMPUTE_UNUSED(window);
168
169 // Only update the padding if the tensor allows it
170 if (_info == nullptr || !_info->is_resizable())
171 {
172 return false;
173 }
174
175 const TensorShape &shape = _info->tensor_shape();
176
177 PaddingSize padding;
178 padding.left = std::max(0, -_start_x);
179 padding.right = std::max<int>(0, _end_x - shape[0]);
180 padding.top = std::max(0, -_start_y);
181 padding.bottom = std::max<int>(0, _end_y - shape[1]);
182
183 // Update strides in tensor info
184 return _info->extend_padding(padding);
185}

Callers

nothing calls this directly

Calls 2

is_resizableMethod · 0.45
extend_paddingMethod · 0.45

Tested by

no test coverage detected