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)
315
if (index >= _shape.
_memoryLength
|| index < 0)
338
if (index >= _shape.
_memoryLength
|| index < 0)
446
return new ReadOnlyTensorSpan<T>(ref Unsafe.As<TDerived, T>(ref items._reference), items._shape.Lengths, items._shape.Strides, items._shape.
_memoryLength
);
715
if ((index >= _shape.
_memoryLength
|| index < 0) && flattenedLength != 0)
718
toReturn = new ReadOnlyTensorSpan<T>(ref Unsafe.Add(ref _reference, index), lengths, _shape.Strides, _shape.
_memoryLength
- index);
System\Numerics\Tensors\netcore\Tensor.Factory.cs (3)
191
Span<T> span = MemoryMarshal.CreateSpan<T>(ref destination._reference, (int)destination._shape.
_memoryLength
);
193
GaussianDistribution<T>(span, destination._shape.
_memoryLength
, random ?? Random.Shared);
208
Span<T> span = MemoryMarshal.CreateSpan<T>(ref destination._reference, (int)destination._shape.
_memoryLength
);
System\Numerics\Tensors\netcore\TensorExtensions.cs (85)
150
return new TensorSpan<T>(ref input._reference, shape, input.Strides, input._shape.
_memoryLength
);
176
TensorSpan<T> output = new TensorSpan<T>(ref input._reference, shape, strides, input._shape.
_memoryLength
);
193
return new TensorSpan<T>(ref input._reference, shape, input.Strides, input._shape.
_memoryLength
);
219
TensorSpan<T> output = new TensorSpan<T>(ref input._reference, shape, strides, input._shape.
_memoryLength
);
766
Span<T> srcSpan = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape.
_memoryLength
);
767
Span<bool> filterSpan = MemoryMarshal.CreateSpan(ref filter._reference, (int)tensor._shape.
_memoryLength
);
794
Span<T> dstSpan = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape.
_memoryLength
);
795
Span<bool> filterSpan = MemoryMarshal.CreateSpan(ref filter._reference, (int)tensor._shape.
_memoryLength
);
796
Span<T> valuesSpan = MemoryMarshal.CreateSpan(ref values._reference, (int)values._shape.
_memoryLength
);
2859
TensorSpan<T> output = new TensorSpan<T>(ref tensor._reference, arrLengths, strides, tensor._shape.
_memoryLength
);
2928
ReadOnlyTensorSpan<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, arrLengths, strides, tensor._shape.
_memoryLength
);
2964
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
2965
if (destination._shape.
_memoryLength
> tensor._values.Length)
2968
TensorSpanHelpers.Memmove(ospan, span, destination._shape.
_memoryLength
);
2979
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape.
_memoryLength
);
2980
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
2981
if (destination._shape.
_memoryLength
> tensor._shape.
_memoryLength
)
2982
TensorSpanHelpers.Memmove(ospan, span, tensor._shape.
_memoryLength
);
2984
TensorSpanHelpers.Memmove(ospan, span, destination._shape.
_memoryLength
);
2995
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape.
_memoryLength
);
2996
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
2997
if (destination._shape.
_memoryLength
> tensor._shape.
_memoryLength
)
2998
TensorSpanHelpers.Memmove(ospan, span, tensor._shape.
_memoryLength
);
3000
TensorSpanHelpers.Memmove(ospan, span, destination._shape.
_memoryLength
);
3052
nint index = tensor._shape.
_memoryLength
- 1;
3053
Span<T> inputSpan = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape.
_memoryLength
);
3054
Span<T> outputSpan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
3055
for (int i = 0; i <= tensor._shape.
_memoryLength
/ 2; i++)
3123
&& tensor._shape.
_memoryLength
== other._shape.
_memoryLength
3125
&& MemoryMarshal.CreateReadOnlySpan(in tensor.GetPinnableReference(), (int)tensor._shape.
_memoryLength
).SequenceEqual(MemoryMarshal.CreateReadOnlySpan(in other.GetPinnableReference(), (int)other._shape.
_memoryLength
));
3135
&& tensor._shape.
_memoryLength
== other._shape.
_memoryLength
3137
&& MemoryMarshal.CreateReadOnlySpan(in tensor.GetPinnableReference(), (int)tensor._shape.
_memoryLength
).SequenceEqual(MemoryMarshal.CreateReadOnlySpan(in other.GetPinnableReference(), (int)other._shape.
_memoryLength
));
3373
return new TensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape.
_memoryLength
);
3429
return new ReadOnlyTensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape.
_memoryLength
);
3519
Span<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
3525
return T.CreateChecked(sum / T.CreateChecked(x._shape.
_memoryLength
));
3702
return new TensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape.
_memoryLength
);
3726
return new ReadOnlyTensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape.
_memoryLength
);
4649
Span<T> values = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
5159
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
5170
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
5181
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
5194
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
5960
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
5961
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
6202
if (destination._shape.
_memoryLength
< x._shape.
_memoryLength
)
6205
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
6206
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
6233
if (destination._shape.
_memoryLength
< x._shape.
_memoryLength
)
6236
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
6237
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
6264
if (destination._shape.
_memoryLength
< x._shape.
_memoryLength
)
6267
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
6268
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
6314
if (destination._shape.
_memoryLength
< x._shape.
_memoryLength
)
6317
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
6318
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
6341
if (destination._shape.
_memoryLength
< x._shape.
_memoryLength
)
6344
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
6345
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
6368
if (destination._shape.
_memoryLength
< x._shape.
_memoryLength
)
6371
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
6372
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
6865
if (destination._shape.
_memoryLength
< input._shape.FlattenedLength)
6918
if (destination._shape.
_memoryLength
< input._shape.FlattenedLength)
6970
if (destination._shape.
_memoryLength
< input._shape.FlattenedLength)
6981
inputSpan = MemoryMarshal.CreateSpan(ref input._reference, (int)input._shape.
_memoryLength
);
6982
destinationSpan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
7030
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref left._reference, left._shape.
_memoryLength
<= left.FlattenedLength ? (int)left._shape.
_memoryLength
: (int)left.FlattenedLength);
7031
ReadOnlySpan<T> rspan = MemoryMarshal.CreateSpan(ref right._reference, right._shape.
_memoryLength
<= right.FlattenedLength ? (int)right._shape.
_memoryLength
: (int)right.FlattenedLength);
7032
Span<T> ospan = MemoryMarshal.CreateSpan(ref slicedDestination._reference, (int)slicedDestination._shape.
_memoryLength
);
System\Numerics\Tensors\netcore\TensorHelpers.cs (3)
22
Span<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)
319
if (index >= _shape.
_memoryLength
|| index < 0)
344
if (index >= _shape.
_memoryLength
|| index < 0)
537
MemoryMarshal.CreateSpan<T>(ref _reference, (int)_shape.
_memoryLength
).Fill(value);
658
new ReadOnlyTensorSpan<T>(ref span._reference, span._shape.Lengths, span._shape.Strides, span._shape.
_memoryLength
);
752
if ((index >= _shape.
_memoryLength
|| index < 0) && flattenedLength != 0)
755
toReturn = new TensorSpan<T>(ref Unsafe.Add(ref _reference, index), lengths, _shape.Strides, _shape.
_memoryLength
- index);