3 writes to _flattenedLength
System.Numerics.Tensors (3)
System\Numerics\Tensors\netcore\Tensor.cs (3)
44
_flattenedLength
= 0;
61
_flattenedLength
= 0;
75
_flattenedLength
= TensorSpanHelpers.CalculateTotalLength(_lengths);
8 references to _flattenedLength
System.Numerics.Tensors (8)
System\Numerics\Tensors\netcore\Tensor.cs (4)
59
if (
_flattenedLength
!= 0)
76
_strides = strides.IsEmpty ? TensorSpanHelpers.CalculateStrides(_lengths,
_flattenedLength
) : strides.ToArray();
174
public nint FlattenedLength =>
_flattenedLength
;
430
public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_values), _memoryOffset), _lengths, _strides,
_flattenedLength
);
System\Numerics\Tensors\netcore\TensorExtensions.cs (4)
2637
T[] values = tensor.IsPinned ? GC.AllocateArray<T>((int)tensor.
_flattenedLength
) : (new T[tensor.
_flattenedLength
]);
2690
for (int i = 0; i < tensor.
_flattenedLength
; i++)
2732
nint tempTotal = tensor.
_flattenedLength
;