| 430 | } |
| 431 | |
| 432 | int32_t TensorInfo::offset_element_in_bytes(const Coordinates &pos) const |
| 433 | { |
| 434 | ARM_COMPUTE_ERROR_ON_COORDINATES_DIMENSIONS_GTE(pos, _tensor_shape.num_dimensions()); |
| 435 | |
| 436 | int32_t offset = _offset_first_element_in_bytes; |
| 437 | |
| 438 | for (size_t i = 0; i < _tensor_shape.num_dimensions(); ++i) |
| 439 | { |
| 440 | offset += pos[i] * _strides_in_bytes[i]; |
| 441 | } |
| 442 | |
| 443 | return offset; |
| 444 | } |
| 445 | } // namespace arm_compute |
no test coverage detected