Implemented interface member:
property
FlattenedLength
System.Numerics.Tensors.IReadOnlyTensor.FlattenedLength
71 references to FlattenedLength
System.Numerics.Tensors (71)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan_1.cs (1)
456if ((_shape.FlattenedLength <= destination.FlattenedLength) &&
System\Numerics\Tensors\netcore\Tensor.cs (30)
197nint destinationLength = destination.FlattenedLength; 265if (destination.FlattenedLength == 0) 284nint destinationLength = destination.FlattenedLength; 374if (destination.FlattenedLength == 0) 384nint destinationBlockLength = destination.FlattenedLength / outerLength; 537nint flattenedLength = destination.FlattenedLength; 565Span<T> span = MemoryMarshal.CreateSpan(ref slice._reference, (int)slice.FlattenedLength); 601nint flattenedLength = destination.FlattenedLength; 626Span<T> span = MemoryMarshal.CreateSpan(ref slice._reference, (int)slice.FlattenedLength); 1871nint destinationLength = destination.FlattenedLength; 1920nint copyLength = Math.Min(source.FlattenedLength, destination.FlattenedLength); 1922if (copyLength < destination.FlattenedLength) 1930Debug.Assert(start >= 0 && start < destination.FlattenedLength); 1938nint sliceLength = slices[0].FlattenedLength; 1952Debug.Assert(start >= 0 && start < destination.FlattenedLength); 1953if (destination.FlattenedLength <= int.MaxValue) 1959for (nint cleared = start; cleared < destination.FlattenedLength;) 1961int count = (int)Math.Min(destination.FlattenedLength - cleared, int.MaxValue); 1975if (destination.FlattenedLength - start >= TensorOperation.MinSlicedOperationLength 1981for (nint i = start; i < destination.FlattenedLength; i++) 2040if (destination.FlattenedLength == 0) 2069nint axisLength = dimension == -1 ? tensor.FlattenedLength : tensor.Lengths[dimension]; 2082for (nint block = 0; block < tensor.FlattenedLength; block += blockLength) 2104for (nint block = 0; block < tensor.FlattenedLength; block += blockLength) 2129for (nint block = 0; block < tensor.FlattenedLength; block += blockLength) 2174if (tensor.IsDense && destination.IsDense && tensor.FlattenedLength == destination.FlattenedLength) 2187if (destination.FlattenedLength >= TensorOperation.MinSlicedOperationLength 2233for (nint offset = 0; offset < destination.FlattenedLength;) 2235int count = (int)Math.Min(destination.FlattenedLength - offset, int.MaxValue); 2785if (destination.FlattenedLength == 0)
System\Numerics\Tensors\netcore\TensorOperation.cs (39)
23if (source.FlattenedLength == 0 || destination.FlattenedLength == 0) 66=> AsDenseSpan(destination, 0, checked((int)destination.FlattenedLength)); 71Debug.Assert(offset >= 0 && offset <= destination.FlattenedLength); 72Debug.Assert(length >= 0 && length <= destination.FlattenedLength - offset); 81Debug.Assert(destinationOffset >= 0 && copyLength <= destination.FlattenedLength - destinationOffset); 103Debug.Assert(destinationOffset >= 0 && copyLength <= destination.FlattenedLength - destinationOffset); 190nint sliceLength = destination.IsDense ? destination.FlattenedLength : slices[0].FlattenedLength; 191for (nint copied = 0; copied < destination.FlattenedLength;) 193nint position = destination.FlattenedLength - copied - 1; 236nint destinationSliceLength = destinationSlices[0].FlattenedLength; 275nint destinationSliceLength = destination.IsDense ? destination.FlattenedLength : destinationSlices[0].FlattenedLength; 283for (nint copied = 0; copied < destination.FlattenedLength;) 319nint sliceLength = destination.IsDense ? destination.FlattenedLength : slices[0].FlattenedLength; 341for (nint offset = 0; offset < destination.FlattenedLength;) 343int count = (int)Math.Min(destination.FlattenedLength - offset, int.MaxValue); 353for (nint offset = 0; offset < destination.FlattenedLength;) 355int count = (int)Math.Min(destination.FlattenedLength - offset, int.MaxValue); 365for (nint offset = 0; offset < destination.FlattenedLength;) 367int count = (int)Math.Min(destination.FlattenedLength - offset, int.MaxValue); 376for (nint offset = 0; offset < destination.FlattenedLength;) 378int count = (int)Math.Min(destination.FlattenedLength - offset, int.MaxValue); 606if (x.IsDense && x.FlattenedLength <= int.MaxValue) 614for (nint offset = 0; offset < x.FlattenedLength;) 616int count = (int)Math.Min(x.FlattenedLength - offset, int.MaxValue); 636for (nint i = 0; i < x.FlattenedLength; i++) 857if (destination.IsDense && destination.FlattenedLength <= int.MaxValue) 865for (nint offset = 0; offset < destination.FlattenedLength;) 867int count = (int)Math.Min(destination.FlattenedLength - offset, int.MaxValue); 887for (nint i = 0; i < destination.FlattenedLength; i++) 903nint destinationLength = destination.FlattenedLength; 943if (isCopy && destination.FlattenedLength >= MinSlicedOperationLength) 946if (TryCopyDenseSlices(optimizedSource, new TensorSpan<TArg>(ref destinationReference, destination._shape), destination.FlattenedLength)) 992nint destinationLength = destination.FlattenedLength; 1157nint destinationLength = destination.FlattenedLength; 1293nint destinationLength = destination.FlattenedLength; 1350nint destinationLength = destination.FlattenedLength;
System\Numerics\Tensors\netcore\TensorSpanDebugView.cs (1)
14_array = new T[span.FlattenedLength];