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

Method extend_padding

src/core/SubTensorInfo.cpp:157–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

155}
156
157bool SubTensorInfo::extend_padding(const PaddingSize &padding)
158{
159 ARM_COMPUTE_ERROR_ON(_lock_paddings);
160 ARM_COMPUTE_ERROR_ON(_parent == nullptr);
161 ARM_COMPUTE_ERROR_ON(!_parent->is_resizable());
162 ARM_COMPUTE_ERROR_ON(_parent->total_size() == 0);
163
164 // Check that you do not extend padding on sub-tensors unless XY shape matches parent tensor
165 if (!_extend_parent && (padding.left || padding.right))
166 {
167 ARM_COMPUTE_ERROR_ON(_parent->tensor_shape().x() != tensor_shape().x());
168 }
169 if (!_extend_parent && (padding.top || padding.bottom))
170 {
171 ARM_COMPUTE_ERROR_ON(_parent->tensor_shape().y() != tensor_shape().y());
172 }
173
174 // Extend parent padding if required
175 return _parent->extend_padding(padding);
176}
177
178int32_t SubTensorInfo::offset_element_in_bytes(const Coordinates &pos) const
179{

Callers

nothing calls this directly

Calls 4

is_resizableMethod · 0.45
total_sizeMethod · 0.45
xMethod · 0.45
yMethod · 0.45

Tested by

no test coverage detected