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

Function extend_parent_shape

src/core/SubTensorInfo.cpp:42–55  ·  view source on GitHub ↗

Extends parent shape depending on subtensor's coordinates and shape * * @param parent_shape Parent shape * @param shape Subtensor shape * @param coords Subtensor coordinates inside parent tensor * * @return Extended parent shape */

Source from the content-addressed store, hash-verified

40 * @return Extended parent shape
41 */
42TensorShape extend_parent_shape(TensorShape parent_shape, TensorShape shape, Coordinates coords)
43{
44 // Extend shape
45 for (unsigned int i = 0; i < TensorShape::num_max_dimensions; ++i)
46 {
47 int dimension_extend = coords[i] + static_cast<int>(shape[i]);
48 if ((dimension_extend > static_cast<int>(parent_shape[i])) && (dimension_extend > 0))
49 {
50 parent_shape.set(i, static_cast<size_t>(dimension_extend));
51 }
52 }
53
54 return parent_shape;
55}
56} // namespace
57
58SubTensorInfo::SubTensorInfo()

Callers 1

SubTensorInfo.cppFile · 0.85

Calls 1

setMethod · 0.45

Tested by

no test coverage detected