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