3 writes to _strides
System.Numerics.Tensors (3)
System\Numerics\Tensors\netcore\Tensor.cs (3)
47
_strides
= [];
63
_strides
= [];
70
_strides
= strides.IsEmpty ? TensorSpanHelpers.CalculateStrides(_lengths, _flattenedLength) : strides.ToArray();
8 references to _strides
System.Numerics.Tensors (8)
System\Numerics\Tensors\netcore\Tensor.cs (8)
71
TensorSpanHelpers.ValidateStrides(
_strides
, _lengths);
72
nint maxElements = TensorSpanHelpers.ComputeMaxLinearIndex(
_strides
, _lengths);
187
public ReadOnlySpan<nint> Strides =>
_strides
;
193
ReadOnlySpan<nint> IReadOnlyTensor<Tensor<T>, T>.Strides =>
_strides
;
379
public static implicit operator TensorSpan<T>(Tensor<T> value) => new TensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(value._values), value._lengths, value.
_strides
, value._flattenedLength);
384
public static implicit operator ReadOnlyTensorSpan<T>(Tensor<T> value) => new ReadOnlyTensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(value._values), value._lengths, value.
_strides
, value.FlattenedLength);
390
public TensorSpan<T> AsTensorSpan() => new TensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(_values), _lengths,
_strides
, _flattenedLength);
417
public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(_values), _lengths,
_strides
, _flattenedLength);