| 163 | } |
| 164 | |
| 165 | bool 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 | } |
nothing calls this directly
no test coverage detected