1 write to _memoryLength
System.Numerics.Tensors (1)
System\Numerics\Tensors\netcore\TensorShape.cs (1)
31_memoryLength = memoryLength;
100 references to _memoryLength
System.Numerics.Tensors (100)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan.cs (5)
332if (index >= _shape._memoryLength || index < 0) 355if (index >= _shape._memoryLength || index < 0) 463return new ReadOnlyTensorSpan<T>(ref Unsafe.As<TDerived, T>(ref items._reference), items._shape.Lengths, items._shape.Strides, items._shape._memoryLength); 732if ((index >= _shape._memoryLength || index < 0) && flattenedLength != 0) 735toReturn = new ReadOnlyTensorSpan<T>(ref Unsafe.Add(ref _reference, index), lengths, _shape.Strides, _shape._memoryLength - index);
System\Numerics\Tensors\netcore\Tensor.Factory.cs (3)
191Span<T> span = MemoryMarshal.CreateSpan<T>(ref destination._reference, (int)destination._shape._memoryLength); 193GaussianDistribution<T>(span, destination._shape._memoryLength, random ?? Random.Shared); 208Span<T> span = MemoryMarshal.CreateSpan<T>(ref destination._reference, (int)destination._shape._memoryLength);
System\Numerics\Tensors\netcore\TensorExtensions.cs (83)
135return new TensorSpan<T>(ref input._reference, shape, input.Strides, input._shape._memoryLength); 161TensorSpan<T> output = new TensorSpan<T>(ref input._reference, shape, strides, input._shape._memoryLength); 178return new TensorSpan<T>(ref input._reference, shape, input.Strides, input._shape._memoryLength); 204TensorSpan<T> output = new TensorSpan<T>(ref input._reference, shape, strides, input._shape._memoryLength); 751Span<T> srcSpan = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape._memoryLength); 752Span<bool> filterSpan = MemoryMarshal.CreateSpan(ref filter._reference, (int)tensor._shape._memoryLength); 779Span<T> dstSpan = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape._memoryLength); 780Span<bool> filterSpan = MemoryMarshal.CreateSpan(ref filter._reference, (int)tensor._shape._memoryLength); 781Span<T> valuesSpan = MemoryMarshal.CreateSpan(ref values._reference, (int)values._shape._memoryLength); 2844TensorSpan<T> output = new TensorSpan<T>(ref tensor._reference, arrLengths, strides, tensor._shape._memoryLength); 2913ReadOnlyTensorSpan<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, arrLengths, strides, tensor._shape._memoryLength); 2949Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 2950if (destination._shape._memoryLength > tensor._values.Length) 2953TensorSpanHelpers.Memmove(ospan, span, destination._shape._memoryLength); 2964ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape._memoryLength); 2965Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 2966if (destination._shape._memoryLength > tensor._shape._memoryLength) 2967TensorSpanHelpers.Memmove(ospan, span, tensor._shape._memoryLength); 2969TensorSpanHelpers.Memmove(ospan, span, destination._shape._memoryLength); 2980ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape._memoryLength); 2981Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 2982if (destination._shape._memoryLength > tensor._shape._memoryLength) 2983TensorSpanHelpers.Memmove(ospan, span, tensor._shape._memoryLength); 2985TensorSpanHelpers.Memmove(ospan, span, destination._shape._memoryLength); 3037nint index = tensor._shape._memoryLength - 1; 3038Span<T> inputSpan = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape._memoryLength); 3039Span<T> outputSpan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 3040for (int i = 0; i <= tensor._shape._memoryLength / 2; i++) 3108&& tensor._shape._memoryLength == other._shape._memoryLength 3110&& MemoryMarshal.CreateReadOnlySpan(in tensor.GetPinnableReference(), (int)tensor._shape._memoryLength).SequenceEqual(MemoryMarshal.CreateReadOnlySpan(in other.GetPinnableReference(), (int)other._shape._memoryLength)); 3120&& tensor._shape._memoryLength == other._shape._memoryLength 3122&& MemoryMarshal.CreateReadOnlySpan(in tensor.GetPinnableReference(), (int)tensor._shape._memoryLength).SequenceEqual(MemoryMarshal.CreateReadOnlySpan(in other.GetPinnableReference(), (int)other._shape._memoryLength)); 3358return new TensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape._memoryLength); 3414return new ReadOnlyTensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape._memoryLength); 3701return new TensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape._memoryLength); 3738return new ReadOnlyTensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape._memoryLength); 4674Span<T> values = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 5184ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 5195ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 5206ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 5219ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 5985ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 5986Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6227if (destination._shape._memoryLength < x._shape._memoryLength) 6230ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6231Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6258if (destination._shape._memoryLength < x._shape._memoryLength) 6261ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6262Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6289if (destination._shape._memoryLength < x._shape._memoryLength) 6292ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6293Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6339if (destination._shape._memoryLength < x._shape._memoryLength) 6342ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6343Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6366if (destination._shape._memoryLength < x._shape._memoryLength) 6369ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6370Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6393if (destination._shape._memoryLength < x._shape._memoryLength) 6396ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6397Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6916if (destination._shape._memoryLength < input._shape.FlattenedLength) 6969if (destination._shape._memoryLength < input._shape.FlattenedLength) 7021if (destination._shape._memoryLength < input._shape.FlattenedLength) 7032inputSpan = MemoryMarshal.CreateSpan(ref input._reference, (int)input._shape._memoryLength); 7033destinationSpan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 7081ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref left._reference, left._shape._memoryLength <= left.FlattenedLength ? (int)left._shape._memoryLength : (int)left.FlattenedLength); 7082ReadOnlySpan<T> rspan = MemoryMarshal.CreateSpan(ref right._reference, right._shape._memoryLength <= right.FlattenedLength ? (int)right._shape._memoryLength : (int)right.FlattenedLength); 7083Span<T> ospan = MemoryMarshal.CreateSpan(ref slicedDestination._reference, (int)slicedDestination._shape._memoryLength);
System\Numerics\Tensors\netcore\TensorHelpers.cs (3)
20Span<bool> filterSpan = MemoryMarshal.CreateSpan(ref filter._reference, (int)filter._shape._memoryLength); 90=> tensor1._shape._memoryLength == tensor2._shape._memoryLength;
System\Numerics\Tensors\netcore\TensorSpan.cs (6)
334if (index >= _shape._memoryLength || index < 0) 359if (index >= _shape._memoryLength || index < 0) 552MemoryMarshal.CreateSpan<T>(ref _reference, (int)_shape._memoryLength).Fill(value); 673new ReadOnlyTensorSpan<T>(ref span._reference, span._shape.Lengths, span._shape.Strides, span._shape._memoryLength); 767if ((index >= _shape._memoryLength || index < 0) && flattenedLength != 0) 770toReturn = new TensorSpan<T>(ref Unsafe.Add(ref _reference, index), lengths, _shape.Strides, _shape._memoryLength - index);