3 writes to _values
System.Numerics.Tensors (3)
System\Numerics\Tensors\netcore\Tensor.cs (3)
45
_values
= [];
61
_values
= [];
86
_values
= values;
21 references to _values
System.Numerics.Tensors (21)
System\Numerics\Tensors\netcore\Tensor.cs (6)
352
Span<T> srcSpan =
_values
;
353
Span<bool> filterSpan = filter.
_values
;
379
public static implicit operator TensorSpan<T>(Tensor<T> value) => new TensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(value.
_values
), value._lengths, value._strides, value._flattenedLength);
384
public static implicit operator ReadOnlyTensorSpan<T>(Tensor<T> value) => new ReadOnlyTensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(value.
_values
), value._lengths, value._strides, value.FlattenedLength);
390
public TensorSpan<T> AsTensorSpan() => new TensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(
_values
), _lengths, _strides, _flattenedLength);
417
public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(
_values
), _lengths, _strides, _flattenedLength);
System\Numerics\Tensors\netcore\TensorExtensions.cs (13)
87
intermediate.FlattenTo(MemoryMarshal.CreateSpan(ref output.
_values
[0], (int)output.FlattenedLength));
236
return new Tensor<T>(input.
_values
, lengths, false);
262
Tensor<T> output = new Tensor<T>(input.
_values
, lengths, strides);
2789
return new Tensor<T>(tensor.
_values
, arrLengths, strides);
2945
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref tensor.AsTensorSpan()._reference, (int)tensor.
_values
.Length);
2947
if (newSize > tensor.
_values
.Length)
2948
TensorSpanHelpers.Memmove(ospan, span, tensor.
_values
.Length);
2963
ReadOnlySpan<T> span = MemoryMarshal.CreateSpan(ref tensor.
_values
[0], tensor.
_values
.Length);
2965
if (destination._shape._memoryLength > tensor.
_values
.Length)
2966
TensorSpanHelpers.Memmove(ospan, span, tensor.
_values
.Length);
3317
return new Tensor<T>(tensor.
_values
, lengths, strides);
3678
return new Tensor<T>(tensor.
_values
, lengths, strides);
System\Numerics\Tensors\netcore\TensorHelpers.cs (2)
95
=> tensor1.
_values
.Length == tensor2.
_values
.Length;