Implemented interface member:
property
Lengths
System.Numerics.Tensors.IReadOnlyTensor.Lengths
38 references to Lengths
System.Numerics.Tensors (38)
System\Numerics\Tensors\netcore\Tensor.cs (21)
240
if (destination.Rank != rank || destination.
Lengths
[dimension] != sumOfAxis)
246
if (i != dimension && destination.
Lengths
[i] != tensors[0].Lengths[i])
341
bool hasMore = !destination.
Lengths
[..dimension].Contains(0);
351
hasMore = TensorShape.AdjustToNextIndex(ranges, dimension - 1, destination.
Lengths
);
1592
if (tensor.
Lengths
.SequenceEqual(lengths))
1605
GetReshapeStrides(tensor.
Lengths
, tensor.Strides, tensor.IsDense, newLengths, strides);
1843
&& tensor.Lengths.SequenceEqual(destination.
Lengths
)
1865
nint axisLength = dimension == -1 ? tensor.FlattenedLength : tensor.
Lengths
[dimension];
1871
innerLength *= tensor.
Lengths
[i];
1917
for (nint i = destination.
Lengths
[destinationAxis]; i > 0; i--)
1921
dstIndexes[destinationAxis] = new NRange(destination.
Lengths
[destinationAxis] - i, destination.
Lengths
[destinationAxis] - i + 1);
2190
for (int i = 0, index = 0; i < tensor.
Lengths
.Length; i++)
2192
if (tensor.
Lengths
[i] != 1)
2194
lengths[index] = tensor.
Lengths
[i];
2206
if (tensor.
Lengths
[dimension] != 1)
2213
tensor.
Lengths
[..dimension].CopyTo(lengths);
2214
tensor.
Lengths
[(dimension + 1)..].CopyTo(lengths[dimension..]);
2662
if (dimension > tensor.
Lengths
.Length)
2669
tensor.
Lengths
.Slice(0, dimension).CopyTo(newLengths);
2670
tensor.
Lengths
.Slice(dimension).CopyTo(newLengths.Slice(dimension + 1));
System\Numerics\Tensors\netcore\TensorDimensionSpan_1.cs (2)
28
_length = TensorShape.GetProduct(tensor.
Lengths
[..dimension]);
30
_sliceShape = TensorShape.Create((dimension != tensor.Rank) ? tensor.
Lengths
[dimension..] : [1], tensor.Strides[dimension..], tensor.IsPinned);
System\Numerics\Tensors\netcore\TensorOperation.cs (13)
37
&& source.Lengths.SequenceEqual(destination.
Lengths
)
294
ReadOnlyTensorSpan<TArg> optimizedSource = x.Lengths.SequenceEqual(destination.
Lengths
) ? x : BroadcastSource(x, destination._shape);
295
if (destination.FlattenedLength != 0 && optimizedSource.Lengths.SequenceEqual(destination.
Lengths
))
344
destinationIndexes[i] = destination.
Lengths
[i] - 1;
346
destinationIndexes[^1] = destination.
Lengths
[^1];
443
ReadOnlyTensorSpan<TArg1> optimizedX = x.Lengths.SequenceEqual(destination.
Lengths
) ? x : BroadcastSource(x, destination._shape);
444
ReadOnlyTensorSpan<TArg2> optimizedY = y.Lengths.SequenceEqual(destination.
Lengths
) ? y : BroadcastSource(y, destination._shape);
446
optimizedX.Lengths.SequenceEqual(destination.
Lengths
) &&
447
optimizedY.Lengths.SequenceEqual(destination.
Lengths
))
535
ReadOnlyTensorSpan<TArg1> optimizedSource = x.Lengths.SequenceEqual(destination.
Lengths
) ? x : BroadcastSource(x, destination._shape);
536
if (destination.FlattenedLength != 0 && optimizedSource.Lengths.SequenceEqual(destination.
Lengths
))
582
ReadOnlyTensorSpan<TArg> optimizedSource = y.Lengths.SequenceEqual(destination.
Lengths
) ? y : BroadcastSource(y, destination._shape);
583
if (destination.FlattenedLength != 0 && optimizedSource.Lengths.SequenceEqual(destination.
Lengths
))
System\Numerics\Tensors\netcore\TensorSpan_1.cs (2)
189
public int Rank =>
Lengths
.Length;
408
result = Tensor.CreateFromShape<T>(
Lengths
, IsPinned);