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