22 instantiations of TensorSpan
System.Numerics.Tensors (22)
System\Numerics\Tensors\netcore\Tensor_1.cs (1)
152
public TensorSpan<T> AsTensorSpan() => new
TensorSpan
<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_values), _start), in _shape);
System\Numerics\Tensors\netcore\Tensor.cs (13)
34
/// <inheritdoc cref="TensorSpan{T}.
TensorSpan
(T[])" />
36
=> new
TensorSpan
<T>(array);
38
/// <inheritdoc cref="TensorSpan{T}.
TensorSpan
(T[], ReadOnlySpan{nint})" />
40
=> new
TensorSpan
<T>(array, lengths);
42
/// <inheritdoc cref="TensorSpan{T}.
TensorSpan
(T[], ReadOnlySpan{nint} , ReadOnlySpan{nint})" />
44
=> new
TensorSpan
<T>(array, lengths, strides);
46
/// <inheritdoc cref="TensorSpan{T}.
TensorSpan
(T[], int, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
47
public static TensorSpan<T> AsTensorSpan<T>(this T[]? array, int start, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides) => new
TensorSpan
<T>(array, start, lengths, strides);
294
alignedTarget = new
TensorSpan
<T>(ref destination._reference, TensorShape.WithRank(destination._shape, rank));
1749
TensorSpan<T> result = new
TensorSpan
<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, strides, tensor.IsPinned);
2601
TensorSpan<T> output = new
TensorSpan
<T>(ref tensor._reference, tensor._shape.LinearLength, lengths[..rank], strides[..rank], tensor.IsPinned);
2794
alignedTarget = new
TensorSpan
<T>(ref destination._reference, TensorShape.WithRank(destination._shape, rank + 1));
3132
TensorSpan<T> output = new
TensorSpan
<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, newStrides, tensor.IsPinned);
System\Numerics\Tensors\netcore\TensorDimensionSpan_1.cs (2)
24
tensor = new
TensorSpan
<T>(ref tensor._reference, TensorShape.Normalize(tensor._shape));
60
return new
TensorSpan
<T>(ref Unsafe.Add(ref _tensor._reference, linearOffset), _sliceShape);
System\Numerics\Tensors\netcore\TensorOperation.cs (1)
946
if (TryCopyDenseSlices(optimizedSource, new
TensorSpan
<TArg>(ref destinationReference, destination._shape), destination.FlattenedLength))
System\Numerics\Tensors\netcore\TensorSpan_1.cs (4)
206
public static implicit operator TensorSpan<T>(T[]? array) => new
TensorSpan
<T>(array);
302
return new
TensorSpan
<T>(
312
return new
TensorSpan
<T>(
322
return new
TensorSpan
<T>(
System\Runtime\InteropServices\TensorMarshal.cs (1)
23
return new
TensorSpan
<T>(ref Unsafe.AsRef(ref data), dataLength, lengths, strides, pinned);
591 references to TensorSpan
System.Numerics.Tensors (591)
System\Numerics\Tensors\netcore\IReadOnlyTensor_1.cs (2)
54
void CopyTo(scoped in
TensorSpan
<T> destination);
118
bool TryCopyTo(scoped in
TensorSpan
<T> destination);
System\Numerics\Tensors\netcore\ITensor_1.cs (4)
70
TensorSpan
<T> AsTensorSpan();
75
TensorSpan
<T> AsTensorSpan(params scoped ReadOnlySpan<nint> startIndexes);
78
TensorSpan
<T> AsTensorSpan(params scoped ReadOnlySpan<NIndex> startIndexes);
83
TensorSpan
<T> AsTensorSpan(params scoped ReadOnlySpan<NRange> ranges);
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan_1.cs (4)
335
/// <inheritdoc cref="IReadOnlyTensor{TSelf, T}.CopyTo(in
TensorSpan
{T})" />
336
public void CopyTo(scoped in
TensorSpan
<T> destination)
453
/// <inheritdoc cref="IReadOnlyTensor{TSelf, T}.TryCopyTo(in
TensorSpan
{T})" />
454
public bool TryCopyTo(scoped in
TensorSpan
<T> destination)
System\Numerics\Tensors\netcore\Tensor_1.cs (14)
83
/// <inheritdoc cref="
TensorSpan
{T}.this[ReadOnlySpan{nint}]" />
89
/// <inheritdoc cref="
TensorSpan
{T}.this[ReadOnlySpan{NIndex}]" />
95
/// <inheritdoc cref="
TensorSpan
{T}.this[ReadOnlySpan{NRange}]" />
134
public static implicit operator
TensorSpan
<T>(Tensor<T> tensor) => tensor.AsTensorSpan();
136
/// <inheritdoc cref="
TensorSpan
{T}.implicit operator ReadOnlyTensorSpan{T}(in
TensorSpan
{T})" />
152
public
TensorSpan
<T> AsTensorSpan() => new TensorSpan<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_values), _start), in _shape);
155
public
TensorSpan
<T> AsTensorSpan(params scoped ReadOnlySpan<nint> startIndexes) => AsTensorSpan().Slice(startIndexes);
158
public
TensorSpan
<T> AsTensorSpan(params scoped ReadOnlySpan<NIndex> startIndexes) => AsTensorSpan().Slice(startIndexes);
161
public
TensorSpan
<T> AsTensorSpan(params scoped ReadOnlySpan<NRange> ranges) => AsTensorSpan().Slice(ranges);
166
/// <inheritdoc cref="IReadOnlyTensor{TSelf, T}.CopyTo(in
TensorSpan
{T})" />
167
public void CopyTo(scoped in
TensorSpan
<T> destination)
279
/// <inheritdoc cref="IReadOnlyTensor{TSelf, T}.TryCopyTo(in
TensorSpan
{T})" />
280
public bool TryCopyTo(scoped in
TensorSpan
<T> destination) => AsReadOnlyTensorSpan().TryCopyTo(destination);
System\Numerics\Tensors\netcore\Tensor.cs (362)
34
/// <inheritdoc cref="
TensorSpan
{T}.TensorSpan(T[])" />
35
public static
TensorSpan
<T> AsTensorSpan<T>(this T[]? array)
38
/// <inheritdoc cref="
TensorSpan
{T}.TensorSpan(T[], ReadOnlySpan{nint})" />
39
public static
TensorSpan
<T> AsTensorSpan<T>(this T[]? array, scoped ReadOnlySpan<nint> lengths)
42
/// <inheritdoc cref="
TensorSpan
{T}.TensorSpan(T[], ReadOnlySpan{nint} , ReadOnlySpan{nint})" />
43
public static
TensorSpan
<T> AsTensorSpan<T>(this T[]? array, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
46
/// <inheritdoc cref="
TensorSpan
{T}.TensorSpan(T[], int, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
47
public static
TensorSpan
<T> AsTensorSpan<T>(this T[]? array, int start, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides) => new TensorSpan<T>(array, start, lengths, strides);
83
/// <param name="source">Input <see cref="
TensorSpan
{T}"/>.</param>
85
public static void BroadcastTo<T>(this Tensor<T> source, in
TensorSpan
<T> destination)
93
/// <param name="source">Input <see cref="
TensorSpan
{T}"/>.</param>
94
/// <param name="destination">Other <see cref="
TensorSpan
{T}"/> to make shapes broadcastable.</param>
95
public static void BroadcastTo<T>(in this
TensorSpan
<T> source, in
TensorSpan
<T> destination)
103
/// <param name="source">Input <see cref="
TensorSpan
{T}"/>.</param>
105
public static void BroadcastTo<T>(in this ReadOnlyTensorSpan<T> source, in
TensorSpan
<T> destination)
176
public static ref readonly
TensorSpan
<T> Concatenate<T>(scoped ReadOnlySpan<Tensor<T>> tensors, in
TensorSpan
<T> destination)
188
public static ref readonly
TensorSpan
<T> ConcatenateOnDimension<T>(int dimension, scoped ReadOnlySpan<Tensor<T>> tensors, in
TensorSpan
<T> destination)
229
in
TensorSpan
<T> destination)
258
private static void ValidateConcatenationStorage<T>(scoped ReadOnlySpan<Tensor<T>> tensors, in
TensorSpan
<T> destination)
282
in
TensorSpan
<T> destination, int rank)
290
TensorSpan
<T> alignedTarget;
291
scoped ref readonly
TensorSpan
<T> target = ref destination;
361
in
TensorSpan
<T> destination, bool stack = false)
417
private static void CopyFlattenedToDestination<T>(in ReadOnlyTensorSpan<T> source, in
TensorSpan
<T> destination, nint offset)
433
private static void ConcatenateOnDimensionToSpan<T>(int dimension, scoped ReadOnlySpan<Tensor<T>> tensors, in
TensorSpan
<T> destination, Span<T> dstSpan)
526
/// Fills the given <see cref="
TensorSpan
{T}"/> with random data in a Gaussian normal distribution. <see cref="Random"/>
530
/// <param name="destination">The destination <see cref="
TensorSpan
{T}"/> where the data will be stored.</param>
533
public static ref readonly
TensorSpan
<T> FillGaussianNormalDistribution<T>(in
TensorSpan
<T> destination, Random? random = null) where T : IFloatingPoint<T>
564
TensorSpan
<T> slice = slices[i];
576
TensorSpan
<T>.Enumerator enumerator = destination.GetEnumerator();
590
/// Fills the given <see cref="
TensorSpan
{T}"/> with random data in a uniform distribution. <see cref="Random"/>
594
/// <param name="destination">The destination <see cref="
TensorSpan
{T}"/> where the data will be stored.</param>
597
public static ref readonly
TensorSpan
<T> FillUniformDistribution<T>(in
TensorSpan
<T> destination, Random? random = null) where T : IFloatingPoint<T>
625
TensorSpan
<T> slice = slices[i];
635
TensorSpan
<T>.Enumerator enumerator = destination.GetEnumerator();
650
/// before they are compared. It returns a <see cref="
TensorSpan
{Boolean}"/> where the value is true if the elements are equal and false if they are not."/>
654
/// <returns>A <see cref="
TensorSpan
{Boolean}"/> where the value is true if the elements are equal and false if they are not.</returns>
665
/// before they are compared. It returns a <see cref="
TensorSpan
{Boolean}"/> where the value is true if the elements are equal and false if they are not."/>
670
/// <returns>A <see cref="
TensorSpan
{Boolean}"/> where the value is true if the elements are equal and false if they are not.</returns>
671
public static ref readonly
TensorSpan
<bool> Equals<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<bool> destination)
681
/// before they are compared. It returns a <see cref="
TensorSpan
{Boolean}"/> where the value is true if the elements are equal and false if they are not."/>
685
/// <returns>A <see cref="
TensorSpan
{Boolean}"/> where the value is true if the elements are equal and false if they are not.</returns>
696
/// before they are compared. It returns a <see cref="
TensorSpan
{Boolean}"/> where the value is true if the elements are equal and false if they are not."/>
701
/// <returns>A <see cref="
TensorSpan
{Boolean}"/> where the value is true if the elements are equal and false if they are not.</returns>
702
public static ref readonly
TensorSpan
<bool> Equals<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<bool> destination)
778
public static ref readonly
TensorSpan
<T> FilteredUpdate<T>(in this
TensorSpan
<T> tensor, scoped in ReadOnlyTensorSpan<bool> filter, T value)
792
public static ref readonly
TensorSpan
<T> FilteredUpdate<T>(in this
TensorSpan
<T> tensor, scoped in ReadOnlyTensorSpan<bool> filter, scoped in ReadOnlyTensorSpan<T> values)
830
public static ref readonly
TensorSpan
<bool> GreaterThan<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<bool> destination)
865
public static ref readonly
TensorSpan
<bool> GreaterThan<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<bool> destination)
895
public static ref readonly
TensorSpan
<bool> GreaterThan<T>(T x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<bool> destination)
1011
public static ref readonly
TensorSpan
<bool> GreaterThanOrEqual<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<bool> destination)
1046
public static ref readonly
TensorSpan
<bool> GreaterThanOrEqual<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<bool> destination)
1076
public static ref readonly
TensorSpan
<bool> GreaterThanOrEqual<T>(T x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<bool> destination)
1192
public static ref readonly
TensorSpan
<bool> LessThan<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<bool> destination)
1227
public static ref readonly
TensorSpan
<bool> LessThan<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<bool> destination)
1257
public static ref readonly
TensorSpan
<bool> LessThan<T>(T x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<bool> destination)
1373
public static ref readonly
TensorSpan
<bool> LessThanOrEqual<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<bool> destination)
1408
public static ref readonly
TensorSpan
<bool> LessThanOrEqual<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<bool> destination)
1438
public static ref readonly
TensorSpan
<bool> LessThanOrEqual<T>(T x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<bool> destination)
1703
TensorSpan
<T> reshaped = tensor.AsTensorSpan().Reshape(lengths);
1729
/// <param name="tensor"><see cref="
TensorSpan
{T}"/> you want to reshape.</param>
1731
public static
TensorSpan
<T> Reshape<T>(this scoped in
TensorSpan
<T> tensor, scoped ReadOnlySpan<nint> lengths)
1749
TensorSpan
<T> result = new TensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, strides, tensor.IsPinned);
1761
/// <param name="tensor"><see cref="
TensorSpan
{T}"/> you want to reshape.</param>
1841
/// <param name="destination">Destination <see cref="
TensorSpan
{T}"/> with the desired new shape.</param>
1842
public static void ResizeTo<T>(scoped in Tensor<T> tensor, in
TensorSpan
<T> destination)
1851
/// <param name="tensor">Input <see cref="
TensorSpan
{T}"/>.</param>
1852
/// <param name="destination">Destination <see cref="
TensorSpan
{T}"/> with the desired new shape.</param>
1853
public static void ResizeTo<T>(scoped in
TensorSpan
<T> tensor, in
TensorSpan
<T> destination)
1863
/// <param name="destination">Destination <see cref="
TensorSpan
{T}"/> with the desired new shape.</param>
1864
public static void ResizeTo<T>(scoped in ReadOnlyTensorSpan<T> tensor, in
TensorSpan
<T> destination)
1899
TensorSpan
<T>.Enumerator dstEnumerator = destination.GetEnumerator();
1918
private static void ResizeToLargeDenseDestination<T>(in ReadOnlyTensorSpan<T> source, in
TensorSpan
<T> destination)
1928
private static bool TryClearDenseSlices<T>(in
TensorSpan
<T> destination, nint start)
1949
private static void ClearDenseTail<T>(in
TensorSpan
<T> destination, nint start)
1967
private static void ClearResizeTail<T>(in
TensorSpan
<T> destination, nint start)
2019
/// <param name="tensor">Input <see cref="
TensorSpan
{T}"/>.</param>
2021
public static ref readonly
TensorSpan
<T> Reverse<T>(scoped in ReadOnlyTensorSpan<T> tensor, in
TensorSpan
<T> destination)
2030
/// <param name="tensor">Input <see cref="
TensorSpan
{T}"/>.</param>
2033
public static ref readonly
TensorSpan
<T> ReverseDimension<T>(scoped in ReadOnlyTensorSpan<T> tensor, in
TensorSpan
<T> destination, int dimension)
2067
private static void ReverseDimensionInPlace<T>(in
TensorSpan
<T> tensor, int dimension)
2102
private static void ReverseDimensionInPlaceScalar<T>(in
TensorSpan
<T> tensor, nint axisLength, nint innerLength, nint blockLength)
2120
private static void ReverseDimensionInPlaceChunks<T>(in
TensorSpan
<T> tensor, nint axisLength, nint innerLength, nint blockLength)
2170
private static void ReverseDimensionCore<T>(scoped in ReadOnlyTensorSpan<T> tensor, in
TensorSpan
<T> destination, int dimension)
2231
private static void FillLargeDenseRandom<T>(in
TensorSpan
<T> destination, Random random, bool gaussian) where T : IFloatingPoint<T>
2262
public static bool SequenceEqual<T>(this scoped in
TensorSpan
<T> tensor, scoped in ReadOnlyTensorSpan<T> other)
2380
public static ref readonly
TensorSpan
<T> SetSlice<T>(this in
TensorSpan
<T> tensor, scoped in ReadOnlyTensorSpan<T> values, params scoped ReadOnlySpan<NRange> ranges)
2533
/// <param name="tensor">The <see cref="
TensorSpan
{T}"/> to remove all dimensions of length 1.</param>
2534
public static
TensorSpan
<T> Squeeze<T>(this scoped in
TensorSpan
<T> tensor)
2543
/// <param name="tensor">The <see cref="
TensorSpan
{T}"/> to remove dimension of length 1.</param>
2545
public static
TensorSpan
<T> SqueezeDimension<T>(this scoped in
TensorSpan
<T> tensor, int dimension)
2601
TensorSpan
<T> output = new TensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, lengths[..rank], strides[..rank], tensor.IsPinned);
2727
public static ref readonly
TensorSpan
<T> Stack<T>(scoped in ReadOnlySpan<Tensor<T>> tensors, in
TensorSpan
<T> destination)
2739
public static ref readonly
TensorSpan
<T> StackAlongDimension<T>(scoped ReadOnlySpan<Tensor<T>> tensors, in
TensorSpan
<T> destination, int dimension)
2783
in
TensorSpan
<T> destination, int rank)
2790
TensorSpan
<T> alignedTarget;
2791
scoped ref readonly
TensorSpan
<T> target = ref destination;
2809
TensorSpan
<T> slice = target.Slice(ranges).SqueezeDimension(dimension);
3007
/// <param name="destination">Destination <see cref="
TensorSpan
{T}"/>.</param>
3008
public static bool TryBroadcastTo<T>(this Tensor<T> tensor, in
TensorSpan
<T> destination)
3017
/// <param name="tensor">Input <see cref="
TensorSpan
{T}"/>.</param>
3018
/// <param name="destination">Destination <see cref="
TensorSpan
{T}"/>.</param>
3019
public static bool TryBroadcastTo<T>(in this
TensorSpan
<T> tensor, in
TensorSpan
<T> destination)
3029
/// <param name="destination">Destination <see cref="
TensorSpan
{T}"/>.</param>
3030
public static bool TryBroadcastTo<T>(in this ReadOnlyTensorSpan<T> tensor, in
TensorSpan
<T> destination)
3052
TensorSpan
<T> unsqueezed = tensor.AsTensorSpan().Unsqueeze(dimension);
3096
/// <param name="tensor">The <see cref="
TensorSpan
{T}"/> to add a dimension of length 1.</param>
3098
public static
TensorSpan
<T> Unsqueeze<T>(this scoped in
TensorSpan
<T> tensor, int dimension)
3132
TensorSpan
<T> output = new TensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, newStrides, tensor.IsPinned);
3199
/// Takes the absolute value of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3201
/// <param name="x">The <see cref="
TensorSpan
{T}"/> to take the abs of.</param>
3202
/// <param name="destination">The <see cref="
TensorSpan
{T}"/> destination.</param>
3203
public static ref readonly
TensorSpan
<T> Abs<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
3228
/// <param name="x">The <see cref="
TensorSpan
{T}"/> to take the sin of.</param>
3230
public static ref readonly
TensorSpan
<T> Acos<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
3253
/// Takes the inverse hyperbolic cosine of each element of the <see cref="
TensorSpan
{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3255
/// <param name="x">The <see cref="
TensorSpan
{T}"/> to take the sin of.</param>
3257
public static ref readonly
TensorSpan
<T> Acosh<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
3280
/// Takes the inverse hyperbolic cosine divided by pi of each element of the <see cref="
TensorSpan
{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3284
public static ref readonly
TensorSpan
<T> AcosPi<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
3307
/// Takes the inverse sin of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3311
public static ref readonly
TensorSpan
<T> Asin<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
3334
/// Takes the inverse hyperbolic sine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3338
public static ref readonly
TensorSpan
<T> Asinh<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
3361
/// Takes the inverse hyperbolic sine divided by pi of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3365
public static ref readonly
TensorSpan
<T> AsinPi<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
3388
/// Takes the arc tangent of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3392
public static ref readonly
TensorSpan
<T> Atan<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
3416
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3421
public static ref readonly
TensorSpan
<T> Atan2<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
3443
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3448
public static ref readonly
TensorSpan
<T> Atan2<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
3470
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3475
public static ref readonly
TensorSpan
<T> Atan2<T>(T x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
3499
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/>, divides each element by pi, and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3504
public static ref readonly
TensorSpan
<T> Atan2Pi<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
3513
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/>, divides each element by pi, and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3526
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/>, divides each element by pi, and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3531
public static ref readonly
TensorSpan
<T> Atan2Pi<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
3540
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/>, divides each element by pi, and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3553
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/>, divides each element by pi, and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3558
public static ref readonly
TensorSpan
<T> Atan2Pi<T>(T x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
3581
/// Takes the inverse hyperbolic tangent of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3585
public static ref readonly
TensorSpan
<T> Atanh<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
3608
/// Takes the inverse hyperbolic tangent divided by pi of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3612
public static ref readonly
TensorSpan
<T> AtanPi<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
3625
/// <param name="x">The <see cref="
TensorSpan
{T}"/> to take the mean of.</param>
3652
/// Computes the element-wise cube root of the input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3656
public static ref readonly
TensorSpan
<T> Cbrt<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
3679
/// Computes the element-wise ceiling of the input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3683
public static ref readonly
TensorSpan
<T> Ceiling<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
3708
/// Copies <paramref name="source"/> to a new <see cref="
TensorSpan
{TTo}"/> converting each <typeparamref name="TFrom"/>
3711
/// <param name="source">The input <see cref="
TensorSpan
{TFrom}"/>.</param>
3713
public static ref readonly
TensorSpan
<TTo> ConvertChecked<TFrom, TTo>(scoped in ReadOnlyTensorSpan<TFrom> source, in
TensorSpan
<TTo> destination)
3739
/// Copies <paramref name="source"/> to a new <see cref="
TensorSpan
{TTo}"/> converting each <typeparamref name="TFrom"/>
3742
/// <param name="source">The input <see cref="
TensorSpan
{TFrom}"/>.</param>
3744
public static ref readonly
TensorSpan
<TTo> ConvertSaturating<TFrom, TTo>(scoped in ReadOnlyTensorSpan<TFrom> source, in
TensorSpan
<TTo> destination)
3770
/// Copies <paramref name="source"/> to a new <see cref="
TensorSpan
{TTo}"/> converting each <typeparamref name="TFrom"/>
3773
/// <param name="source">The input <see cref="
TensorSpan
{TFrom}"/>.</param>
3775
public static ref readonly
TensorSpan
<TTo> ConvertTruncating<TFrom, TTo>(scoped in ReadOnlyTensorSpan<TFrom> source, in
TensorSpan
<TTo> destination)
3818
public static ref readonly
TensorSpan
<T> CopySign<T>(scoped in ReadOnlyTensorSpan<T> x, T sign, in
TensorSpan
<T> destination)
3827
/// Computes the element-wise result of copying the sign from one number to another number in the specified tensors and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3832
public static ref readonly
TensorSpan
<T> CopySign<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> sign, in
TensorSpan
<T> destination)
3855
/// Takes the cosine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3859
public static ref readonly
TensorSpan
<T> Cos<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
3882
/// Takes the hyperbolic cosine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
3886
public static ref readonly
TensorSpan
<T> Cosh<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
3934
/// <summary>Computes the element-wise cosine of the value in the specified tensor that has been multiplied by Pi and returns a new <see cref="
TensorSpan
{T}"/> with the results.</summary>
3949
public static ref readonly
TensorSpan
<T> CosPi<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
3976
public static ref readonly
TensorSpan
<T> DegreesToRadians<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
4035
public static ref readonly
TensorSpan
<T> Exp<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
4062
public static ref readonly
TensorSpan
<T> Exp10<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
4085
public static ref readonly
TensorSpan
<T> Exp10M1<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
4108
public static ref readonly
TensorSpan
<T> Exp2<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
4131
public static ref readonly
TensorSpan
<T> Exp2M1<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
4154
public static ref readonly
TensorSpan
<T> ExpM1<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
4177
public static ref readonly
TensorSpan
<T> Floor<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
4208
public static ref readonly
TensorSpan
<T> Hypot<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
4235
public static ref readonly
TensorSpan
<T> Ieee754Remainder<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
4258
public static ref readonly
TensorSpan
<T> Ieee754Remainder<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
4281
public static ref readonly
TensorSpan
<T> Ieee754Remainder<T>(T x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
4304
public static ref readonly
TensorSpan
<int> ILogB<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<int> destination)
4374
public static ref readonly
TensorSpan
<T> LeadingZeroCount<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
4397
/// Takes the natural logarithm of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
4401
public static ref readonly
TensorSpan
<T> Log<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
4424
public static ref readonly
TensorSpan
<T> Log<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
4447
public static ref readonly
TensorSpan
<T> Log<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
4470
/// Takes the base 10 logarithm of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
4474
public static ref readonly
TensorSpan
<T> Log10<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
4497
/// Takes the base 10 logarithm plus 1 of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
4501
public static ref readonly
TensorSpan
<T> Log10P1<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
4524
/// Takes the base 2 logarithm of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
4528
public static ref readonly
TensorSpan
<T> Log2<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
4551
/// Takes the base 2 logarithm plus 1 of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
4555
public static ref readonly
TensorSpan
<T> Log2P1<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
4578
/// Takes the natural logarithm plus 1 of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
4582
public static ref readonly
TensorSpan
<T> LogP1<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
4622
public static ref readonly
TensorSpan
<T> Max<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
4645
public static ref readonly
TensorSpan
<T> Max<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
4685
public static ref readonly
TensorSpan
<T> MaxMagnitude<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
4708
public static ref readonly
TensorSpan
<T> MaxMagnitude<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
4748
public static ref readonly
TensorSpan
<T> MaxMagnitudeNumber<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
4771
public static ref readonly
TensorSpan
<T> MaxMagnitudeNumber<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
4811
public static ref readonly
TensorSpan
<T> MaxNumber<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
4834
public static ref readonly
TensorSpan
<T> MaxNumber<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
4874
public static ref readonly
TensorSpan
<T> Min<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
4897
public static ref readonly
TensorSpan
<T> Min<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
4937
public static ref readonly
TensorSpan
<T> MinMagnitude<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
4960
public static ref readonly
TensorSpan
<T> MinMagnitude<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
5000
public static ref readonly
TensorSpan
<T> MinMagnitudeNumber<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
5023
public static ref readonly
TensorSpan
<T> MinMagnitudeNumber<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
5063
public static ref readonly
TensorSpan
<T> MinNumber<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
5086
public static ref readonly
TensorSpan
<T> MinNumber<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
5123
public static ref readonly
TensorSpan
<T> PopCount<T>(scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
5148
public static ref readonly
TensorSpan
<T> Pow<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
5171
public static ref readonly
TensorSpan
<T> Pow<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
5194
public static ref readonly
TensorSpan
<T> Pow<T>(T x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
5229
public static ref readonly
TensorSpan
<T> RadiansToDegrees<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
5252
public static ref readonly
TensorSpan
<T> Reciprocal<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
5277
public static ref readonly
TensorSpan
<T> RootN<T>(scoped in ReadOnlyTensorSpan<T> x, int n, in
TensorSpan
<T> destination)
5304
public static ref readonly
TensorSpan
<T> RotateLeft<T>(scoped in ReadOnlyTensorSpan<T> x, int rotateAmount, in
TensorSpan
<T> destination)
5331
public static ref readonly
TensorSpan
<T> RotateRight<T>(scoped in ReadOnlyTensorSpan<T> x, int rotateAmount, in
TensorSpan
<T> destination)
5354
public static ref readonly
TensorSpan
<T> Round<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
5379
public static ref readonly
TensorSpan
<T> Round<T>(scoped in ReadOnlyTensorSpan<T> x, int digits, MidpointRounding mode, in
TensorSpan
<T> destination)
5402
public static ref readonly
TensorSpan
<T> Round<T>(scoped in ReadOnlyTensorSpan<T> x, int digits, in
TensorSpan
<T> destination)
5425
public static ref readonly
TensorSpan
<T> Round<T>(scoped in ReadOnlyTensorSpan<T> x, MidpointRounding mode, in
TensorSpan
<T> destination)
5448
public static ref readonly
TensorSpan
<T> Sigmoid<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
5471
/// Takes the sin of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
5475
public static ref readonly
TensorSpan
<T> Sin<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
5498
public static ref readonly
TensorSpan
<T> Sinh<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
5521
public static ref readonly
TensorSpan
<T> SinPi<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
5547
public static ref readonly
TensorSpan
<T> SoftMax<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
5572
/// Takes the square root of each element of the <paramref name="x"/> and returns a new <see cref="
TensorSpan
{T}"/> with the result.
5576
public static ref readonly
TensorSpan
<T> Sqrt<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
5589
/// <param name="x">The <see cref="
TensorSpan
{T}"/> to take the standard deviation of.</param>
5646
public static ref readonly
TensorSpan
<T> Tan<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
5669
public static ref readonly
TensorSpan
<T> Tanh<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
5692
public static ref readonly
TensorSpan
<T> TanPi<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
5715
public static ref readonly
TensorSpan
<T> TrailingZeroCount<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
5738
public static ref readonly
TensorSpan
<T> Truncate<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
System\Numerics\Tensors\netcore\Tensor.op_Addition.cs (11)
42
public static ref readonly
TensorSpan
<T> Add<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
57
public static ref readonly
TensorSpan
<T> Add<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
102
/// <inheritdoc cref="op_AdditionAssignment{T}(ref
TensorSpan
{T}, in ReadOnlyTensorSpan{T})" />
105
/// <inheritdoc cref="op_AdditionAssignment{T}(ref
TensorSpan
{T}, T)" />
111
extension<TScalar>(ref
TensorSpan
<TScalar> tensor)
115
public static Tensor<TScalar> operator +(in
TensorSpan
<TScalar> left, in
TensorSpan
<TScalar> right) => Add<TScalar>(left, right);
118
public static Tensor<TScalar> operator +(in
TensorSpan
<TScalar> left, TScalar right) => Add(left, right);
121
public static Tensor<TScalar> operator +(TScalar left, in
TensorSpan
<TScalar> right) => Add(right, left);
System\Numerics\Tensors\netcore\Tensor.op_BitwiseAnd.cs (11)
42
public static ref readonly
TensorSpan
<T> BitwiseAnd<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
57
public static ref readonly
TensorSpan
<T> BitwiseAnd<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
102
/// <inheritdoc cref="op_BitwiseAndAssignment{T}(ref
TensorSpan
{T}, in ReadOnlyTensorSpan{T})" />
105
/// <inheritdoc cref="op_BitwiseAndAssignment{T}(ref
TensorSpan
{T}, T)" />
111
extension<TScalar>(ref
TensorSpan
<TScalar> tensor)
115
public static Tensor<TScalar> operator &(in
TensorSpan
<TScalar> left, in
TensorSpan
<TScalar> right) => BitwiseAnd<TScalar>(left, right);
118
public static Tensor<TScalar> operator &(in
TensorSpan
<TScalar> left, TScalar right) => BitwiseAnd(left, right);
121
public static Tensor<TScalar> operator &(TScalar left, in
TensorSpan
<TScalar> right) => BitwiseAnd(right, left);
System\Numerics\Tensors\netcore\Tensor.op_BitwiseOr.cs (11)
42
public static ref readonly
TensorSpan
<T> BitwiseOr<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
57
public static ref readonly
TensorSpan
<T> BitwiseOr<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
102
/// <inheritdoc cref="op_BitwiseOrAssignment{T}(ref
TensorSpan
{T}, in ReadOnlyTensorSpan{T})" />
105
/// <inheritdoc cref="op_BitwiseOrAssignment{T}(ref
TensorSpan
{T}, T)" />
111
extension<TScalar>(ref
TensorSpan
<TScalar> tensor)
115
public static Tensor<TScalar> operator |(in
TensorSpan
<TScalar> left, in
TensorSpan
<TScalar> right) => BitwiseOr<TScalar>(left, right);
118
public static Tensor<TScalar> operator |(in
TensorSpan
<TScalar> left, TScalar right) => BitwiseOr(left, right);
121
public static Tensor<TScalar> operator |(TScalar left, in
TensorSpan
<TScalar> right) => BitwiseOr(right, left);
System\Numerics\Tensors\netcore\Tensor.op_Decrement.cs (4)
26
public static ref readonly
TensorSpan
<T> Decrement<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
39
/// <inheritdoc cref="op_DecrementAssignment{T}(ref
TensorSpan
{T})" />
45
extension<TScalar>(ref
TensorSpan
<TScalar> tensor)
System\Numerics\Tensors\netcore\Tensor.op_Division.cs (13)
55
public static ref readonly
TensorSpan
<T> Divide<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
70
public static ref readonly
TensorSpan
<T> Divide<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
84
public static ref readonly
TensorSpan
<T> Divide<T>(T x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
129
/// <inheritdoc cref="op_DivisionAssignment{T}(ref
TensorSpan
{T}, in ReadOnlyTensorSpan{T})" />
132
/// <inheritdoc cref="op_DivisionAssignment{T}(ref
TensorSpan
{T}, T)" />
138
extension<TScalar>(ref
TensorSpan
<TScalar> tensor)
142
public static Tensor<TScalar> operator /(in
TensorSpan
<TScalar> left, in
TensorSpan
<TScalar> right) => Divide<TScalar>(left, right);
145
public static Tensor<TScalar> operator /(in
TensorSpan
<TScalar> left, TScalar right) => Divide(left, right);
148
public static Tensor<TScalar> operator /(TScalar left, in
TensorSpan
<TScalar> right) => Divide(left, right);
System\Numerics\Tensors\netcore\Tensor.op_ExclusiveOr.cs (11)
42
public static ref readonly
TensorSpan
<T> Xor<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
57
public static ref readonly
TensorSpan
<T> Xor<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
102
/// <inheritdoc cref="op_ExclusiveOrAssignment{T}(ref
TensorSpan
{T}, in ReadOnlyTensorSpan{T})" />
105
/// <inheritdoc cref="op_ExclusiveOrAssignment{T}(ref
TensorSpan
{T}, T)" />
111
extension<TScalar>(ref
TensorSpan
<TScalar> tensor)
115
public static Tensor<TScalar> operator ^(in
TensorSpan
<TScalar> left, in
TensorSpan
<TScalar> right) => Xor<TScalar>(left, right);
118
public static Tensor<TScalar> operator ^(in
TensorSpan
<TScalar> left, TScalar right) => Xor(left, right);
121
public static Tensor<TScalar> operator ^(TScalar left, in
TensorSpan
<TScalar> right) => Xor(right, left);
System\Numerics\Tensors\netcore\Tensor.op_Increment.cs (4)
26
public static ref readonly
TensorSpan
<T> Increment<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
39
/// <inheritdoc cref="op_IncrementAssignment{T}(ref
TensorSpan
{T})" />
45
extension<TScalar>(ref
TensorSpan
<TScalar> tensor)
System\Numerics\Tensors\netcore\Tensor.op_LeftShift.cs (6)
28
public static ref readonly
TensorSpan
<T> ShiftLeft<T>(scoped in ReadOnlyTensorSpan<T> x, int shiftAmount, in
TensorSpan
<T> destination)
60
/// <inheritdoc cref="op_LeftShiftAssignment{T}(ref
TensorSpan
{T}, int)" />
65
extension<TScalar>(
TensorSpan
<TScalar>)
69
public static Tensor<TScalar> operator <<(in
TensorSpan
<TScalar> tensor, int shiftAmount) => ShiftLeft<TScalar>(tensor, shiftAmount);
74
extension<TScalar>(ref
TensorSpan
<TScalar> tensor)
System\Numerics\Tensors\netcore\Tensor.op_Multiply.cs (11)
42
public static ref readonly
TensorSpan
<T> Multiply<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
57
public static ref readonly
TensorSpan
<T> Multiply<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
102
/// <inheritdoc cref="op_MultiplicationAssignment{T}(ref
TensorSpan
{T}, in ReadOnlyTensorSpan{T})" />
105
/// <inheritdoc cref="op_MultiplicationAssignment{T}(ref
TensorSpan
{T}, T)" />
111
extension<TScalar>(ref
TensorSpan
<TScalar> tensor)
115
public static Tensor<TScalar> operator *(in
TensorSpan
<TScalar> left, in
TensorSpan
<TScalar> right) => Multiply<TScalar>(left, right);
118
public static Tensor<TScalar> operator *(in
TensorSpan
<TScalar> left, TScalar right) => Multiply(left, right);
121
public static Tensor<TScalar> operator *(TScalar left, in
TensorSpan
<TScalar> right) => Multiply(right, left);
System\Numerics\Tensors\netcore\Tensor.op_OnesComplement.cs (4)
26
public static ref readonly
TensorSpan
<T> OnesComplement<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
53
extension<TScalar>(
TensorSpan
<TScalar>)
57
public static Tensor<TScalar> operator ~(in
TensorSpan
<TScalar> tensor) => OnesComplement<TScalar>(tensor);
System\Numerics\Tensors\netcore\Tensor.op_RightShift.cs (6)
28
public static ref readonly
TensorSpan
<T> ShiftRightArithmetic<T>(scoped in ReadOnlyTensorSpan<T> x, int shiftAmount, in
TensorSpan
<T> destination)
60
/// <inheritdoc cref="op_RightShiftAssignment{T}(ref
TensorSpan
{T}, int)" />
65
extension<TScalar>(
TensorSpan
<TScalar>)
69
public static Tensor<TScalar> operator >>(in
TensorSpan
<TScalar> tensor, int shiftAmount) => ShiftRightArithmetic<TScalar>(tensor, shiftAmount);
74
extension<TScalar>(ref
TensorSpan
<TScalar> tensor)
System\Numerics\Tensors\netcore\Tensor.op_Subtraction.cs (13)
55
public static ref readonly
TensorSpan
<T> Subtract<T>(scoped in ReadOnlyTensorSpan<T> x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
70
public static ref readonly
TensorSpan
<T> Subtract<T>(scoped in ReadOnlyTensorSpan<T> x, T y, in
TensorSpan
<T> destination)
85
public static ref readonly
TensorSpan
<T> Subtract<T>(T x, scoped in ReadOnlyTensorSpan<T> y, in
TensorSpan
<T> destination)
130
/// <inheritdoc cref="op_SubtractionAssignment{T}(ref
TensorSpan
{T}, in ReadOnlyTensorSpan{T})" />
133
/// <inheritdoc cref="op_SubtractionAssignment{T}(ref
TensorSpan
{T}, T)" />
139
extension<TScalar>(ref
TensorSpan
<TScalar> tensor)
143
public static Tensor<TScalar> operator -(in
TensorSpan
<TScalar> left, in
TensorSpan
<TScalar> right) => Subtract<TScalar>(left, right);
146
public static Tensor<TScalar> operator -(in
TensorSpan
<TScalar> left, TScalar right) => Subtract(left, right);
149
public static Tensor<TScalar> operator -(TScalar left, in
TensorSpan
<TScalar> right) => Subtract(left, right);
System\Numerics\Tensors\netcore\Tensor.op_UnaryNegation.cs (4)
24
public static ref readonly
TensorSpan
<T> Negate<T>(scoped in ReadOnlyTensorSpan<T> x, in
TensorSpan
<T> destination)
51
extension<TScalar>(
TensorSpan
<TScalar>)
55
public static Tensor<TScalar> operator -(in
TensorSpan
<TScalar> tensor) => Negate<TScalar>(tensor);
System\Numerics\Tensors\netcore\Tensor.op_UnaryPlus.cs (3)
27
extension<TScalar>(
TensorSpan
<TScalar>)
31
public static
TensorSpan
<TScalar> operator +(in
TensorSpan
<TScalar> tensor) => tensor;
System\Numerics\Tensors\netcore\Tensor.op_UnsignedRightShift.cs (6)
28
public static ref readonly
TensorSpan
<T> ShiftRightLogical<T>(scoped in ReadOnlyTensorSpan<T> x, int shiftAmount, in
TensorSpan
<T> destination)
60
/// <inheritdoc cref="op_UnsignedRightShiftAssignment{T}(ref
TensorSpan
{T}, int)" />
65
extension<TScalar>(
TensorSpan
<TScalar>)
69
public static Tensor<TScalar> operator >>>(in
TensorSpan
<TScalar> tensor, int shiftAmount) => ShiftRightLogical<TScalar>(tensor, shiftAmount);
74
extension<TScalar>(ref
TensorSpan
<TScalar> tensor)
System\Numerics\Tensors\netcore\TensorDimensionSpan_1.cs (5)
14
private readonly
TensorSpan
<T> _tensor;
19
internal TensorDimensionSpan(
TensorSpan
<T> tensor, int dimension)
50
public
TensorSpan
<T> this[nint index]
74
public ref struct Enumerator : IEnumerator<
TensorSpan
<T>>
86
public readonly
TensorSpan
<T> Current => _span[_index];
System\Numerics\Tensors\netcore\TensorOperation.cs (35)
21
in ReadOnlyTensorSpan<TSource> source, in
TensorSpan
<TDestination> destination, bool isCopy = false)
65
internal static Span<T> AsDenseSpan<T>(in
TensorSpan
<T> destination)
68
internal static Span<T> AsDenseSpan<T>(in
TensorSpan
<T> destination, nint offset, int length)
77
internal static void CopyDense<T>(in ReadOnlyTensorSpan<T> source, in
TensorSpan
<T> destination, nint copyLength, nint destinationOffset = 0)
100
internal static bool TryCopyDenseSlices<T>(in ReadOnlyTensorSpan<T> source, in
TensorSpan
<T> destination, nint copyLength, nint destinationOffset = 0)
144
private static void CopySourceDenseSlices<T>(in ReadOnlyTensorSpan<T> source, in
TensorSpan
<T> destination, nint copyLength,
158
internal static bool TryReverseDenseSlices<T>(in ReadOnlyTensorSpan<T> source, in
TensorSpan
<T> destination)
186
private static void ReverseEnumeratedSource<T>(in ReadOnlyTensorSpan<T> source, in
TensorSpan
<T> destination, int dimension)
209
private static void ReverseEnumeratedDestination<T>(in ReadOnlyTensorSpan<T> source, in
TensorSpan
<T> destination, int dimension)
211
TensorSpan
<T>.Enumerator enumerator = destination.GetEnumerator();
232
private static void CopyBetweenDenseSlices<T>(in ReadOnlyTensorSpan<T> source, in
TensorSpan
<T> destination, nint copyLength,
271
private static void ReverseBetweenDenseSlices<T>(in ReadOnlyTensorSpan<T> source, in
TensorSpan
<T> destination,
314
private static void CopyEnumeratedSource<T>(in ReadOnlyTensorSpan<T> source, in
TensorSpan
<T> destination, nint copyLength,
338
private static void InvokeDenseChunks<TOperation, TArg, TResult>(in ReadOnlyTensorSpan<TArg> source, in
TensorSpan
<TResult> destination)
350
in ReadOnlyTensorSpan<TArg2> y, in
TensorSpan
<TResult> destination)
362
TArg2 y, in
TensorSpan
<TResult> destination)
373
private static void InvokeDenseChunks<TOperation, TArg, TResult>(TArg x, in ReadOnlyTensorSpan<TArg> y, in
TensorSpan
<TResult> destination)
603
public static void Invoke<TOperation, T>(in
TensorSpan
<T> x)
628
TensorSpan
<T> slice = slices[i];
854
public static void Invoke<TOperation, TArg, TResult>(in
TensorSpan
<TResult> destination, TArg scalar)
879
TensorSpan
<TResult> slice = slices[i];
899
public static void Invoke<TOperation, TArg, TResult>(in ReadOnlyTensorSpan<TArg> x, in
TensorSpan
<TResult> destination)
961
TensorSpan
<TResult> destinationSlice = destinationSlices[i];
987
public static void ReverseInvoke<TOperation, TArg, TResult>(in ReadOnlyTensorSpan<TArg> x, in
TensorSpan
<TResult> destination)
1151
public static void Invoke<TOperation, TArg1, TArg2, TResult>(in ReadOnlyTensorSpan<TArg1> x, in ReadOnlyTensorSpan<TArg2> y, in
TensorSpan
<TResult> destination)
1185
TensorSpan
<TResult> destinationSlice = destinationSlices[i];
1216
public static void Invoke<TOperation, TArg, TResult>(in ReadOnlyTensorSpan<TArg> x, in ReadOnlyTensorSpan<TArg> y, in
TensorSpan
<TResult> destination)
1281
public static void Invoke<TOperation, TArg, TResult>(in ReadOnlyTensorSpan<TArg> x, TArg y, in
TensorSpan
<TResult> destination)
1285
public static void Invoke<TOperation, TArg, TResult>(in ReadOnlyTensorSpan<TArg> x, int y, in
TensorSpan
<TResult> destination)
1288
public static void Invoke<TOperation, TArg1, TArg2, TResult>(in ReadOnlyTensorSpan<TArg1> x, TArg2 y, in
TensorSpan
<TResult> destination)
1318
TensorSpan
<TResult> destinationSlice = destinationSlices[i];
1345
public static void Invoke<TOperation, TArg, TResult>(TArg x, in ReadOnlyTensorSpan<TArg> y, in
TensorSpan
<TResult> destination)
1375
TensorSpan
<TResult> destinationSlice = destinationSlices[i];
1466
public static void ValidateCompatibility<TArg, TResult>(in ReadOnlyTensorSpan<TArg> x, in
TensorSpan
<TResult> destination)
1473
public static void ValidateCompatibility<TArg1, TArg2, TResult>(in ReadOnlyTensorSpan<TArg1> x, in ReadOnlyTensorSpan<TArg2> y, in
TensorSpan
<TResult> destination)
System\Numerics\Tensors\netcore\TensorSpan_1.cs (43)
24
public readonly ref struct TensorSpan<T> : ITensor<
TensorSpan
<T>, T>
27
public static
TensorSpan
<T> Empty => default;
163
public
TensorSpan
<T> this[params scoped ReadOnlySpan<NRange> ranges]
196
public static bool operator ==(in
TensorSpan
<T> left, in
TensorSpan
<T> right)
201
public static bool operator !=(in
TensorSpan
<T> left, in
TensorSpan
<T> right) => !(left == right);
206
public static implicit operator
TensorSpan
<T>(T[]? array) => new TensorSpan<T>(array);
211
public static implicit operator ReadOnlyTensorSpan<T>(scoped in
TensorSpan
<T> tensor) =>
229
/// <inheritdoc cref="IReadOnlyTensor{TSelf, T}.CopyTo(in
TensorSpan
{T})" />
230
public void CopyTo(scoped in
TensorSpan
<T> destination)
299
public
TensorSpan
<T> Slice(params scoped ReadOnlySpan<nint> startIndexes)
309
public
TensorSpan
<T> Slice(params scoped ReadOnlySpan<NIndex> startIndexes)
319
public
TensorSpan
<T> Slice(params scoped ReadOnlySpan<NRange> ranges)
334
/// <inheritdoc cref="IReadOnlyTensor{TSelf, T}.TryCopyTo(in
TensorSpan
{T})" />
335
public bool TryCopyTo(scoped in
TensorSpan
<T> destination) => AsReadOnlyTensorSpan().TryCopyTo(destination);
390
ref readonly T IReadOnlyTensor<
TensorSpan
<T>, T>.this[params scoped ReadOnlySpan<NIndex> indexes] => ref this[indexes];
392
ref readonly T IReadOnlyTensor<
TensorSpan
<T>, T>.this[params scoped ReadOnlySpan<nint> indexes] => ref this[indexes];
394
ReadOnlyTensorDimensionSpan<T> IReadOnlyTensor<
TensorSpan
<T>, T>.GetDimensionSpan(int dimension) => GetDimensionSpan(dimension);
396
ref readonly T IReadOnlyTensor<
TensorSpan
<T>, T>.GetPinnableReference() => ref GetPinnableReference();
398
ReadOnlySpan<T> IReadOnlyTensor<
TensorSpan
<T>, T>.GetSpan(scoped ReadOnlySpan<nint> startIndexes, int length) => AsReadOnlyTensorSpan().GetSpan(startIndexes, length);
400
ReadOnlySpan<T> IReadOnlyTensor<
TensorSpan
<T>, T>.GetSpan(scoped ReadOnlySpan<NIndex> startIndexes, int length) => AsReadOnlyTensorSpan().GetSpan(startIndexes, length);
402
TensorSpan
<T> IReadOnlyTensor<
TensorSpan
<T>, T>.ToDenseTensor()
404
TensorSpan
<T> result = this;
447
static
TensorSpan
<T> ITensor<
TensorSpan
<T>, T>.CreateFromShape(scoped ReadOnlySpan<nint> lengths, bool pinned) => Tensor.CreateFromShape<T>(lengths, pinned);
449
static
TensorSpan
<T> ITensor<
TensorSpan
<T>, T>.CreateFromShape(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned) => Tensor.CreateFromShape<T>(lengths, strides, pinned);
451
static
TensorSpan
<T> ITensor<
TensorSpan
<T>, T>.CreateFromShapeUninitialized(scoped ReadOnlySpan<nint> lengths, bool pinned) => Tensor.CreateFromShapeUninitialized<T>(lengths, pinned);
453
static
TensorSpan
<T> ITensor<
TensorSpan
<T>, T>.CreateFromShapeUninitialized(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned) => Tensor.CreateFromShapeUninitialized<T>(lengths, strides, pinned);
455
TensorSpan
<T> ITensor<
TensorSpan
<T>, T>.AsTensorSpan() => this;
457
TensorSpan
<T> ITensor<
TensorSpan
<T>, T>.AsTensorSpan(params scoped ReadOnlySpan<nint> startIndexes) => Slice(startIndexes);
459
TensorSpan
<T> ITensor<
TensorSpan
<T>, T>.AsTensorSpan(params scoped ReadOnlySpan<NIndex> startIndexes) => Slice(startIndexes);
461
TensorSpan
<T> ITensor<
TensorSpan
<T>, T>.AsTensorSpan(params scoped ReadOnlySpan<NRange> ranges) => Slice(ranges);
466
private readonly
TensorSpan
<T> _span;
471
internal Enumerator(
TensorSpan
<T> span)
System\Numerics\Tensors\netcore\TensorSpanDebugView.cs (1)
12
public TensorSpanDebugView(
TensorSpan
<T> span)
System\Runtime\InteropServices\TensorMarshal.cs (3)
9
/// <summary>Provides methods to interoperate with <see cref="Tensor{T}" />, <see cref="
TensorSpan
{T}" />, and <see cref="ReadOnlyTensorSpan{T}" />.</summary>
21
public static
TensorSpan
<T> CreateTensorSpan<T>(scoped ref T data, nint dataLength, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned)
45
public static ref T GetReference<T>(in
TensorSpan
<T> tensorSpan)