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