Implemented interface member:
property
Lengths
System.Numerics.Tensors.IReadOnlyTensor.Lengths
21 references to Lengths
System.Numerics.Tensors (21)
System\Numerics\Tensors\netcore\Tensor.cs (15)
247if (!TensorShape.AreLengthsTheSame(destination.Lengths, lengths)) 262ReadOnlyTensorSpan<T> tempTensor = new ReadOnlyTensorSpan<T>(tempBuffer, 0, destination.Lengths, []); 311hasMore = TensorShape.AdjustToNextIndex(ranges, dimension - 1, destination.Lengths); 1465if (tensor.Lengths.SequenceEqual(lengths)) 1509if (lengthOffset < tensor.Rank && newLengths[i] == tensor.Lengths[lengthOffset]) 1518origStrides.Insert(i, tensor.Strides[i] * tensor.Lengths[i]); 2009for (int i = 0, index = 0; i < tensor.Lengths.Length; i++) 2011if (tensor.Lengths[i] != 1) 2013lengths[index] = tensor.Lengths[i]; 2025if (tensor.Lengths[dimension] != 1) 2032tensor.Lengths[..dimension].CopyTo(lengths); 2033tensor.Lengths[(dimension + 1)..].CopyTo(lengths[dimension..]); 2457if (dimension > tensor.Lengths.Length) 2464tensor.Lengths.Slice(0, dimension).CopyTo(newLengths); 2465tensor.Lengths.Slice(dimension).CopyTo(newLengths.Slice(dimension + 1));
System\Numerics\Tensors\netcore\TensorDimensionSpan_1.cs (2)
28_length = TensorPrimitives.Product(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 (2)
135destinationIndexes[i] = destination.Lengths[i] - 1; 137destinationIndexes[^1] = destination.Lengths[^1];
System\Numerics\Tensors\netcore\TensorSpan_1.cs (2)
189public int Rank => Lengths.Length; 408result = Tensor.CreateFromShape<T>(Lengths, IsPinned);