MutableStride
Function Usage
Obtains the stride reference of a tensor. The stride can be modified.
Prototype
1 | Stride &MutableStride() |
Parameters
None
Returns
Writable tensor stride reference.
For details about the definition of the stride type, see Stride.
Constraints
None
Examples
1 2 3 4 5 | StorageShape sh({1, 2, 3}, {1, 2, 3}); Stride str({6, 3, 1}); TensorV2 t = {sh, {ge::FORMAT_ND, ge::FORMAT_FRACTAL_NZ, {}}, kOnHost, ge::DT_FLOAT, nullptr,nullptr, str, 0}; t.MutableStride() = Stride({6, 1, 1}); auto stride = t.GetStride(); // Stride({6, 1, 1}) |
Parent topic: TensorV2