62 writes to _reference
System.Numerics.Tensors (62)
System\Numerics\Tensors\netcore\Tensor.cs (21)
274
if (source._shape.Overlaps(in source._reference, ref destination.
_reference
, destinationLinearLength))
294
alignedTarget = new TensorSpan<T>(ref destination.
_reference
, TensorShape.WithRank(destination._shape, rank));
337
Span<T> dstSpan = MemoryMarshal.CreateSpan(ref target.
_reference
, (int)destinationLength);
429
Unsafe.Add(ref destination.
_reference
, linearOffset) = input.Current;
544
Span<T> span = MemoryMarshal.CreateSpan(ref destination.
_reference
, (int)flattenedLength);
565
Span<T> span = MemoryMarshal.CreateSpan(ref slice.
_reference
, (int)slice.FlattenedLength);
608
Span<T> span = MemoryMarshal.CreateSpan(ref destination.
_reference
, (int)flattenedLength);
626
Span<T> span = MemoryMarshal.CreateSpan(ref slice.
_reference
, (int)slice.FlattenedLength);
1749
TensorSpan<T> result = new TensorSpan<T>(ref tensor.
_reference
, tensor._shape.LinearLength, newLengths, strides, tensor.IsPinned);
1804
Span<T> ospan = MemoryMarshal.CreateSpan(ref output.AsTensorSpan().
_reference
, (int)output.FlattenedLength);
1817
Span<T> ospan = MemoryMarshal.CreateSpan(ref output.AsTensorSpan().
_reference
, (int)output.FlattenedLength);
1878
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination.
_reference
, (int)destinationLength);
1889
if (tensor._shape.Overlaps(in tensor._reference, ref destination.
_reference
, destination._shape.LinearLength))
1984
Unsafe.Add(ref destination.
_reference
, linearOffset) = default!;
2044
if (tensor._shape.Overlaps(in tensor._reference, ref destination.
_reference
, destination._shape.LinearLength))
2046
if (Unsafe.AreSame(ref Unsafe.AsRef(in tensor._reference), ref destination.
_reference
)
2112
ref T first = ref Unsafe.Add(ref tensor.
_reference
, leftOffset + i);
2113
ref T second = ref Unsafe.Add(ref tensor.
_reference
, rightOffset + i);
2601
TensorSpan<T> output = new TensorSpan<T>(ref tensor.
_reference
, tensor._shape.LinearLength, lengths[..rank], strides[..rank], tensor.IsPinned);
2794
alignedTarget = new TensorSpan<T>(ref destination.
_reference
, TensorShape.WithRank(destination._shape, rank + 1));
3132
TensorSpan<T> output = new TensorSpan<T>(ref tensor.
_reference
, tensor._shape.LinearLength, newLengths, newStrides, tensor.IsPinned);
System\Numerics\Tensors\netcore\TensorDimensionSpan_1.cs (2)
24
tensor = new TensorSpan<T>(ref tensor.
_reference
, TensorShape.Normalize(tensor._shape));
60
return new TensorSpan<T>(ref Unsafe.Add(ref _tensor.
_reference
, linearOffset), _sliceShape);
System\Numerics\Tensors\netcore\TensorOperation.cs (14)
28
if (!source._shape.Overlaps(in source._reference, ref destination.
_reference
, destination._shape.LinearLength))
35
ref TSource destinationReference = ref Unsafe.As<TDestination, TSource>(ref destination.
_reference
);
74
return MemoryMarshal.CreateSpan(ref Unsafe.Add(ref destination.
_reference
, offset), length);
83
ref T target = ref Unsafe.Add(ref destination.
_reference
, destinationOffset);
105
|| !source._shape.Overlaps(in source._reference, ref destination.
_reference
, destination._shape.LinearLength));
640
ref Unsafe.Add(ref x.
_reference
, linearOffset)
891
ref Unsafe.Add(ref destination.
_reference
, linearOffset),
907
ref TArg destinationReference = ref Unsafe.As<TResult, TArg>(ref destination.
_reference
);
945
ref TArg destinationReference = ref Unsafe.As<TResult, TArg>(ref destination.
_reference
);
979
ref Unsafe.Add(ref destination.
_reference
, destinationLinearOffset)
1011
ref Unsafe.Add(ref destination.
_reference
, destinationLinearOffset)
1207
ref Unsafe.Add(ref destination.
_reference
, destinationLinearOffset)
1337
ref Unsafe.Add(ref destination.
_reference
, destinationLinearOffset)
1394
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);
488
return ref Unsafe.Add(ref _span.
_reference
, _linearOffset);
System\Runtime\InteropServices\TensorMarshal.cs (1)
47
return ref tensorSpan.
_reference
;