42 writes to _reference
System.Numerics.Tensors (42)
System\Numerics\Tensors\netcore\Tensor.cs (9)
240
Span<T> dstSpan = MemoryMarshal.CreateSpan(ref destination.
_reference
, (int)totalLength);
350
Span<T> span = MemoryMarshal.CreateSpan(ref destination.
_reference
, (int)destination._shape.LinearLength);
373
Span<T> span = MemoryMarshal.CreateSpan(ref destination.
_reference
, (int)destination._shape.LinearLength);
1460
TensorSpan<T> output = new TensorSpan<T>(ref tensor.
_reference
, tensor._shape.LinearLength, newLengths, strides, tensor.IsPinned);
1552
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref tensor.AsTensorSpan().
_reference
, tensor._start), tensor._values.Length - tensor._start);
1553
Span<T> ospan = MemoryMarshal.CreateSpan(ref output.AsTensorSpan().
_reference
, (int)output.FlattenedLength);
1593
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination.
_reference
, (int)destination._shape.LinearLength);
1910
TensorSpan<T> output = new TensorSpan<T>(ref tensor.
_reference
, tensor._shape.LinearLength, lengths[..rank], strides[..rank], tensor.IsPinned);
2352
TensorSpan<T> output = new TensorSpan<T>(ref tensor.
_reference
, tensor._shape.LinearLength, newLengths, newStrides, tensor.IsPinned);
System\Numerics\Tensors\netcore\TensorDimensionSpan_1.cs (1)
52
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 (24)
39
_reference
= ref (array is not null)
56
_reference
= ref (array is not null)
68
_reference
= ref (array is not null)
78
_reference
= ref reference;
90
_reference
= ref reference;
100
_reference
= ref (array is not null)
112
_reference
= ref (array is not null)
122
_reference
= ref Unsafe.AsRef<T>(data);
135
_reference
= ref Unsafe.AsRef<T>(data);
141
_reference
= ref data;
146
_reference
= ref reference;
153
get => ref Unsafe.Add(ref
_reference
, _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNInt, nint>(indexes));
159
get => ref Unsafe.Add(ref
_reference
, _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(indexes));
197
=> Unsafe.AreSame(ref left.
_reference
, ref right.
_reference
)
212
new ReadOnlyTensorSpan<T>(ref tensor.
_reference
, tensor._shape);
215
public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref
_reference
, in _shape);
274
if (_shape.FlattenedLength != 0) ret = ref
_reference
;
303
ref Unsafe.Add(ref
_reference
, linearOffset),
313
ref Unsafe.Add(ref
_reference
, linearOffset),
323
ref Unsafe.Add(ref
_reference
, linearOffset),
352
span = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref
_reference
, linearOffset), length);
368
span = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref
_reference
, linearOffset), length);
483
public readonly ref T Current => ref Unsafe.Add(ref _span.
_reference
, _linearOffset);
System\Runtime\InteropServices\TensorMarshal.cs (1)
47
return ref tensorSpan.
_reference
;