1 instantiation of ReadOnlyTensorSpan
System.Numerics.Tensors (1)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan.cs (1)
641
public static implicit operator ReadOnlyTensorSpan<T>(T[]? array) => new
ReadOnlyTensorSpan
<T>(array);
908 references to ReadOnlyTensorSpan
System.Numerics.Tensors (908)
System\Numerics\Tensors\netcore\IReadOnlyTensor.cs (8)
103
/// <returns>The converted <see cref="
ReadOnlyTensorSpan
{T}"/>.</returns>
104
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan();
110
/// <returns>The converted <see cref="
ReadOnlyTensorSpan
{T}"/>.</returns>
111
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<nint> start);
117
/// <returns>The converted <see cref="
ReadOnlyTensorSpan
{T}"/>.</returns>
118
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NIndex> startIndex);
124
/// <returns>The converted <see cref="
ReadOnlyTensorSpan
{T}"/>.</returns>
125
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NRange> range);
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan.cs (27)
109
/// Creates a new <see cref="
ReadOnlyTensorSpan
{T}"/> over the provided <see cref="ReadOnlySpan{T}"/>. The new <see cref="
ReadOnlyTensorSpan
{T}"/> will
116
/// Creates a new <see cref="
ReadOnlyTensorSpan
{T}"/> over the provided <see cref="Span{T}"/> using the specified lengths and strides.
139
/// Creates a new <see cref="
ReadOnlyTensorSpan
{T}"/> over the provided <see cref="Array"/>. The new <see cref="
ReadOnlyTensorSpan
{T}"/> will
156
/// Creates a new <see cref="
ReadOnlyTensorSpan
{T}"/> over the provided <see cref="Array"/> using the specified start offsets, lengths, and strides.
204
/// Creates a new <see cref="
ReadOnlyTensorSpan
{T}"/> over the provided <see cref="Array"/> using the specified start offsets, lengths, and strides.
370
public
ReadOnlyTensorSpan
<T> this[params scoped ReadOnlySpan<NRange> ranges]
413
public static bool operator !=(
ReadOnlyTensorSpan
<T> left,
ReadOnlyTensorSpan
<T> right) => !(left == right);
419
public static bool operator ==(
ReadOnlyTensorSpan
<T> left,
ReadOnlyTensorSpan
<T> right) =>
452
public static
ReadOnlyTensorSpan
<T> Empty => default;
461
public static
ReadOnlyTensorSpan
<T> CastUp<TDerived>(
ReadOnlyTensorSpan
<TDerived> items) where TDerived : class?, T
469
/// <summary>Enumerates the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/>.</summary>
473
private readonly
ReadOnlyTensorSpan
<T> _span;
482
internal Enumerator(
ReadOnlyTensorSpan
<T> span)
562
ReadOnlyTensorSpan
<T> srcSlice = Tensor.LazyBroadcast(this, tempLengths);
618
ReadOnlyTensorSpan
<T> srcSlice = Tensor.LazyBroadcast(this, tempLengths);
641
public static implicit operator
ReadOnlyTensorSpan
<T>(T[]? array) => new ReadOnlyTensorSpan<T>(array);
655
public
ReadOnlyTensorSpan
<T> Slice(params scoped ReadOnlySpan<NIndex> indexes)
669
/// <returns>A <see cref="
ReadOnlyTensorSpan
{T}"/> based on the provided <paramref name="lengths"/>.</returns>
670
internal
ReadOnlyTensorSpan
<T> Slice(scoped ReadOnlySpan<nint> lengths)
684
/// <returns>A <see cref="
ReadOnlyTensorSpan
{T}"/> based on the provided <paramref name="ranges"/>.</returns>
686
public
ReadOnlyTensorSpan
<T> Slice(params scoped ReadOnlySpan<NRange> ranges)
691
ReadOnlyTensorSpan
<T> toReturn;
System\Numerics\Tensors\netcore\Tensor.cs (14)
397
public static implicit operator
ReadOnlyTensorSpan
<T>(Tensor<T> value) => value.AsReadOnlyTensorSpan();
427
/// Converts this <see cref="Tensor{T}"/> to a <see cref="
ReadOnlyTensorSpan
{T}"/> pointing to the same backing memory."/>
429
/// <returns><see cref="
ReadOnlyTensorSpan
{T}"/></returns>
430
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_values), _memoryOffset), _lengths, _strides, _flattenedLength);
433
/// Converts this <see cref="Tensor{T}"/> to a <see cref="
ReadOnlyTensorSpan
{T}"/> pointing to the same backing memory based on the provided ranges."/>
435
/// <param name="start">The ranges you want in the <see cref="
ReadOnlyTensorSpan
{T}"/></param>
437
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NRange> start) => AsTensorSpan().Slice(start);
440
/// Converts this <see cref="Tensor{T}"/> to a <see cref="
ReadOnlyTensorSpan
{T}"/> pointing to the same backing memory based on the provided start locations."/>
442
/// <param name="start">The start locations you want in the <see cref="
ReadOnlyTensorSpan
{T}"/></param>
444
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<nint> start) => AsTensorSpan().Slice(start);
447
/// Converts this <see cref="Tensor{T}"/> to a <see cref="
ReadOnlyTensorSpan
{T}"/> pointing to the same backing memory based on the provided start indexes."/>
449
/// <param name="startIndex">The start indexes you want in the <see cref="
ReadOnlyTensorSpan
{T}"/></param>
451
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NIndex> startIndex) => AsTensorSpan().Slice(startIndex);
733
((
ReadOnlyTensorSpan
<T>)AsTensorSpan()).ToString(sb, maximumLengths);
System\Numerics\Tensors\netcore\TensorExtensions.cs (844)
34
public static
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan<T>(this T[]? array, params scoped ReadOnlySpan<nint> lengths) => new(array, 0, lengths, default);
54
public static Tensor<T> Broadcast<T>(scoped in
ReadOnlyTensorSpan
<T> source, scoped in
ReadOnlyTensorSpan
<T> lengthsSource)
66
public static Tensor<T> Broadcast<T>(scoped in
ReadOnlyTensorSpan
<T> source, scoped ReadOnlySpan<nint> lengths)
70
ReadOnlyTensorSpan
<T> intermediate = LazyBroadcast(source, newSize);
89
ReadOnlyTensorSpan
<T> intermediate = LazyBroadcast(source, newSize);
104
ReadOnlyTensorSpan
<T> intermediate = LazyBroadcast(source, newSize);
113
public static void BroadcastTo<T>(in this
ReadOnlyTensorSpan
<T> source, in TensorSpan<T> destination)
119
ReadOnlyTensorSpan
<T> intermediate = LazyBroadcast(source, newSize);
175
internal static
ReadOnlyTensorSpan
<T> LazyBroadcast<T>(in
ReadOnlyTensorSpan
<T> input, ReadOnlySpan<nint> shape)
433
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> for equality. If the shapes are not the same, the tensors are broadcasted to the smallest broadcastable size
436
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
437
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
439
public static Tensor<bool> Equals<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
458
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> for equality. If the shapes are not the same, the tensors are broadcasted to the smallest broadcastable size
461
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
462
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
465
public static ref readonly TensorSpan<bool> Equals<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
514
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> for equality. If the shapes are not the same, the tensors are broadcasted to the smallest broadcastable size
517
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
520
public static Tensor<bool> Equals<T>(in
ReadOnlyTensorSpan
<T> x, T y)
529
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> for equality. If the shapes are not the same, the tensors are broadcasted to the smallest broadcastable size
532
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
536
public static ref readonly TensorSpan<bool> Equals<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
572
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are equal to <paramref name="y"/>.
576
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
577
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
579
public static bool EqualsAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
584
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
585
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
616
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are equal to <paramref name="y"/>.
620
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
621
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
623
public static bool EqualsAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
657
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are equal to <paramref name="y"/>.
661
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
662
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
664
public static bool EqualsAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
668
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
669
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
700
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are equal to <paramref name="y"/>.
704
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
707
public static bool EqualsAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
746
public static ref readonly TensorSpan<T> FilteredUpdate<T>(in this TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<bool> filter, T value)
772
public static ref readonly TensorSpan<T> FilteredUpdate<T>(in this TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<bool> filter, scoped in
ReadOnlyTensorSpan
<T> values)
798
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are greater than <paramref name="y"/>.
803
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
804
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
807
public static Tensor<bool> GreaterThan<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
826
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are greater than <paramref name="y"/>.
831
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
832
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
836
public static ref readonly TensorSpan<bool> GreaterThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
885
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than <paramref name="y"/>.
889
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
893
public static Tensor<bool> GreaterThan<T>(in
ReadOnlyTensorSpan
<T> x, T y)
902
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than <paramref name="y"/>.
906
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
911
public static ref readonly TensorSpan<bool> GreaterThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
949
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
953
public static Tensor<bool> GreaterThan<T>(T x, in
ReadOnlyTensorSpan
<T> y)
966
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
971
public static ref readonly TensorSpan<bool> GreaterThan<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1007
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are greater than or equal to <paramref name="y"/>.
1012
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1013
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1016
public static Tensor<bool> GreaterThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1035
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are greater than or equal to <paramref name="y"/>.
1040
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1041
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1045
public static ref readonly TensorSpan<bool> GreaterThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1094
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than or equal to <paramref name="y"/>.
1098
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1102
public static Tensor<bool> GreaterThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1111
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than or equal to <paramref name="y"/>.
1115
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1120
public static ref readonly TensorSpan<bool> GreaterThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
1158
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1162
public static Tensor<bool> GreaterThanOrEqual<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1175
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1180
public static ref readonly TensorSpan<bool> GreaterThanOrEqual<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1216
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1220
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1221
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1223
public static bool GreaterThanAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1227
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
1228
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
1259
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1263
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1266
public static bool GreaterThanAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1298
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are greater than <paramref name="x"/>.
1302
/// <param name="y">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1305
public static bool GreaterThanAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1339
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1343
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1344
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1346
public static bool GreaterThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1350
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
1351
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
1382
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1386
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1389
public static bool GreaterThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1421
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are greater than <paramref name="x"/>.
1425
/// <param name="y">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1428
public static bool GreaterThanOrEqualAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1462
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1466
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1467
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1469
public static bool GreaterThanAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1474
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
1475
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
1506
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1510
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1511
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1513
public static bool GreaterThanAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1545
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are greater than <paramref name="y"/>.
1549
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1550
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1552
public static bool GreaterThanAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1586
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1590
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1591
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1593
public static bool GreaterThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1598
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
1599
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
1630
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1634
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1635
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1637
public static bool GreaterThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1669
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are greater than <paramref name="y"/>.
1673
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1674
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1676
public static bool GreaterThanOrEqualAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1710
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
1715
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1716
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1719
public static Tensor<bool> LessThan<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1738
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
1743
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1744
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1748
public static ref readonly TensorSpan<bool> LessThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1805
public static Tensor<bool> LessThan<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1823
public static ref readonly TensorSpan<bool> LessThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
1865
public static Tensor<bool> LessThan<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1883
public static ref readonly TensorSpan<bool> LessThan<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1919
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
1924
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1925
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1928
public static Tensor<bool> LessThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1947
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
1952
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1953
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1957
public static ref readonly TensorSpan<bool> LessThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
2014
public static Tensor<bool> LessThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2032
public static ref readonly TensorSpan<bool> LessThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
2074
public static Tensor<bool> LessThanOrEqual<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2092
public static ref readonly TensorSpan<bool> LessThanOrEqual<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
2128
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
2132
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2133
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
2135
public static bool LessThanAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2140
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
2141
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
2172
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
2176
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2179
public static bool LessThanAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2211
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are less than <paramref name="y"/>.
2218
public static bool LessThanAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2252
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
2256
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2257
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
2259
public static bool LessThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2264
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
2265
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
2296
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
2300
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2303
public static bool LessThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2335
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are less than <paramref name="y"/>.
2342
public static bool LessThanOrEqualAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2376
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
2380
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2381
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
2383
public static bool LessThanAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2387
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
2388
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
2419
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
2423
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2426
public static bool LessThanAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2458
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are less than <paramref name="x"/>.
2465
public static bool LessThanAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2499
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
2503
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2504
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
2506
public static bool LessThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2510
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
2511
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
2542
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
2546
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2549
public static bool LessThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2581
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are less than <paramref name="x"/>.
2588
public static bool LessThanOrEqualAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2855
public static
ReadOnlyTensorSpan
<T> Reshape<T>(in this
ReadOnlyTensorSpan
<T> tensor, params scoped ReadOnlySpan<nint> lengths)
2913
ReadOnlyTensorSpan
<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, arrLengths, strides, tensor._shape._memoryLength);
2976
/// <param name="tensor">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2978
public static void ResizeTo<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination)
2994
public static Tensor<T> Reverse<T>(in
ReadOnlyTensorSpan
<T> tensor)
3008
public static Tensor<T> ReverseDimension<T>(in
ReadOnlyTensorSpan
<T> tensor, int dimension)
3021
public static ref readonly TensorSpan<T> Reverse<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination)
3033
public static ref readonly TensorSpan<T> ReverseDimension<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination, int dimension)
3079
ReadOnlyTensorSpan
<T> islice = tensor.Slice(tensor.Lengths);
3104
public static bool SequenceEqual<T>(this scoped in TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<T> other)
3116
public static bool SequenceEqual<T>(this scoped in
ReadOnlyTensorSpan
<T> tensor, scoped in
ReadOnlyTensorSpan
<T> other)
3133
public static Tensor<T> SetSlice<T>(this Tensor<T> tensor, in
ReadOnlyTensorSpan
<T> values, params ReadOnlySpan<NRange> ranges)
3146
public static ref readonly TensorSpan<T> SetSlice<T>(this in TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<T> values, params scoped ReadOnlySpan<NRange> ranges)
3178
public static Tensor<T>[] Split<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, int splitCount, nint dimension)
3225
ReadOnlyTensorSpan
<T> islice = tensor.Slice(tensor.Lengths);
3364
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> to remove all dimensions of length 1.</param>
3365
public static
ReadOnlyTensorSpan
<T> Squeeze<T>(in this
ReadOnlyTensorSpan
<T> tensor)
3374
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> to remove dimension of length 1.</param>
3376
public static
ReadOnlyTensorSpan
<T> SqueezeDimension<T>(in this
ReadOnlyTensorSpan
<T> tensor, int dimension)
3502
((
ReadOnlyTensorSpan
<T>)tensor).ToString(maximumLengths);
3505
/// Creates a <see cref="string"/> representation of the <see cref="
ReadOnlyTensorSpan
{T}"/>."/>
3508
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> you want to represent as a string.</param>
3510
public static string ToString<T>(this in
ReadOnlyTensorSpan
<T> tensor, params ReadOnlySpan<nint> maximumLengths)
3517
internal static void ToString<T>(this in
ReadOnlyTensorSpan
<T> tensor, StringBuilder sb, params ReadOnlySpan<nint> maximumLengths)
3541
var
sp = new ReadOnlyTensorSpan<T>(ref Unsafe.Add(ref tensor._reference, TensorSpanHelpers.ComputeLinearIndex(curIndexes, tensor.Strides, tensor.Lengths)), [tensor.Lengths[tensor.Rank - 1]], [1], tensor.Lengths[tensor.Rank - 1]);
3561
public static string ToString<T>(this Tensor<T> tensor, params ReadOnlySpan<nint> maximumLengths) => ((
ReadOnlyTensorSpan
<T>)tensor).ToString(maximumLengths);
3595
return TryBroadcastTo((
ReadOnlyTensorSpan
<T>)tensor, destination);
3606
return TryBroadcastTo((
ReadOnlyTensorSpan
<T>)tensor, destination);
3613
/// <param name="tensor">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3615
public static bool TryBroadcastTo<T>(in this
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination)
3707
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> to add a dimension of length 1.</param>
3709
public static
ReadOnlyTensorSpan
<T> Unsqueeze<T>(in this
ReadOnlyTensorSpan
<T> tensor, int dimension)
3747
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the abs of.</param>
3748
public static Tensor<T> Abs<T>(in
ReadOnlyTensorSpan
<T> x)
3757
/// Takes the absolute value of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3761
public static ref readonly TensorSpan<T> Abs<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3772
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3773
public static Tensor<T> Acos<T>(in
ReadOnlyTensorSpan
<T> x)
3786
public static ref readonly TensorSpan<T> Acos<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3795
/// Takes the inverse hyperbolic cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3797
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3798
public static Tensor<T> Acosh<T>(in
ReadOnlyTensorSpan
<T> x)
3811
public static ref readonly TensorSpan<T> Acosh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3822
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3823
public static Tensor<T> AcosPi<T>(in
ReadOnlyTensorSpan
<T> x)
3834
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3836
public static ref readonly TensorSpan<T> AcosPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3847
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3848
/// <param name="y">The second <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3849
public static Tensor<T> Add<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3869
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3871
public static Tensor<T> Add<T>(in
ReadOnlyTensorSpan
<T> x, T y)
3880
/// Adds each element of <paramref name="x"/> to each element of <paramref name="y"/> and returns a new <see cref="
ReadOnlyTensorSpan
{T}"/> with the result.
3882
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3883
/// <param name="y">The second <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3885
public static ref readonly TensorSpan<T> Add<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3894
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3897
public static ref readonly TensorSpan<T> Add<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
3906
/// Takes the inverse sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3908
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3909
public static Tensor<T> Asin<T>(in
ReadOnlyTensorSpan
<T> x)
3918
/// Takes the inverse sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3920
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3922
public static ref readonly TensorSpan<T> Asin<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3931
/// Takes the inverse hyperbolic sine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3933
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3934
public static Tensor<T> Asinh<T>(in
ReadOnlyTensorSpan
<T> x)
3943
/// 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.
3945
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3947
public static ref readonly TensorSpan<T> Asinh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3956
/// Takes the inverse hyperbolic sine divided by pi of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3958
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3959
public static Tensor<T> AsinPi<T>(in
ReadOnlyTensorSpan
<T> x)
3968
/// 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.
3970
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3972
public static ref readonly TensorSpan<T> AsinPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3981
/// Takes the arc tangent of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3983
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
3984
public static Tensor<T> Atan<T>(in
ReadOnlyTensorSpan
<T> x)
3993
/// Takes the arc tangent of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3995
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
3997
public static ref readonly TensorSpan<T> Atan<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4006
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4008
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4009
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4010
public static Tensor<T> Atan2<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4028
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4030
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4031
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4033
public static ref readonly TensorSpan<T> Atan2<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4040
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4042
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4043
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4044
public static Tensor<T> Atan2<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4054
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4056
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4057
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4059
public static ref readonly TensorSpan<T> Atan2<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4066
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4068
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4069
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4070
public static Tensor<T> Atan2<T>(T x, in
ReadOnlyTensorSpan
<T> y)
4080
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4082
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4083
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4085
public static ref readonly TensorSpan<T> Atan2<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4094
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/>, divides each element by pi, and returns a new <see cref="Tensor{T}"/> with the result.
4096
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4097
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4098
public static Tensor<T> Atan2Pi<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4116
/// 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.
4118
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4119
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4121
public static ref readonly TensorSpan<T> Atan2Pi<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4128
/// 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.
4130
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4131
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4132
public static Tensor<T> Atan2Pi<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4142
/// 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.
4144
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4145
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4147
public static ref readonly TensorSpan<T> Atan2Pi<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4154
/// 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.
4156
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4157
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4158
public static Tensor<T> Atan2Pi<T>(T x, in
ReadOnlyTensorSpan
<T> y)
4168
/// 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.
4170
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4171
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4173
public static ref readonly TensorSpan<T> Atan2Pi<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4183
/// Takes the inverse hyperbolic tangent of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4185
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4186
public static Tensor<T> Atanh<T>(in
ReadOnlyTensorSpan
<T> x)
4195
/// 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.
4197
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4199
public static ref readonly TensorSpan<T> Atanh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4208
/// Takes the inverse hyperbolic tangent divided by pi of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4210
/// <param name="x">The input<see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4211
public static Tensor<T> AtanPi<T>(in
ReadOnlyTensorSpan
<T> x)
4220
/// 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.
4222
/// <param name="x">The input<see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4224
public static ref readonly TensorSpan<T> AtanPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4237
public static T Average<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4246
/// Computes the element-wise bitwise and of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4248
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4249
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4250
public static Tensor<T> BitwiseAnd<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4268
/// Computes the element-wise bitwise and of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4270
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4271
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4273
public static ref readonly TensorSpan<T> BitwiseAnd<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4280
/// Computes the element-wise bitwise and of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4282
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4284
public static Tensor<T> BitwiseAnd<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4294
/// Computes the element-wise bitwise and of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4296
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4299
public static ref readonly TensorSpan<T> BitwiseAnd<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4308
/// Computes the element-wise bitwise of of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4310
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4311
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4312
public static Tensor<T> BitwiseOr<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4330
/// Computes the element-wise bitwise of of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4332
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4333
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4335
public static ref readonly TensorSpan<T> BitwiseOr<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4342
/// Computes the element-wise bitwise or of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4344
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4346
public static Tensor<T> BitwiseOr<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4356
/// Computes the element-wise bitwise or of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4358
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4361
public static ref readonly TensorSpan<T> BitwiseOr<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4370
/// Computes the element-wise cube root of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4372
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4373
public static Tensor<T> Cbrt<T>(in
ReadOnlyTensorSpan
<T> x)
4382
/// Computes the element-wise cube root of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4384
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4386
public static ref readonly TensorSpan<T> Cbrt<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4395
/// Computes the element-wise ceiling of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4397
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4398
public static Tensor<T> Ceiling<T>(in
ReadOnlyTensorSpan
<T> x)
4407
/// Computes the element-wise ceiling of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4409
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4411
public static ref readonly TensorSpan<T> Ceiling<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4420
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
4423
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4424
public static Tensor<TTo> ConvertChecked<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
4440
public static ref readonly TensorSpan<TTo> ConvertChecked<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
4450
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
4453
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4454
public static Tensor<TTo> ConvertSaturating<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
4470
public static ref readonly TensorSpan<TTo> ConvertSaturating<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
4480
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
4483
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4484
public static Tensor<TTo> ConvertTruncating<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
4500
public static ref readonly TensorSpan<TTo> ConvertTruncating<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
4512
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4514
public static Tensor<T> CopySign<T>(in
ReadOnlyTensorSpan
<T> x, T sign)
4526
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4527
/// <param name="sign">The <see cref="
ReadOnlyTensorSpan
{T}"/> with the associated signs.</param>
4528
public static Tensor<T> CopySign<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> sign)
4548
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4551
public static ref readonly TensorSpan<T> CopySign<T>(scoped in
ReadOnlyTensorSpan
<T> x, T sign, in TensorSpan<T> destination)
4560
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4561
/// <param name="sign">The <see cref="
ReadOnlyTensorSpan
{T}"/> with the associated signs.</param>
4563
public static ref readonly TensorSpan<T> CopySign<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> sign, in TensorSpan<T> destination)
4572
/// Takes the cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4574
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
4575
public static Tensor<T> Cos<T>(in
ReadOnlyTensorSpan
<T> x)
4584
/// Takes the cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4586
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
4588
public static ref readonly TensorSpan<T> Cos<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4597
/// Takes the hyperbolic cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4599
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
4600
public static Tensor<T> Cosh<T>(in
ReadOnlyTensorSpan
<T> x)
4609
/// Takes the hyperbolic cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4611
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
4613
public static ref readonly TensorSpan<T> Cosh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4624
/// <param name="x">The first <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4625
/// <param name="y">The second <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4626
public static Tensor<T> CosineSimilarity<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4653
/// <param name="x">The first <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4654
/// <param name="y">The second <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4656
public static ref readonly TensorSpan<T> CosineSimilarity<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4704
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4717
public static Tensor<T> CosPi<T>(in
ReadOnlyTensorSpan
<T> x)
4726
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4740
public static ref readonly TensorSpan<T> CosPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4751
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4752
public static Tensor<T> DegreesToRadians<T>(in
ReadOnlyTensorSpan
<T> x)
4763
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4765
public static ref readonly TensorSpan<T> DegreesToRadians<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4776
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4777
/// <param name="y">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4778
public static T Distance<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y)
4789
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4791
public static Tensor<T> Divide<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4803
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> divisor.</param>
4804
public static Tensor<T> Divide<T>(T x, in
ReadOnlyTensorSpan
<T> y)
4814
/// a new <see cref="
ReadOnlyTensorSpan
{T}"/> with the result.
4816
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to be divided.</param>
4817
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> divisor.</param>
4818
public static Tensor<T> Divide<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4838
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4841
public static ref readonly TensorSpan<T> Divide<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4851
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> divisor.</param>
4853
public static ref readonly TensorSpan<T> Divide<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4863
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to be divided.</param>
4864
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> divisor.</param>
4866
public static ref readonly TensorSpan<T> Divide<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4877
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4878
/// <param name="y">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4879
public static T Dot<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4890
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4891
public static Tensor<T> Exp<T>(in
ReadOnlyTensorSpan
<T> x)
4902
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4904
public static ref readonly TensorSpan<T> Exp<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4915
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4916
public static Tensor<T> Exp10<T>(in
ReadOnlyTensorSpan
<T> x)
4927
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4929
public static ref readonly TensorSpan<T> Exp10<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4938
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4939
public static Tensor<T> Exp10M1<T>(in
ReadOnlyTensorSpan
<T> x)
4948
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4950
public static ref readonly TensorSpan<T> Exp10M1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4959
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4960
public static Tensor<T> Exp2<T>(in
ReadOnlyTensorSpan
<T> x)
4969
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4971
public static ref readonly TensorSpan<T> Exp2<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4980
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4981
public static Tensor<T> Exp2M1<T>(in
ReadOnlyTensorSpan
<T> x)
4990
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4992
public static ref readonly TensorSpan<T> Exp2M1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5001
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5002
public static Tensor<T> ExpM1<T>(in
ReadOnlyTensorSpan
<T> x)
5011
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5013
public static ref readonly TensorSpan<T> ExpM1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5022
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5023
public static Tensor<T> Floor<T>(in
ReadOnlyTensorSpan
<T> x)
5032
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5034
public static ref readonly TensorSpan<T> Floor<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5046
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5047
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5048
public static Tensor<T> Hypot<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5069
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5070
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5072
public static ref readonly TensorSpan<T> Hypot<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5082
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5083
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5084
public static Tensor<T> Ieee754Remainder<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5103
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5104
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5106
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5113
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5114
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5115
public static Tensor<T> Ieee754Remainder<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5125
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5126
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5128
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5135
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5136
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5137
public static Tensor<T> Ieee754Remainder<T>(T x, in
ReadOnlyTensorSpan
<T> y)
5147
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5148
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5150
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5159
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5160
public static Tensor<int> ILogB<T>(in
ReadOnlyTensorSpan
<T> x)
5169
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5171
public static ref readonly TensorSpan<int> ILogB<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<int> destination)
5180
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5181
public static int IndexOfMax<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5191
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5192
public static int IndexOfMaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5202
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5203
public static int IndexOfMin<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5215
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5216
public static int IndexOfMinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5228
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5229
public static Tensor<T> LeadingZeroCount<T>(in
ReadOnlyTensorSpan
<T> x)
5240
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5242
public static ref readonly TensorSpan<T> LeadingZeroCount<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5251
/// Takes the natural logarithm of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
5253
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
5254
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x)
5263
/// Takes the natural logarithm of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
5265
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
5267
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5276
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5297
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5306
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5319
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5328
/// Takes the base 10 logarithm of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
5330
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
5331
public static Tensor<T> Log10<T>(in
ReadOnlyTensorSpan
<T> x)
5340
/// 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.
5342
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
5344
public static ref readonly TensorSpan<T> Log10<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5353
/// Takes the base 10 logarithm plus 1 of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
5355
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
5356
public static Tensor<T> Log10P1<T>(in
ReadOnlyTensorSpan
<T> x)
5365
/// 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.
5367
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
5369
public static ref readonly TensorSpan<T> Log10P1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5378
/// Takes the base 2 logarithm of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
5380
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
5381
public static Tensor<T> Log2<T>(in
ReadOnlyTensorSpan
<T> x)
5390
/// 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.
5392
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
5394
public static ref readonly TensorSpan<T> Log2<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5403
/// Takes the base 2 logarithm plus 1 of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
5405
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
5406
public static Tensor<T> Log2P1<T>(in
ReadOnlyTensorSpan
<T> x)
5415
/// 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.
5417
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
5419
public static ref readonly TensorSpan<T> Log2P1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5428
/// Takes the natural logarithm plus 1 of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
5430
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
5431
public static Tensor<T> LogP1<T>(in
ReadOnlyTensorSpan
<T> x)
5440
/// 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.
5442
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
5444
public static ref readonly TensorSpan<T> LogP1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5453
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>..</param>
5454
public static T Max<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5463
public static Tensor<T> Max<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5484
public static ref readonly TensorSpan<T> Max<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5493
public static Tensor<T> Max<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5505
public static ref readonly TensorSpan<T> Max<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5514
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>..</param>
5515
public static T MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5524
public static Tensor<T> MaxMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5545
public static ref readonly TensorSpan<T> MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5554
public static Tensor<T> MaxMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5566
public static ref readonly TensorSpan<T> MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5575
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>..</param>
5576
public static T MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5585
public static Tensor<T> MaxMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5606
public static ref readonly TensorSpan<T> MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5615
public static Tensor<T> MaxMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5627
public static ref readonly TensorSpan<T> MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5636
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>..</param>
5637
public static T MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5646
public static Tensor<T> MaxNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5667
public static ref readonly TensorSpan<T> MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5676
public static Tensor<T> MaxNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5688
public static ref readonly TensorSpan<T> MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5697
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5698
public static T Min<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5707
public static Tensor<T> Min<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5728
public static ref readonly TensorSpan<T> Min<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5737
public static Tensor<T> Min<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5749
public static ref readonly TensorSpan<T> Min<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5758
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5759
public static T MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5768
public static Tensor<T> MinMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5789
public static ref readonly TensorSpan<T> MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5798
public static Tensor<T> MinMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5810
public static ref readonly TensorSpan<T> MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5819
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>..</param>
5820
public static T MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5829
public static Tensor<T> MinMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5850
public static ref readonly TensorSpan<T> MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5859
public static Tensor<T> MinMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5871
public static ref readonly TensorSpan<T> MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5881
public static T MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5890
public static Tensor<T> MinNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5911
public static ref readonly TensorSpan<T> MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5920
public static Tensor<T> MinNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5932
public static ref readonly TensorSpan<T> MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5943
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
5945
public static Tensor<T> Multiply<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5949
Multiply((
ReadOnlyTensorSpan
<T>)x, y, output);
5957
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/> for multiplication.</param>
5958
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/> for multiplication.</param>
5959
public static Tensor<T> Multiply<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5972
Multiply((
ReadOnlyTensorSpan
<T>)x, y, output);
5979
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
5982
public static ref readonly TensorSpan<T> Multiply<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5995
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/> for multiplication.</param>
5996
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/> for multiplication.</param>
5998
public static ref readonly TensorSpan<T> Multiply<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6007
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6008
public static Tensor<T> Negate<T>(in
ReadOnlyTensorSpan
<T> x)
6017
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6019
public static ref readonly TensorSpan<T> Negate<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6028
/// Takes the norm of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns the result.
6030
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the norm of.</param>
6031
public static T Norm<T>(scoped in
ReadOnlyTensorSpan
<T> x)
6040
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6041
public static Tensor<T> OnesComplement<T>(in
ReadOnlyTensorSpan
<T> x)
6050
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6052
public static ref readonly TensorSpan<T> OnesComplement<T>(scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6061
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6062
public static Tensor<T> PopCount<T>(in
ReadOnlyTensorSpan
<T> x)
6071
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6073
public static ref readonly TensorSpan<T> PopCount<T>(scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6082
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6083
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6084
public static Tensor<T> Pow<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
6102
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6103
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6105
public static ref readonly TensorSpan<T> Pow<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6112
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6114
public static Tensor<T> Pow<T>(in
ReadOnlyTensorSpan
<T> x, T y)
6124
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6125
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6127
public static ref readonly TensorSpan<T> Pow<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
6134
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6136
public static Tensor<T> Pow<T>(T x, in
ReadOnlyTensorSpan
<T> y)
6146
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6147
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6149
public static ref readonly TensorSpan<T> Pow<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6158
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6159
public static T Product<T>(scoped in
ReadOnlyTensorSpan
<T> x)
6168
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6169
public static Tensor<T> RadiansToDegrees<T>(in
ReadOnlyTensorSpan
<T> x)
6178
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6180
public static ref readonly TensorSpan<T> RadiansToDegrees<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6189
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6190
public static Tensor<T> Reciprocal<T>(in
ReadOnlyTensorSpan
<T> x)
6199
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6201
public static ref readonly TensorSpan<T> Reciprocal<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6212
public static Tensor<T> RootN<T>(in
ReadOnlyTensorSpan
<T> x, int n)
6224
public static ref readonly TensorSpan<T> RootN<T>(scoped in
ReadOnlyTensorSpan
<T> x, int n, in TensorSpan<T> destination)
6242
public static Tensor<T> RotateLeft<T>(in
ReadOnlyTensorSpan
<T> x, int rotateAmount)
6255
public static ref readonly TensorSpan<T> RotateLeft<T>(scoped in
ReadOnlyTensorSpan
<T> x, int rotateAmount, in TensorSpan<T> destination)
6273
public static Tensor<T> RotateRight<T>(in
ReadOnlyTensorSpan
<T> x, int rotateAmount)
6286
public static ref readonly TensorSpan<T> RotateRight<T>(scoped in
ReadOnlyTensorSpan
<T> x, int rotateAmount, in TensorSpan<T> destination)
6301
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6302
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x)
6311
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6313
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6320
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6323
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, int digits, MidpointRounding mode)
6332
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6336
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, int digits, MidpointRounding mode, in TensorSpan<T> destination)
6349
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6351
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, int digits)
6360
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6363
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, int digits, in TensorSpan<T> destination)
6376
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6378
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, MidpointRounding mode)
6387
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6390
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, MidpointRounding mode, in TensorSpan<T> destination)
6405
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6406
public static Tensor<T> Sigmoid<T>(in
ReadOnlyTensorSpan
<T> x)
6415
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6417
public static ref readonly TensorSpan<T> Sigmoid<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6426
/// Takes the sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
6428
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6429
public static Tensor<T> Sin<T>(in
ReadOnlyTensorSpan
<T> x)
6438
/// Takes the sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
6440
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6442
public static ref readonly TensorSpan<T> Sin<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6451
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6452
public static Tensor<T> Sinh<T>(in
ReadOnlyTensorSpan
<T> x)
6461
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6463
public static ref readonly TensorSpan<T> Sinh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6472
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6473
public static Tensor<T> SinPi<T>(in
ReadOnlyTensorSpan
<T> x)
6482
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6484
public static ref readonly TensorSpan<T> SinPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6493
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6494
public static Tensor<T> SoftMax<T>(in
ReadOnlyTensorSpan
<T> x)
6503
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6505
public static ref readonly TensorSpan<T> SoftMax<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6514
/// Takes the square root of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
6516
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the square root of.</param>
6517
public static Tensor<T> Sqrt<T>(in
ReadOnlyTensorSpan
<T> x)
6528
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the square root of.</param>
6530
public static ref readonly TensorSpan<T> Sqrt<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6543
public static T StdDev<T>(in
ReadOnlyTensorSpan
<T> x)
6554
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6556
public static Tensor<T> Subtract<T>(in
ReadOnlyTensorSpan
<T> x, T y)
6568
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to subtract.</param>
6569
public static Tensor<T> Subtract<T>(T x, in
ReadOnlyTensorSpan
<T> y)
6580
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> with values to be subtracted from.</param>
6581
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> with values to subtract.</param>
6582
public static Tensor<T> Subtract<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
6602
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> with values to be subtracted from.</param>
6605
public static ref readonly TensorSpan<T> Subtract<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
6615
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> values to subtract.</param>
6617
public static ref readonly TensorSpan<T> Subtract<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6626
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to be subtracted from.</param>
6627
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/>of values to subtract.</param>
6629
public static ref readonly TensorSpan<T> Subtract<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6642
public static T Sum<T>(scoped in
ReadOnlyTensorSpan
<T> x)
6655
internal static T SumOfSquares<T>(scoped in
ReadOnlyTensorSpan
<T> x)
6664
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6665
public static Tensor<T> Tan<T>(in
ReadOnlyTensorSpan
<T> x)
6674
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6676
public static ref readonly TensorSpan<T> Tan<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6685
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6686
public static Tensor<T> Tanh<T>(in
ReadOnlyTensorSpan
<T> x)
6695
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6697
public static ref readonly TensorSpan<T> Tanh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6706
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6707
public static Tensor<T> TanPi<T>(in
ReadOnlyTensorSpan
<T> x)
6716
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6718
public static ref readonly TensorSpan<T> TanPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6727
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6728
public static Tensor<T> TrailingZeroCount<T>(in
ReadOnlyTensorSpan
<T> x)
6737
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6739
public static ref readonly TensorSpan<T> TrailingZeroCount<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6748
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6749
public static Tensor<T> Truncate<T>(in
ReadOnlyTensorSpan
<T> x)
6758
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6760
public static ref readonly TensorSpan<T> Truncate<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6769
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6770
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6771
public static Tensor<T> Xor<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
6789
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6790
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6792
public static ref readonly TensorSpan<T> Xor<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6799
/// Computes the element-wise Xor of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
6801
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6803
public static Tensor<T> Xor<T>(in
ReadOnlyTensorSpan
<T> x, T y)
6812
/// Computes the element-wise Xor of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
6814
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6817
public static ref readonly TensorSpan<T> Xor<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
6862
private static T TensorPrimitivesHelperSpanInTOut<T>(scoped in
ReadOnlyTensorSpan
<T> input, PerformCalculationSpanInTOut<T> performCalculation)
6881
private static T TensorPrimitivesHelperTwoSpanInTOut<T>(scoped in
ReadOnlyTensorSpan
<T> left, scoped in
ReadOnlyTensorSpan
<T> right, PerformCalculationTwoSpanInTOut<T> performCalculation)
6913
private static ref readonly TensorSpan<TOut> TensorPrimitivesHelperSpanInSpanOut<TIn, TOut>(scoped in
ReadOnlyTensorSpan
<TIn> input, in TensorSpan<TOut> destination, PerformCalculationSpanInSpanOut<TIn, TOut> performCalculation)
6967
private static ref readonly TensorSpan<T> TensorPrimitivesHelperSpanInTInSpanOut<T>(scoped in
ReadOnlyTensorSpan
<T> input, T value, in TensorSpan<T> destination, PerformCalculationSpanInTInSpanOut<T> performCalculation)
7019
private static ref readonly TensorSpan<T> TensorPrimitivesHelperTInSpanInSpanOut<T>(T value, scoped in
ReadOnlyTensorSpan
<T> input, in TensorSpan<T> destination, PerformCalculationTInSpanInSpanOut<T> performCalculation)
7071
private static ref readonly TensorSpan<T> TensorPrimitivesHelperTwoSpanInSpanOut<T>(scoped in
ReadOnlyTensorSpan
<T> left, scoped in
ReadOnlyTensorSpan
<T> right, in TensorSpan<T> destination, PerformCalculationTwoSpanInSpanOut<T> performCalculation)
7094
ReadOnlyTensorSpan
<T> broadcastedLeft = Tensor.LazyBroadcast(left, newSize);
7095
ReadOnlyTensorSpan
<T> broadcastedRight = Tensor.LazyBroadcast(right, newSize);
System\Numerics\Tensors\netcore\TensorHelpers.cs (6)
18
public static nint CountTrueElements(scoped in
ReadOnlyTensorSpan
<bool> filter)
89
internal static bool IsUnderlyingStorageSameSize<T>(scoped in
ReadOnlyTensorSpan
<T> tensor1, scoped in
ReadOnlyTensorSpan
<T> tensor2)
95
internal static bool AreLengthsTheSame<T>(scoped in
ReadOnlyTensorSpan
<T> tensor1, scoped in
ReadOnlyTensorSpan
<T> tensor2)
101
internal static bool IsContiguousAndDense<T>(scoped in
ReadOnlyTensorSpan
<T> tensor)
System\Numerics\Tensors\netcore\TensorSpan.cs (6)
591
ReadOnlyTensorSpan
<T> srcSlice = Tensor.LazyBroadcast(this, tempLengths);
645
ReadOnlyTensorSpan
<T> srcSlice = Tensor.LazyBroadcast(this, tempLengths);
670
/// Implicitly converts a <see cref="TensorSpan{T}"/> to a <see cref="
ReadOnlyTensorSpan
{T}"/>
672
public static implicit operator
ReadOnlyTensorSpan
<T>(TensorSpan<T> span) =>
703
/// <returns>A <see cref="
ReadOnlyTensorSpan
{T}"/> based on the provided <paramref name="lengths"/>.</returns>
718
/// <returns>A <see cref="
ReadOnlyTensorSpan
{T}"/> based on the provided <paramref name="ranges"/>.</returns>
System\Numerics\Tensors\netcore\TensorSpanDebugView.cs (1)
21
public TensorSpanDebugView(
ReadOnlyTensorSpan
<T> span)
System\Numerics\Tensors\netcore\TensorSpanHelpers.cs (2)
15
internal static bool AreShapesTheSame<T>(
ReadOnlyTensorSpan
<T> tensor1,
ReadOnlyTensorSpan
<T> tensor2)