legate.core.LogicalStore.promote#
- LogicalStore.promote(self, int32_t extra_dim, size_t dim_size) LogicalStore #
Adds an extra dimension to the store. Value of
extra_dim
decides where a new dimension should be added, and each dimension i, where i >=extra_dim
, is mapped to dimension i+1 in a returned store. A returned store provides a view to the input store where the values are broadcasted along the new dimension.For example, for a 1D store
A
contains[1, 2, 3]
,A.promote(0, 2)
yields a store equivalent to:[[1, 2, 3], [1, 2, 3]]
whereas
A.promote(1, 2)
yields:[[1, 1], [2, 2], [3, 3]]
- Parameters:
- Returns:
A new store with an extra dimension
- Return type:
LogicalStore
- Raises:
ValueError – If
extra_dim
is not a valid dimension name