11 writes to _shape
System.Numerics.Tensors (11)
System\Numerics\Tensors\netcore\TensorSpan_1.cs (11)
38
_shape
= TensorShape.Create(array);
55
_shape
= TensorShape.Create(array, lengths, strides);
67
_shape
= TensorShape.Create(array, start, lengths, strides);
77
_shape
= TensorShape.Create(ref reference, span.Length, pinned: false);
89
_shape
= TensorShape.Create(ref reference, span.Length, lengths, strides, pinned: false);
99
_shape
= TensorShape.Create(array);
111
_shape
= TensorShape.Create(array, start, lengths, strides, out nint linearOffset);
121
_shape
= TensorShape.Create(data, dataLength);
134
_shape
= TensorShape.Create(data, dataLength, lengths, strides);
140
_shape
= TensorShape.Create(ref data, dataLength, lengths, strides, pinned);
147
_shape
= shape;
57 references to _shape
System.Numerics.Tensors (57)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan_1.cs (1)
450
if (TensorShape.AreCompatible(destination.
_shape
, _shape, false))
System\Numerics\Tensors\netcore\Tensor.cs (9)
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);
1593
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination.
_shape
.LinearLength);
1688
&& tensor.
_shape
.LinearLength == other._shape.LinearLength
1690
&& MemoryMarshal.CreateReadOnlySpan(in tensor.GetPinnableReference(), (int)tensor.
_shape
.LinearLength).SequenceEqual(MemoryMarshal.CreateReadOnlySpan(in other.GetPinnableReference(), (int)other._shape.LinearLength));
1910
TensorSpan<T> output = new TensorSpan<T>(ref tensor._reference, tensor.
_shape
.LinearLength, lengths[..rank], strides[..rank], tensor.IsPinned);
2275
if (!TensorShape.AreCompatible(destination.
_shape
, tensor._shape, false))
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)
51
nint linearOffset = _tensor.
_shape
.GetLinearOffsetForDimension(index, _dimension);
System\Numerics\Tensors\netcore\TensorOperation.cs (24)
20
linearOffset = x.
_shape
.AdjustToNextIndex(x.
_shape
, linearOffset, indexes);
96
linearOffset = destination.
_shape
.AdjustToNextIndex(destination.
_shape
, linearOffset, indexes);
114
xLinearOffset = x._shape.AdjustToNextIndex(destination.
_shape
, xLinearOffset, xIndexes);
115
destinationLinearOffset = destination.
_shape
.AdjustToNextIndex(destination.
_shape
, destinationLinearOffset, destinationIndexes);
138
nint destinationLinearOffset = destination.
_shape
.LinearLength;
142
xLinearOffset = x._shape.AdjustToNextIndex(destination.
_shape
, xLinearOffset, xIndexes);
143
destinationLinearOffset = destination.
_shape
.AdjustToPreviousIndex(destination.
_shape
, destinationLinearOffset, destinationIndexes);
203
xLinearOffset = x._shape.AdjustToNextIndex(destination.
_shape
, xLinearOffset, xIndexes);
204
yLinearOffset = y._shape.AdjustToNextIndex(destination.
_shape
, yLinearOffset, yIndexes);
205
destinationLinearOffset = destination.
_shape
.AdjustToNextIndex(destination.
_shape
, destinationLinearOffset, destinationIndexes);
263
xLinearOffset = x._shape.AdjustToNextIndex(destination.
_shape
, xLinearOffset, xIndexes);
264
destinationLinearOffset = destination.
_shape
.AdjustToNextIndex(destination.
_shape
, destinationLinearOffset, destinationIndexes);
285
xLinearOffset = y._shape.AdjustToNextIndex(destination.
_shape
, xLinearOffset, xIndexes);
286
destinationLinearOffset = destination.
_shape
.AdjustToNextIndex(destination.
_shape
, destinationLinearOffset, destinationIndexes);
338
if (!TensorShape.AreCompatible(destination.
_shape
, x._shape, false))
347
if (TensorShape.AreCompatible(destination.
_shape
, x._shape, false))
349
if (TensorShape.AreCompatible(destination.
_shape
, y._shape, false))
System\Numerics\Tensors\netcore\TensorSpan_1.cs (22)
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));
170
public nint FlattenedLength =>
_shape
.FlattenedLength;
173
public bool HasAnyDenseDimensions =>
_shape
.HasAnyDenseDimensions;
176
public bool IsDense =>
_shape
.IsDense;
179
public bool IsEmpty =>
_shape
.IsEmpty;
182
public bool IsPinned =>
_shape
.IsPinned;
186
public ReadOnlySpan<nint> Lengths =>
_shape
.Lengths;
193
public ReadOnlySpan<nint> Strides =>
_shape
.Strides;
198
&& left.
_shape
== right.
_shape
;
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;
301
TensorShape shape =
_shape
.Slice<TensorShape.GetOffsetAndLengthForNInt, nint>(startIndexes, out nint linearOffset);
311
TensorShape shape =
_shape
.Slice<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(startIndexes, out nint linearOffset);
321
TensorShape shape =
_shape
.Slice<TensorShape.GetOffsetAndLengthForNRange, NRange>(ranges, out nint linearOffset);
344
nint longestContiguousLength =
_shape
.GetLongestContiguousLength<TensorShape.GetOffsetAndLengthForNInt, nint>(startIndexes, out nint linearOffset);
360
nint longestContiguousLength =
_shape
.GetLongestContiguousLength<TensorShape.GetOffsetAndLengthForNIndex, NIndex>(startIndexes, out nint linearOffset);
488
if (_itemsEnumerated == _span.
_shape
.FlattenedLength)
493
_linearOffset = _span.
_shape
.AdjustToNextIndex(_span.
_shape
, _linearOffset, _indexes);