GetOffset

Function Usage

Obtains the offset of a tensor.

Prototype

1
int64_t GetOffset() const

Parameters

None

Returns

Offset of a tensor.

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, 10};
auto offset = t.GetOffset(); // 10