23 references to LinearLength
System.Numerics.Tensors (23)
System\Numerics\Tensors\netcore\Tensor_1.cs (1)
30_values = GC.AllocateArray<T>(checked((int)(_shape.LinearLength)), pinned);
System\Numerics\Tensors\netcore\Tensor.cs (11)
270nint destinationLinearLength = destination._shape.LinearLength; 519T[] values = GC.AllocateUninitializedArray<T>(checked((int)(shape.LinearLength)), pinned); 1749TensorSpan<T> result = new TensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, strides, tensor.IsPinned); 1781ReadOnlyTensorSpan<T> result = new ReadOnlyTensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, strides, tensor.IsPinned); 1889if (tensor._shape.Overlaps(in tensor._reference, ref destination._reference, destination._shape.LinearLength)) 2044if (tensor._shape.Overlaps(in tensor._reference, ref destination._reference, destination._shape.LinearLength)) 2049if ((tensor._shape.LinearLength == 1) || (dimension >= 0 && tensor.Lengths[dimension] == 1)) 2601TensorSpan<T> output = new TensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, lengths[..rank], strides[..rank], tensor.IsPinned); 2680ReadOnlyTensorSpan<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, lengths[..rank], strides[..rank], tensor.IsPinned); 3132TensorSpan<T> output = new TensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, newStrides, tensor.IsPinned); 3177ReadOnlyTensorSpan<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, newStrides, tensor.IsPinned);
System\Numerics\Tensors\netcore\TensorOperation.cs (4)
28if (!source._shape.Overlaps(in source._reference, ref destination._reference, destination._shape.LinearLength)) 105|| !source._shape.Overlaps(in source._reference, ref destination._reference, destination._shape.LinearLength)); 420TensorShape shape = TensorShape.Create(in source._reference, source._shape.LinearLength, destination.Lengths, strides, source.IsPinned); 1002nint destinationLinearOffset = destination._shape.LinearLength - 1 - negInnermostStride;
System\Numerics\Tensors\netcore\TensorShape.cs (7)
401if ((LinearLength == 0) || (destinationLength == 0)) 407nuint sourceBytes = checked((nuint)LinearLength * (nuint)Unsafe.SizeOf<TSource>()); 465if (left.LinearLength != right.LinearLength) 856return offset == 0 ? shape : CreateForView(shape.LinearLength, shape.Lengths[offset..], shape.Strides[offset..], shape.IsPinned); 866TensorShape result = CreateForView(shape.LinearLength, lengths, strides, shape.IsPinned); 1205Debug.Assert(FlattenedLength == LinearLength);