39 writes to _reference
System.Numerics.Tensors (39)
System\Numerics\Tensors\netcore\Tensor.cs (9)
241Span<T> dstSpan = MemoryMarshal.CreateSpan(ref destination._reference, (int)totalLength); 438Span<T> span = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.LinearLength); 461Span<T> span = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.LinearLength); 1548TensorSpan<T> output = new TensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, strides, tensor.IsPinned); 1640ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref tensor.AsTensorSpan()._reference, tensor._start), tensor._values.Length - tensor._start); 1641Span<T> ospan = MemoryMarshal.CreateSpan(ref output.AsTensorSpan()._reference, (int)output.FlattenedLength); 1681Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.LinearLength); 1998TensorSpan<T> output = new TensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, lengths[..rank], strides[..rank], tensor.IsPinned); 2391TensorSpan<T> output = new TensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, newStrides, tensor.IsPinned);
System\Numerics\Tensors\netcore\TensorDimensionSpan_1.cs (1)
52return new TensorSpan<T>(ref Unsafe.Add(ref _tensor._reference, linearOffset), _sliceShape);
System\Numerics\Tensors\netcore\TensorOperation.cs (7)
22ref Unsafe.Add(ref x._reference, linearOffset) 98ref Unsafe.Add(ref destination._reference, linearOffset), 119ref Unsafe.Add(ref destination._reference, destinationLinearOffset) 147ref Unsafe.Add(ref destination._reference, destinationLinearOffset) 210ref Unsafe.Add(ref destination._reference, destinationLinearOffset) 269ref Unsafe.Add(ref destination._reference, destinationLinearOffset) 291ref Unsafe.Add(ref destination._reference, destinationLinearOffset)
System\Numerics\Tensors\netcore\TensorSpan_1.cs (22)
42_reference = ref (array is not null) 59_reference = ref (array is not null) 71_reference = ref (array is not null) 81_reference = ref reference; 93_reference = ref reference; 103_reference = ref (array is not null) 115_reference = ref (array is not null) 125_reference = ref Unsafe.AsRef<T>(data); 138_reference = ref Unsafe.AsRef<T>(data); 144_reference = ref data; 149_reference = ref reference; 156get => ref Unsafe.Add(ref _reference, _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNInt, nint>(indexes)); 162get => ref Unsafe.Add(ref _reference, _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(indexes)); 200=> Unsafe.AreSame(ref left._reference, ref right._reference) 215new ReadOnlyTensorSpan<T>(ref tensor._reference, tensor._shape); 218public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref _reference, in _shape); 277if (_shape.FlattenedLength != 0) ret = ref _reference; 286ref Unsafe.Add(ref _reference, linearOffset), 296ref Unsafe.Add(ref _reference, linearOffset), 306ref Unsafe.Add(ref _reference, linearOffset), 423public readonly ref T Current => ref Unsafe.Add(ref _span._reference, _linearOffset);