dpctl.tensor.usm_ndarray._byte_bounds¶
- usm_ndarray._byte_bounds¶
Returns a 2-tuple with pointers to the end-points of the array
- Example:
from dpctl import tensor x = tensor.ones((3, 10, 7)) y = tensor.flip(x[:, 1::2], axis=1) beg_p, end_p = y._byte_bounds # Bytes taken to store this array bytes_extent = end_p - beg_p # C-contiguous copy is more compact yc = tensor.copy(y, order="C") beg_pc, end_pc = yc._byte_bounds assert bytes_extent < end_pc - beg_pc