45 writes to _reference
System.Numerics.Tensors (45)
System\Numerics\Tensors\netcore\Tensor.cs (9)
244
Span<T> dstSpan = MemoryMarshal.CreateSpan(ref destination.
_reference
, (int)totalLength);
445
Span<T> span = MemoryMarshal.CreateSpan<T>(ref destination.
_reference
, (int)destination._shape.LinearLength);
468
Span<T> span = MemoryMarshal.CreateSpan<T>(ref destination.
_reference
, (int)destination._shape.LinearLength);
1559
TensorSpan<T> output = new TensorSpan<T>(ref tensor.
_reference
, tensor._shape.LinearLength, newLengths, strides);
1651
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref tensor.AsTensorSpan().
_reference
, tensor._start), (int)tensor._values.Length - tensor._start);
1652
Span<T> ospan = MemoryMarshal.CreateSpan(ref output.AsTensorSpan().
_reference
, (int)output.FlattenedLength);
1692
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination.
_reference
, (int)destination._shape.LinearLength);
2038
TensorSpan<T> output = new TensorSpan<T>(ref tensor.
_reference
, tensor._shape.LinearLength, lengths[..newRank], strides[..newRank], strideOrder[..newRank]);
2479
TensorSpan<T> output = new TensorSpan<T>(ref tensor.
_reference
, tensor._shape.LinearLength, newLengths, newStrides);
System\Numerics\Tensors\netcore\TensorDimensionSpan_1.cs (1)
49
return new TensorSpan<T>(ref Unsafe.Add(ref _tensor.
_reference
, linearOffset), _sliceShape);
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_1.cs (28)
40
_reference
= ref (array is not null)
52
_reference
= ref (array is not null)
64
_reference
= ref (array is not null)
76
_reference
= ref (array is not null)
86
_reference
= ref reference;
94
_reference
= ref reference;
102
_reference
= ref reference;
112
_reference
= ref (array is not null)
124
_reference
= ref (array is not null)
134
_reference
= ref Unsafe.AsRef<T>(data);
142
_reference
= ref Unsafe.AsRef<T>(data);
150
_reference
= ref Unsafe.AsRef<T>(data);
156
_reference
= ref data;
162
_reference
= ref data;
168
_reference
= ref data;
174
_reference
= ref data;
179
_reference
= ref reference;
186
get => ref Unsafe.Add(ref
_reference
, _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNInt, nint>(indexes));
192
get => ref Unsafe.Add(ref
_reference
, _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(indexes));
227
=> Unsafe.AreSame(ref left.
_reference
, ref right.
_reference
)
242
new ReadOnlyTensorSpan<T>(ref tensor.
_reference
, tensor._shape);
245
public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref
_reference
, in _shape);
304
if (_shape.FlattenedLength != 0) ret = ref
_reference
;
313
ref Unsafe.Add(ref
_reference
, linearOffset),
323
ref Unsafe.Add(ref
_reference
, linearOffset),
333
ref Unsafe.Add(ref
_reference
, linearOffset),
367
public readonly ref T Current => ref Unsafe.Add(ref _span.
_reference
, _linearOffset);