44 writes to _reference
System.Numerics.Tensors (44)
System\Numerics\Tensors\netcore\Tensor.cs (9)
244
Span<T> dstSpan = MemoryMarshal.CreateSpan(ref destination.
_reference
, (int)totalLength);
462
Span<T> span = MemoryMarshal.CreateSpan<T>(ref destination.
_reference
, (int)destination._shape.LinearLength);
485
Span<T> span = MemoryMarshal.CreateSpan<T>(ref destination.
_reference
, (int)destination._shape.LinearLength);
1576
TensorSpan<T> output = new TensorSpan<T>(ref tensor.
_reference
, tensor._shape.LinearLength, newLengths, strides);
1668
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref tensor.AsTensorSpan().
_reference
, tensor._start), (int)tensor._values.Length - tensor._start);
1669
Span<T> ospan = MemoryMarshal.CreateSpan(ref output.AsTensorSpan().
_reference
, (int)output.FlattenedLength);
1709
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination.
_reference
, (int)destination._shape.LinearLength);
2055
TensorSpan<T> output = new TensorSpan<T>(ref tensor.
_reference
, tensor._shape.LinearLength, lengths[..newRank], strides[..newRank], strideOrder[..newRank]);
2496
TensorSpan<T> output = new TensorSpan<T>(ref tensor.
_reference
, tensor._shape.LinearLength, newLengths, newStrides);
System\Numerics\Tensors\netcore\TensorOperation.cs (7)
22
ref Unsafe.Add(ref x.
_reference
, linearOffset)
98
ref Unsafe.Add(ref destination.
_reference
, linearOffset),
119
ref Unsafe.Add(ref destination.
_reference
, destinationLinearOffset)
147
ref Unsafe.Add(ref destination.
_reference
, destinationLinearOffset)
210
ref Unsafe.Add(ref destination.
_reference
, destinationLinearOffset)
269
ref Unsafe.Add(ref destination.
_reference
, destinationLinearOffset)
291
ref Unsafe.Add(ref destination.
_reference
, destinationLinearOffset)
System\Numerics\Tensors\netcore\TensorSpan.cs (28)
39
_reference
= ref (array is not null)
51
_reference
= ref (array is not null)
63
_reference
= ref (array is not null)
75
_reference
= ref (array is not null)
85
_reference
= ref reference;
93
_reference
= ref reference;
101
_reference
= ref reference;
111
_reference
= ref (array is not null)
123
_reference
= ref (array is not null)
133
_reference
= ref Unsafe.AsRef<T>(data);
141
_reference
= ref Unsafe.AsRef<T>(data);
149
_reference
= ref Unsafe.AsRef<T>(data);
155
_reference
= ref data;
161
_reference
= ref data;
167
_reference
= ref data;
173
_reference
= ref data;
178
_reference
= ref reference;
185
get => ref Unsafe.Add(ref
_reference
, _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNInt, nint>(indexes));
191
get => ref Unsafe.Add(ref
_reference
, _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(indexes));
226
=> Unsafe.AreSame(ref left.
_reference
, ref right.
_reference
)
241
new ReadOnlyTensorSpan<T>(ref tensor.
_reference
, tensor._shape);
244
public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref
_reference
, in _shape);
300
if (_shape.FlattenedLength != 0) ret = ref
_reference
;
309
ref Unsafe.Add(ref
_reference
, linearOffset),
319
ref Unsafe.Add(ref
_reference
, linearOffset),
329
ref Unsafe.Add(ref
_reference
, linearOffset),
363
public readonly ref T Current => ref Unsafe.Add(ref _span.
_reference
, _linearOffset);