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

Method offset_element_in_bytes

src/core/TensorInfo.cpp:432–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

430}
431
432int32_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

Callers 7

draw_detection_rectangleFunction · 0.45
ptr_to_elementMethod · 0.45
printMethod · 0.45
runMethod · 0.45
initMethod · 0.45
prettify_tensorFunction · 0.45

Calls 1

num_dimensionsMethod · 0.45

Tested by

no test coverage detected