1 write to _memoryLength
System.Numerics.Tensors (1)
System\Numerics\Tensors\netcore\TensorShape.cs (1)
31_memoryLength = memoryLength;
102 references to _memoryLength
System.Numerics.Tensors (102)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan.cs (5)
315if (index >= _shape._memoryLength || index < 0) 338if (index >= _shape._memoryLength || index < 0) 446return new ReadOnlyTensorSpan<T>(ref Unsafe.As<TDerived, T>(ref items._reference), items._shape.Lengths, items._shape.Strides, items._shape._memoryLength); 715if ((index >= _shape._memoryLength || index < 0) && flattenedLength != 0) 718toReturn = 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 (85)
150return new TensorSpan<T>(ref input._reference, shape, input.Strides, input._shape._memoryLength); 176TensorSpan<T> output = new TensorSpan<T>(ref input._reference, shape, strides, input._shape._memoryLength); 193return new TensorSpan<T>(ref input._reference, shape, input.Strides, input._shape._memoryLength); 219TensorSpan<T> output = new TensorSpan<T>(ref input._reference, shape, strides, input._shape._memoryLength); 766Span<T> srcSpan = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape._memoryLength); 767Span<bool> filterSpan = MemoryMarshal.CreateSpan(ref filter._reference, (int)tensor._shape._memoryLength); 794Span<T> dstSpan = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape._memoryLength); 795Span<bool> filterSpan = MemoryMarshal.CreateSpan(ref filter._reference, (int)tensor._shape._memoryLength); 796Span<T> valuesSpan = MemoryMarshal.CreateSpan(ref values._reference, (int)values._shape._memoryLength); 2853TensorSpan<T> output = new TensorSpan<T>(ref tensor._reference, arrLengths, strides, tensor._shape._memoryLength); 2922ReadOnlyTensorSpan<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, arrLengths, strides, tensor._shape._memoryLength); 2958Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 2959if (destination._shape._memoryLength > tensor._values.Length) 2962TensorSpanHelpers.Memmove(ospan, span, destination._shape._memoryLength); 2973ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape._memoryLength); 2974Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 2975if (destination._shape._memoryLength > tensor._shape._memoryLength) 2976TensorSpanHelpers.Memmove(ospan, span, tensor._shape._memoryLength); 2978TensorSpanHelpers.Memmove(ospan, span, destination._shape._memoryLength); 2989ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape._memoryLength); 2990Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 2991if (destination._shape._memoryLength > tensor._shape._memoryLength) 2992TensorSpanHelpers.Memmove(ospan, span, tensor._shape._memoryLength); 2994TensorSpanHelpers.Memmove(ospan, span, destination._shape._memoryLength); 3046nint index = tensor._shape._memoryLength - 1; 3047Span<T> inputSpan = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape._memoryLength); 3048Span<T> outputSpan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 3049for (int i = 0; i <= tensor._shape._memoryLength / 2; i++) 3117&& tensor._shape._memoryLength == other._shape._memoryLength 3119&& MemoryMarshal.CreateReadOnlySpan(in tensor.GetPinnableReference(), (int)tensor._shape._memoryLength).SequenceEqual(MemoryMarshal.CreateReadOnlySpan(in other.GetPinnableReference(), (int)other._shape._memoryLength)); 3129&& tensor._shape._memoryLength == other._shape._memoryLength 3131&& MemoryMarshal.CreateReadOnlySpan(in tensor.GetPinnableReference(), (int)tensor._shape._memoryLength).SequenceEqual(MemoryMarshal.CreateReadOnlySpan(in other.GetPinnableReference(), (int)other._shape._memoryLength)); 3367return new TensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape._memoryLength); 3423return new ReadOnlyTensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape._memoryLength); 3513Span<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 3519return T.CreateChecked(sum / T.CreateChecked(x._shape._memoryLength)); 3696return new TensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape._memoryLength); 3720return new ReadOnlyTensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape._memoryLength); 4643Span<T> values = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 5153ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 5164ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 5175ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 5188ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 5954ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 5955Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6196if (destination._shape._memoryLength < x._shape._memoryLength) 6199ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6200Span<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); 6308if (destination._shape._memoryLength < x._shape._memoryLength) 6311ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6312Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6335if (destination._shape._memoryLength < x._shape._memoryLength) 6338ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6339Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6362if (destination._shape._memoryLength < x._shape._memoryLength) 6365ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6366Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6859if (destination._shape._memoryLength < input._shape.FlattenedLength) 6912if (destination._shape._memoryLength < input._shape.FlattenedLength) 6964if (destination._shape._memoryLength < input._shape.FlattenedLength) 6975inputSpan = MemoryMarshal.CreateSpan(ref input._reference, (int)input._shape._memoryLength); 6976destinationSpan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 7024ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref left._reference, left._shape._memoryLength <= left.FlattenedLength ? (int)left._shape._memoryLength : (int)left.FlattenedLength); 7025ReadOnlySpan<T> rspan = MemoryMarshal.CreateSpan(ref right._reference, right._shape._memoryLength <= right.FlattenedLength ? (int)right._shape._memoryLength : (int)right.FlattenedLength); 7026Span<T> ospan = MemoryMarshal.CreateSpan(ref slicedDestination._reference, (int)slicedDestination._shape._memoryLength);
System\Numerics\Tensors\netcore\TensorHelpers.cs (3)
22Span<bool> filterSpan = MemoryMarshal.CreateSpan(ref filter._reference, (int)filter._shape._memoryLength); 92=> tensor1._shape._memoryLength == tensor2._shape._memoryLength;
System\Numerics\Tensors\netcore\TensorSpan.cs (6)
319if (index >= _shape._memoryLength || index < 0) 344if (index >= _shape._memoryLength || index < 0) 537MemoryMarshal.CreateSpan<T>(ref _reference, (int)_shape._memoryLength).Fill(value); 658new ReadOnlyTensorSpan<T>(ref span._reference, span._shape.Lengths, span._shape.Strides, span._shape._memoryLength); 752if ((index >= _shape._memoryLength || index < 0) && flattenedLength != 0) 755toReturn = new TensorSpan<T>(ref Unsafe.Add(ref _reference, index), lengths, _shape.Strides, _shape._memoryLength - index);