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)
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 (85)
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); 3518Span<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 3524T variance = sum / T.CreateChecked(x._shape._memoryLength); 3745return new TensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape._memoryLength); 3782return new ReadOnlyTensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape._memoryLength); 4705Span<T> values = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._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); 5237ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 5250ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6016ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6017Span<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); 6320if (destination._shape._memoryLength < x._shape._memoryLength) 6323ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6324Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6370if (destination._shape._memoryLength < x._shape._memoryLength) 6373ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6374Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6397if (destination._shape._memoryLength < x._shape._memoryLength) 6400ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6401Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6424if (destination._shape._memoryLength < x._shape._memoryLength) 6427ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape._memoryLength); 6428Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 6921if (destination._shape._memoryLength < input._shape.FlattenedLength) 6974if (destination._shape._memoryLength < input._shape.FlattenedLength) 7026if (destination._shape._memoryLength < input._shape.FlattenedLength) 7037inputSpan = MemoryMarshal.CreateSpan(ref input._reference, (int)input._shape._memoryLength); 7038destinationSpan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape._memoryLength); 7086ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref left._reference, left._shape._memoryLength <= left.FlattenedLength ? (int)left._shape._memoryLength : (int)left.FlattenedLength); 7087ReadOnlySpan<T> rspan = MemoryMarshal.CreateSpan(ref right._reference, right._shape._memoryLength <= right.FlattenedLength ? (int)right._shape._memoryLength : (int)right.FlattenedLength); 7088Span<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);