44 writes to _reference
System.Numerics.Tensors (44)
System\Numerics\Tensors\netcore\Tensor.cs (9)
244Span<T> dstSpan = MemoryMarshal.CreateSpan(ref destination._reference, (int)totalLength); 462Span<T> span = MemoryMarshal.CreateSpan<T>(ref destination._reference, (int)destination._shape.LinearLength); 485Span<T> span = MemoryMarshal.CreateSpan<T>(ref destination._reference, (int)destination._shape.LinearLength); 1576TensorSpan<T> output = new TensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, strides); 1668ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref Unsafe.Add(ref tensor.AsTensorSpan()._reference, tensor._start), (int)tensor._values.Length - tensor._start); 1669Span<T> ospan = MemoryMarshal.CreateSpan(ref output.AsTensorSpan()._reference, (int)output.FlattenedLength); 1709Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.LinearLength); 2055TensorSpan<T> output = new TensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, lengths[..newRank], strides[..newRank], strideOrder[..newRank]); 2496TensorSpan<T> output = new TensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, newStrides);
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.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; 185get => ref Unsafe.Add(ref _reference, _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNInt, nint>(indexes)); 191get => ref Unsafe.Add(ref _reference, _shape.GetLinearOffset<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(indexes)); 226=> Unsafe.AreSame(ref left._reference, ref right._reference) 241new ReadOnlyTensorSpan<T>(ref tensor._reference, tensor._shape); 244public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref _reference, in _shape); 300if (_shape.FlattenedLength != 0) ret = ref _reference; 309ref Unsafe.Add(ref _reference, linearOffset), 319ref Unsafe.Add(ref _reference, linearOffset), 329ref Unsafe.Add(ref _reference, linearOffset), 363public readonly ref T Current => ref Unsafe.Add(ref _span._reference, _linearOffset);