GetStride
Function Usage
Obtains the stride of a tensor.
Prototype
1 | const Stride &GetStride() const |
Parameters
None
Returns
Read-only tensor stride reference. For details about the definition of the stride type, see Stride.
Constraints
None
Examples
1 2 3 4 | 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}; auto stride = t.GetStride(); // str |
Parent topic: TensorV2