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)
149return new TensorSpan<T>(ref input._reference, shape, input.Strides, input._shape._memoryLength); 175TensorSpan<T> output = new TensorSpan<T>(ref input._reference, shape, strides, input._shape._memoryLength); 192return new TensorSpan<T>(ref input._reference, shape, input.Strides, input._shape._memoryLength); 218TensorSpan<T> output = new TensorSpan<T>(ref input._reference, shape, strides, input._shape._memoryLength); 765Span<T> srcSpan = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape._memoryLength); 766Span<bool> filterSpan = MemoryMarshal.CreateSpan(ref filter._reference, (int)tensor._shape._memoryLength); 793Span<T> dstSpan = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape._memoryLength); 794Span<bool> filterSpan = MemoryMarshal.CreateSpan(ref filter._reference, (int)tensor._shape._memoryLength); 795Span<T> valuesSpan = MemoryMarshal.CreateSpan(ref values._reference, (int)values._shape._memoryLength); 2858TensorSpan<T> output = new TensorSpan<T>(ref tensor._reference, arrLengths, strides, tensor._shape._memoryLength); 2927ReadOnlyTensorSpan<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, arrLengths, strides, tensor._shape._memoryLength); 2963Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 2964if (destination._shape._memoryLength > tensor._values.Length) 2967TensorSpanHelpers.Memmove(ospan, span, destination._shape._memoryLength); 2978ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape._memoryLength); 2979Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 2980if (destination._shape._memoryLength > tensor._shape._memoryLength) 2981TensorSpanHelpers.Memmove(ospan, span, tensor._shape._memoryLength); 2983TensorSpanHelpers.Memmove(ospan, span, destination._shape._memoryLength); 2994ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape._memoryLength); 2995Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 2996if (destination._shape._memoryLength > tensor._shape._memoryLength) 2997TensorSpanHelpers.Memmove(ospan, span, tensor._shape._memoryLength); 2999TensorSpanHelpers.Memmove(ospan, span, destination._shape._memoryLength); 3051nint index = tensor._shape._memoryLength - 1; 3052Span<T> inputSpan = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape._memoryLength); 3053Span<T> outputSpan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 3054for (int i = 0; i <= tensor._shape._memoryLength / 2; i++) 3122&& tensor._shape._memoryLength == other._shape._memoryLength 3124&& MemoryMarshal.CreateReadOnlySpan(in tensor.GetPinnableReference(), (int)tensor._shape._memoryLength).SequenceEqual(MemoryMarshal.CreateReadOnlySpan(in other.GetPinnableReference(), (int)other._shape._memoryLength)); 3134&& tensor._shape._memoryLength == other._shape._memoryLength 3136&& MemoryMarshal.CreateReadOnlySpan(in tensor.GetPinnableReference(), (int)tensor._shape._memoryLength).SequenceEqual(MemoryMarshal.CreateReadOnlySpan(in other.GetPinnableReference(), (int)other._shape._memoryLength)); 3372return new TensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape._memoryLength); 3428return new ReadOnlyTensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape._memoryLength); 3734return new TensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape._memoryLength); 3771return new ReadOnlyTensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape._memoryLength); 4694Span<T> values = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 5204ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 5215ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 5226ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 5239ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6005ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6006Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6247if (destination._shape._memoryLength < x._shape._memoryLength) 6250ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6251Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6278if (destination._shape._memoryLength < x._shape._memoryLength) 6281ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6282Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6309if (destination._shape._memoryLength < x._shape._memoryLength) 6312ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6313Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6359if (destination._shape._memoryLength < x._shape._memoryLength) 6362ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6363Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6386if (destination._shape._memoryLength < x._shape._memoryLength) 6389ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6390Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6413if (destination._shape._memoryLength < x._shape._memoryLength) 6416ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6417Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6923if (destination._shape._memoryLength < input._shape.FlattenedLength) 6976if (destination._shape._memoryLength < input._shape.FlattenedLength) 7028if (destination._shape._memoryLength < input._shape.FlattenedLength) 7039inputSpan = MemoryMarshal.CreateSpan(ref input._reference, (int)input._shape._memoryLength); 7040destinationSpan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 7088ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref left._reference, left._shape._memoryLength <= left.FlattenedLength ? (int)left._shape._memoryLength : (int)left.FlattenedLength); 7089ReadOnlySpan<T> rspan = MemoryMarshal.CreateSpan(ref right._reference, right._shape._memoryLength <= right.FlattenedLength ? (int)right._shape._memoryLength : (int)right.FlattenedLength); 7090Span<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);