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)
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 (85)
149
return new TensorSpan<T>(ref input._reference, shape, input.Strides, input._shape.
_memoryLength
);
175
TensorSpan<T> output = new TensorSpan<T>(ref input._reference, shape, strides, input._shape.
_memoryLength
);
192
return new TensorSpan<T>(ref input._reference, shape, input.Strides, input._shape.
_memoryLength
);
218
TensorSpan<T> output = new TensorSpan<T>(ref input._reference, shape, strides, input._shape.
_memoryLength
);
765
Span<T> srcSpan = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape.
_memoryLength
);
766
Span<bool> filterSpan = MemoryMarshal.CreateSpan(ref filter._reference, (int)tensor._shape.
_memoryLength
);
793
Span<T> dstSpan = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape.
_memoryLength
);
794
Span<bool> filterSpan = MemoryMarshal.CreateSpan(ref filter._reference, (int)tensor._shape.
_memoryLength
);
795
Span<T> valuesSpan = MemoryMarshal.CreateSpan(ref values._reference, (int)values._shape.
_memoryLength
);
2858
TensorSpan<T> output = new TensorSpan<T>(ref tensor._reference, arrLengths, strides, tensor._shape.
_memoryLength
);
2927
ReadOnlyTensorSpan<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, arrLengths, strides, tensor._shape.
_memoryLength
);
2963
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
2964
if (destination._shape.
_memoryLength
> tensor._values.Length)
2967
TensorSpanHelpers.Memmove(ospan, span, destination._shape.
_memoryLength
);
2978
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape.
_memoryLength
);
2979
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
2980
if (destination._shape.
_memoryLength
> tensor._shape.
_memoryLength
)
2981
TensorSpanHelpers.Memmove(ospan, span, tensor._shape.
_memoryLength
);
2983
TensorSpanHelpers.Memmove(ospan, span, destination._shape.
_memoryLength
);
2994
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape.
_memoryLength
);
2995
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
2996
if (destination._shape.
_memoryLength
> tensor._shape.
_memoryLength
)
2997
TensorSpanHelpers.Memmove(ospan, span, tensor._shape.
_memoryLength
);
2999
TensorSpanHelpers.Memmove(ospan, span, destination._shape.
_memoryLength
);
3051
nint index = tensor._shape.
_memoryLength
- 1;
3052
Span<T> inputSpan = MemoryMarshal.CreateSpan(ref tensor._reference, (int)tensor._shape.
_memoryLength
);
3053
Span<T> outputSpan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
3054
for (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
));
3372
return new TensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape.
_memoryLength
);
3428
return new ReadOnlyTensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape.
_memoryLength
);
3518
Span<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
3524
T variance = sum / T.CreateChecked(x._shape.
_memoryLength
);
3745
return new TensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape.
_memoryLength
);
3782
return new ReadOnlyTensorSpan<T>(ref tensor._reference, lengths, strides, tensor._shape.
_memoryLength
);
4705
Span<T> values = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
5215
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
5226
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
5237
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
5250
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
6016
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
6017
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
);
6320
if (destination._shape.
_memoryLength
< x._shape.
_memoryLength
)
6323
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
6324
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
6370
if (destination._shape.
_memoryLength
< x._shape.
_memoryLength
)
6373
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
6374
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
6397
if (destination._shape.
_memoryLength
< x._shape.
_memoryLength
)
6400
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
6401
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
6424
if (destination._shape.
_memoryLength
< x._shape.
_memoryLength
)
6427
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref x._reference, (int)x._shape.
_memoryLength
);
6428
Span<T> ospan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
6921
if (destination._shape.
_memoryLength
< input._shape.FlattenedLength)
6974
if (destination._shape.
_memoryLength
< input._shape.FlattenedLength)
7026
if (destination._shape.
_memoryLength
< input._shape.FlattenedLength)
7037
inputSpan = MemoryMarshal.CreateSpan(ref input._reference, (int)input._shape.
_memoryLength
);
7038
destinationSpan = MemoryMarshal.CreateSpan(ref destination._reference, (int)destination._shape.
_memoryLength
);
7086
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref left._reference, left._shape.
_memoryLength
<= left.FlattenedLength ? (int)left._shape.
_memoryLength
: (int)left.FlattenedLength);
7087
ReadOnlySpan<T> rspan = MemoryMarshal.CreateSpan(ref right._reference, right._shape.
_memoryLength
<= right.FlattenedLength ? (int)right._shape.
_memoryLength
: (int)right.FlattenedLength);
7088
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);