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);
907 references to ReadOnlyTensorSpan
System.Numerics.Tensors (907)
System\Numerics\Tensors\netcore\IReadOnlyTensor.cs (8)
65
/// <returns>The converted <see cref="
ReadOnlyTensorSpan
{T}"/>.</returns>
66
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan();
72
/// <returns>The converted <see cref="
ReadOnlyTensorSpan
{T}"/>.</returns>
73
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<nint> start);
79
/// <returns>The converted <see cref="
ReadOnlyTensorSpan
{T}"/>.</returns>
80
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NIndex> startIndex);
86
/// <returns>The converted <see cref="
ReadOnlyTensorSpan
{T}"/>.</returns>
87
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)
383
public static implicit operator
ReadOnlyTensorSpan
<T>(Tensor<T> value) => new ReadOnlyTensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(value._values), value._lengths, value._strides, value.FlattenedLength);
413
/// Converts this <see cref="Tensor{T}"/> to a <see cref="
ReadOnlyTensorSpan
{T}"/> pointing to the same backing memory."/>
415
/// <returns><see cref="
ReadOnlyTensorSpan
{T}"/></returns>
416
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(_values), _lengths, _strides, _flattenedLength);
419
/// Converts this <see cref="Tensor{T}"/> to a <see cref="
ReadOnlyTensorSpan
{T}"/> pointing to the same backing memory based on the provided ranges."/>
421
/// <param name="start">The ranges you want in the <see cref="
ReadOnlyTensorSpan
{T}"/></param>
423
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NRange> start) => AsTensorSpan().Slice(start);
426
/// Converts this <see cref="Tensor{T}"/> to a <see cref="
ReadOnlyTensorSpan
{T}"/> pointing to the same backing memory based on the provided start locations."/>
428
/// <param name="start">The start locations you want in the <see cref="
ReadOnlyTensorSpan
{T}"/></param>
430
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<nint> start) => Slice(start);
433
/// Converts this <see cref="Tensor{T}"/> to a <see cref="
ReadOnlyTensorSpan
{T}"/> pointing to the same backing memory based on the provided start indexes."/>
435
/// <param name="startIndex">The start indexes you want in the <see cref="
ReadOnlyTensorSpan
{T}"/></param>
437
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NIndex> startIndex) => AsTensorSpan().Slice(startIndex);
670
((
ReadOnlyTensorSpan
<T>)AsTensorSpan()).ToString(sb, maximumLengths);
System\Numerics\Tensors\netcore\TensorExtensions.cs (843)
34
public static
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan<T>(this T[]? array, params scoped ReadOnlySpan<nint> lengths) => new(array, 0, lengths, default);
54
public static T Average<T>(scoped in
ReadOnlyTensorSpan
<T> x)
68
public static Tensor<T> Broadcast<T>(scoped in
ReadOnlyTensorSpan
<T> source, scoped in
ReadOnlyTensorSpan
<T> lengthsSource)
80
public static Tensor<T> Broadcast<T>(scoped in
ReadOnlyTensorSpan
<T> source, scoped ReadOnlySpan<nint> lengths)
84
ReadOnlyTensorSpan
<T> intermediate = LazyBroadcast(source, newSize);
103
ReadOnlyTensorSpan
<T> intermediate = LazyBroadcast(source, newSize);
118
ReadOnlyTensorSpan
<T> intermediate = LazyBroadcast(source, newSize);
127
public static void BroadcastTo<T>(in this
ReadOnlyTensorSpan
<T> source, in TensorSpan<T> destination)
133
ReadOnlyTensorSpan
<T> intermediate = LazyBroadcast(source, newSize);
189
internal static
ReadOnlyTensorSpan
<T> LazyBroadcast<T>(in
ReadOnlyTensorSpan
<T> input, ReadOnlySpan<nint> shape)
447
/// 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
450
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
451
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
453
public static Tensor<bool> Equals<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
472
/// 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
475
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
476
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
479
public static ref readonly TensorSpan<bool> Equals<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
528
/// 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
531
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
534
public static Tensor<bool> Equals<T>(in
ReadOnlyTensorSpan
<T> x, T y)
543
/// 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
546
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
550
public static ref readonly TensorSpan<bool> Equals<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
586
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are equal to <paramref name="y"/>.
590
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
591
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
593
public static bool EqualsAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
598
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
599
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
630
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are equal to <paramref name="y"/>.
634
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
635
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
637
public static bool EqualsAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
671
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are equal to <paramref name="y"/>.
675
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
676
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
678
public static bool EqualsAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
682
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
683
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
714
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are equal to <paramref name="y"/>.
718
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
721
public static bool EqualsAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
760
public static ref readonly TensorSpan<T> FilteredUpdate<T>(in this TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<bool> filter, T value)
786
public static ref readonly TensorSpan<T> FilteredUpdate<T>(in this TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<bool> filter, scoped in
ReadOnlyTensorSpan
<T> values)
812
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are greater than <paramref name="y"/>.
817
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
818
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
821
public static Tensor<bool> GreaterThan<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
840
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are greater than <paramref name="y"/>.
845
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
846
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
850
public static ref readonly TensorSpan<bool> GreaterThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
899
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than <paramref name="y"/>.
903
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
907
public static Tensor<bool> GreaterThan<T>(in
ReadOnlyTensorSpan
<T> x, T y)
916
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than <paramref name="y"/>.
920
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
925
public static ref readonly TensorSpan<bool> GreaterThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
963
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
967
public static Tensor<bool> GreaterThan<T>(T x, in
ReadOnlyTensorSpan
<T> y)
980
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
985
public static ref readonly TensorSpan<bool> GreaterThan<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1021
/// 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"/>.
1026
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1027
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1030
public static Tensor<bool> GreaterThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1049
/// 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"/>.
1054
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1055
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1059
public static ref readonly TensorSpan<bool> GreaterThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1108
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than or equal to <paramref name="y"/>.
1112
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1116
public static Tensor<bool> GreaterThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1125
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than or equal to <paramref name="y"/>.
1129
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1134
public static ref readonly TensorSpan<bool> GreaterThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
1172
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1176
public static Tensor<bool> GreaterThanOrEqual<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1189
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1194
public static ref readonly TensorSpan<bool> GreaterThanOrEqual<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1230
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1234
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1235
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1237
public static bool GreaterThanAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1241
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
1242
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
1273
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1277
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1280
public static bool GreaterThanAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1312
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are greater than <paramref name="x"/>.
1316
/// <param name="y">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1319
public static bool GreaterThanAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1353
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1357
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1358
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1360
public static bool GreaterThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1364
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
1365
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
1396
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1400
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1403
public static bool GreaterThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1435
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are greater than <paramref name="x"/>.
1439
/// <param name="y">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1442
public static bool GreaterThanOrEqualAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1476
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1480
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1481
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1483
public static bool GreaterThanAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1488
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
1489
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
1520
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1524
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1525
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1527
public static bool GreaterThanAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1559
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are greater than <paramref name="y"/>.
1563
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1564
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1566
public static bool GreaterThanAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1600
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1604
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1605
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1607
public static bool GreaterThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1612
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
1613
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
1644
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1648
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1649
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1651
public static bool GreaterThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1683
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are greater than <paramref name="y"/>.
1687
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1688
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1690
public static bool GreaterThanOrEqualAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1724
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
1729
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1730
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1733
public static Tensor<bool> LessThan<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1752
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
1757
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1758
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1762
public static ref readonly TensorSpan<bool> LessThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1819
public static Tensor<bool> LessThan<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1837
public static ref readonly TensorSpan<bool> LessThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
1879
public static Tensor<bool> LessThan<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1897
public static ref readonly TensorSpan<bool> LessThan<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1933
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
1938
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1939
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1942
public static Tensor<bool> LessThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1961
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
1966
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1967
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1971
public static ref readonly TensorSpan<bool> LessThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
2028
public static Tensor<bool> LessThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2046
public static ref readonly TensorSpan<bool> LessThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
2088
public static Tensor<bool> LessThanOrEqual<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2106
public static ref readonly TensorSpan<bool> LessThanOrEqual<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
2142
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
2146
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2147
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
2149
public static bool LessThanAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2154
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
2155
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
2186
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
2190
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2193
public static bool LessThanAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2225
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are less than <paramref name="y"/>.
2232
public static bool LessThanAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2266
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
2270
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2271
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
2273
public static bool LessThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2278
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
2279
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
2310
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
2314
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2317
public static bool LessThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2349
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are less than <paramref name="y"/>.
2356
public static bool LessThanOrEqualAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2390
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
2394
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2395
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
2397
public static bool LessThanAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2401
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
2402
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
2433
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
2437
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2440
public static bool LessThanAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2472
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are less than <paramref name="x"/>.
2479
public static bool LessThanAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2513
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
2517
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2518
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
2520
public static bool LessThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2524
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
2525
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
2556
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
2560
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2563
public static bool LessThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2595
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are less than <paramref name="x"/>.
2602
public static bool LessThanOrEqualAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2869
public static
ReadOnlyTensorSpan
<T> Reshape<T>(in this
ReadOnlyTensorSpan
<T> tensor, params scoped ReadOnlySpan<nint> lengths)
2927
ReadOnlyTensorSpan
<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, arrLengths, strides, tensor._shape._memoryLength);
2990
/// <param name="tensor">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2992
public static void ResizeTo<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination)
3008
public static Tensor<T> Reverse<T>(in
ReadOnlyTensorSpan
<T> tensor)
3022
public static Tensor<T> ReverseDimension<T>(in
ReadOnlyTensorSpan
<T> tensor, int dimension)
3035
public static ref readonly TensorSpan<T> Reverse<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination)
3047
public static ref readonly TensorSpan<T> ReverseDimension<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination, int dimension)
3093
ReadOnlyTensorSpan
<T> islice = tensor.Slice(tensor.Lengths);
3118
public static bool SequenceEqual<T>(this scoped in TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<T> other)
3130
public static bool SequenceEqual<T>(this scoped in
ReadOnlyTensorSpan
<T> tensor, scoped in
ReadOnlyTensorSpan
<T> other)
3147
public static Tensor<T> SetSlice<T>(this Tensor<T> tensor, in
ReadOnlyTensorSpan
<T> values, params ReadOnlySpan<NRange> ranges)
3160
public static ref readonly TensorSpan<T> SetSlice<T>(this in TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<T> values, params scoped ReadOnlySpan<NRange> ranges)
3192
public static Tensor<T>[] Split<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, int splitCount, nint dimension)
3239
ReadOnlyTensorSpan
<T> islice = tensor.Slice(tensor.Lengths);
3378
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> to remove all dimensions of length 1.</param>
3379
public static
ReadOnlyTensorSpan
<T> Squeeze<T>(in this
ReadOnlyTensorSpan
<T> tensor)
3388
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> to remove dimension of length 1.</param>
3390
public static
ReadOnlyTensorSpan
<T> SqueezeDimension<T>(in this
ReadOnlyTensorSpan
<T> tensor, int dimension)
3514
public static T StdDev<T>(in
ReadOnlyTensorSpan
<T> x)
3546
((
ReadOnlyTensorSpan
<T>)tensor).ToString(maximumLengths);
3549
/// Creates a <see cref="string"/> representation of the <see cref="
ReadOnlyTensorSpan
{T}"/>."/>
3552
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> you want to represent as a string.</param>
3554
public static string ToString<T>(this in
ReadOnlyTensorSpan
<T> tensor, params ReadOnlySpan<nint> maximumLengths)
3561
internal static void ToString<T>(this in
ReadOnlyTensorSpan
<T> tensor, StringBuilder sb, params ReadOnlySpan<nint> maximumLengths)
3585
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]);
3605
public static string ToString<T>(this Tensor<T> tensor, params ReadOnlySpan<nint> maximumLengths) => ((
ReadOnlyTensorSpan
<T>)tensor).ToString(maximumLengths);
3639
return TryBroadcastTo((
ReadOnlyTensorSpan
<T>)tensor, destination);
3650
return TryBroadcastTo((
ReadOnlyTensorSpan
<T>)tensor, destination);
3657
/// <param name="tensor">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3659
public static bool TryBroadcastTo<T>(in this
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination)
3751
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> to add a dimension of length 1.</param>
3753
public static
ReadOnlyTensorSpan
<T> Unsqueeze<T>(in this
ReadOnlyTensorSpan
<T> tensor, int dimension)
3791
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the abs of.</param>
3792
public static Tensor<T> Abs<T>(in
ReadOnlyTensorSpan
<T> x)
3801
/// Takes the absolute value of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3805
public static ref readonly TensorSpan<T> Abs<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3816
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3817
public static Tensor<T> Acos<T>(in
ReadOnlyTensorSpan
<T> x)
3830
public static ref readonly TensorSpan<T> Acos<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3839
/// 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.
3841
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3842
public static Tensor<T> Acosh<T>(in
ReadOnlyTensorSpan
<T> x)
3855
public static ref readonly TensorSpan<T> Acosh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3866
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3867
public static Tensor<T> AcosPi<T>(in
ReadOnlyTensorSpan
<T> x)
3878
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3880
public static ref readonly TensorSpan<T> AcosPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3891
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3892
/// <param name="y">The second <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3893
public static Tensor<T> Add<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3913
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3915
public static Tensor<T> Add<T>(in
ReadOnlyTensorSpan
<T> x, T y)
3924
/// 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.
3926
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3927
/// <param name="y">The second <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3929
public static ref readonly TensorSpan<T> Add<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3938
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3941
public static ref readonly TensorSpan<T> Add<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
3950
/// Takes the inverse sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3952
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3953
public static Tensor<T> Asin<T>(in
ReadOnlyTensorSpan
<T> x)
3962
/// Takes the inverse sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3964
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3966
public static ref readonly TensorSpan<T> Asin<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3975
/// 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.
3977
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3978
public static Tensor<T> Asinh<T>(in
ReadOnlyTensorSpan
<T> x)
3987
/// 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.
3989
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3991
public static ref readonly TensorSpan<T> Asinh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4000
/// 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.
4002
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4003
public static Tensor<T> AsinPi<T>(in
ReadOnlyTensorSpan
<T> x)
4012
/// 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.
4014
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4016
public static ref readonly TensorSpan<T> AsinPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4025
/// Takes the arc tangent of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4027
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4028
public static Tensor<T> Atan<T>(in
ReadOnlyTensorSpan
<T> x)
4037
/// Takes the arc tangent of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4039
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4041
public static ref readonly TensorSpan<T> Atan<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4050
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4052
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4053
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4054
public static Tensor<T> Atan2<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4072
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4074
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4075
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4077
public static ref readonly TensorSpan<T> Atan2<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4084
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4086
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4087
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4088
public static Tensor<T> Atan2<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4098
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4100
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4101
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4103
public static ref readonly TensorSpan<T> Atan2<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4110
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4112
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4113
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4114
public static Tensor<T> Atan2<T>(T x, in
ReadOnlyTensorSpan
<T> y)
4124
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4126
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4127
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4129
public static ref readonly TensorSpan<T> Atan2<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4138
/// 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.
4140
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4141
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4142
public static Tensor<T> Atan2Pi<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4160
/// 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.
4162
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4163
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4165
public static ref readonly TensorSpan<T> Atan2Pi<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4172
/// 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.
4174
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4175
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4176
public static Tensor<T> Atan2Pi<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4186
/// 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.
4188
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4189
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4191
public static ref readonly TensorSpan<T> Atan2Pi<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4198
/// 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.
4200
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4201
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4202
public static Tensor<T> Atan2Pi<T>(T x, in
ReadOnlyTensorSpan
<T> y)
4212
/// 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.
4214
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4215
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4217
public static ref readonly TensorSpan<T> Atan2Pi<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4227
/// 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.
4229
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4230
public static Tensor<T> Atanh<T>(in
ReadOnlyTensorSpan
<T> x)
4239
/// 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.
4241
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4243
public static ref readonly TensorSpan<T> Atanh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4252
/// 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.
4254
/// <param name="x">The input<see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4255
public static Tensor<T> AtanPi<T>(in
ReadOnlyTensorSpan
<T> x)
4264
/// 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.
4266
/// <param name="x">The input<see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4268
public static ref readonly TensorSpan<T> AtanPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4277
/// 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.
4279
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4280
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4281
public static Tensor<T> BitwiseAnd<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4299
/// 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.
4301
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4302
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4304
public static ref readonly TensorSpan<T> BitwiseAnd<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4311
/// 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.
4313
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4315
public static Tensor<T> BitwiseAnd<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4325
/// 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.
4327
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4330
public static ref readonly TensorSpan<T> BitwiseAnd<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4339
/// 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.
4341
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4342
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4343
public static Tensor<T> BitwiseOr<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4361
/// 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.
4363
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4364
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4366
public static ref readonly TensorSpan<T> BitwiseOr<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4373
/// 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.
4375
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4377
public static Tensor<T> BitwiseOr<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4387
/// 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.
4389
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4392
public static ref readonly TensorSpan<T> BitwiseOr<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4401
/// Computes the element-wise cube root of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4403
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4404
public static Tensor<T> Cbrt<T>(in
ReadOnlyTensorSpan
<T> x)
4413
/// Computes the element-wise cube root of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4415
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4417
public static ref readonly TensorSpan<T> Cbrt<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4426
/// Computes the element-wise ceiling of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4428
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4429
public static Tensor<T> Ceiling<T>(in
ReadOnlyTensorSpan
<T> x)
4438
/// Computes the element-wise ceiling of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4440
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4442
public static ref readonly TensorSpan<T> Ceiling<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4451
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
4454
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4455
public static Tensor<TTo> ConvertChecked<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
4471
public static ref readonly TensorSpan<TTo> ConvertChecked<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
4481
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
4484
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4485
public static Tensor<TTo> ConvertSaturating<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
4501
public static ref readonly TensorSpan<TTo> ConvertSaturating<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
4511
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
4514
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4515
public static Tensor<TTo> ConvertTruncating<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
4531
public static ref readonly TensorSpan<TTo> ConvertTruncating<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
4543
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4545
public static Tensor<T> CopySign<T>(in
ReadOnlyTensorSpan
<T> x, T sign)
4557
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4558
/// <param name="sign">The <see cref="
ReadOnlyTensorSpan
{T}"/> with the associated signs.</param>
4559
public static Tensor<T> CopySign<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> sign)
4579
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4582
public static ref readonly TensorSpan<T> CopySign<T>(scoped in
ReadOnlyTensorSpan
<T> x, T sign, in TensorSpan<T> destination)
4591
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4592
/// <param name="sign">The <see cref="
ReadOnlyTensorSpan
{T}"/> with the associated signs.</param>
4594
public static ref readonly TensorSpan<T> CopySign<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> sign, in TensorSpan<T> destination)
4603
/// Takes the cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4605
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
4606
public static Tensor<T> Cos<T>(in
ReadOnlyTensorSpan
<T> x)
4615
/// Takes the cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4617
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
4619
public static ref readonly TensorSpan<T> Cos<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4628
/// Takes the hyperbolic cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4630
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
4631
public static Tensor<T> Cosh<T>(in
ReadOnlyTensorSpan
<T> x)
4640
/// Takes the hyperbolic cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4642
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
4644
public static ref readonly TensorSpan<T> Cosh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4655
/// <param name="x">The first <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4656
/// <param name="y">The second <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4657
public static Tensor<T> CosineSimilarity<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4684
/// <param name="x">The first <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4685
/// <param name="y">The second <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4687
public static ref readonly TensorSpan<T> CosineSimilarity<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4735
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4748
public static Tensor<T> CosPi<T>(in
ReadOnlyTensorSpan
<T> x)
4757
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4771
public static ref readonly TensorSpan<T> CosPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4782
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4783
public static Tensor<T> DegreesToRadians<T>(in
ReadOnlyTensorSpan
<T> x)
4794
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4796
public static ref readonly TensorSpan<T> DegreesToRadians<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4807
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4808
/// <param name="y">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4809
public static T Distance<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y)
4820
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4822
public static Tensor<T> Divide<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4834
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> divisor.</param>
4835
public static Tensor<T> Divide<T>(T x, in
ReadOnlyTensorSpan
<T> y)
4845
/// a new <see cref="
ReadOnlyTensorSpan
{T}"/> with the result.
4847
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to be divided.</param>
4848
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> divisor.</param>
4849
public static Tensor<T> Divide<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4869
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4872
public static ref readonly TensorSpan<T> Divide<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4882
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> divisor.</param>
4884
public static ref readonly TensorSpan<T> Divide<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4894
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to be divided.</param>
4895
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> divisor.</param>
4897
public static ref readonly TensorSpan<T> Divide<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4908
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4909
/// <param name="y">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4910
public static T Dot<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4921
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4922
public static Tensor<T> Exp<T>(in
ReadOnlyTensorSpan
<T> x)
4933
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4935
public static ref readonly TensorSpan<T> Exp<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4946
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4947
public static Tensor<T> Exp10<T>(in
ReadOnlyTensorSpan
<T> x)
4958
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4960
public static ref readonly TensorSpan<T> Exp10<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4969
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4970
public static Tensor<T> Exp10M1<T>(in
ReadOnlyTensorSpan
<T> x)
4979
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4981
public static ref readonly TensorSpan<T> Exp10M1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4990
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4991
public static Tensor<T> Exp2<T>(in
ReadOnlyTensorSpan
<T> x)
5000
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5002
public static ref readonly TensorSpan<T> Exp2<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5011
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5012
public static Tensor<T> Exp2M1<T>(in
ReadOnlyTensorSpan
<T> x)
5021
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5023
public static ref readonly TensorSpan<T> Exp2M1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5032
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5033
public static Tensor<T> ExpM1<T>(in
ReadOnlyTensorSpan
<T> x)
5042
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5044
public static ref readonly TensorSpan<T> ExpM1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5053
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5054
public static Tensor<T> Floor<T>(in
ReadOnlyTensorSpan
<T> x)
5063
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5065
public static ref readonly TensorSpan<T> Floor<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5077
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5078
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5079
public static Tensor<T> Hypot<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5100
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5101
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5103
public static ref readonly TensorSpan<T> Hypot<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5113
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5114
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5115
public static Tensor<T> Ieee754Remainder<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5134
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5135
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5137
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5144
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5145
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5146
public static Tensor<T> Ieee754Remainder<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5156
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5157
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5159
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5166
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5167
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5168
public static Tensor<T> Ieee754Remainder<T>(T x, in
ReadOnlyTensorSpan
<T> y)
5178
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5179
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5181
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5190
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5191
public static Tensor<int> ILogB<T>(in
ReadOnlyTensorSpan
<T> x)
5200
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5202
public static ref readonly TensorSpan<int> ILogB<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<int> destination)
5211
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5212
public static int IndexOfMax<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5222
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5223
public static int IndexOfMaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5233
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5234
public static int IndexOfMin<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5246
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5247
public static int IndexOfMinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5259
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5260
public static Tensor<T> LeadingZeroCount<T>(in
ReadOnlyTensorSpan
<T> x)
5271
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5273
public static ref readonly TensorSpan<T> LeadingZeroCount<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5282
/// Takes the natural logarithm of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
5284
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
5285
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x)
5294
/// Takes the natural logarithm of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
5296
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
5298
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5307
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5328
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5337
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5350
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5359
/// 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.
5361
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
5362
public static Tensor<T> Log10<T>(in
ReadOnlyTensorSpan
<T> x)
5371
/// 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.
5373
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
5375
public static ref readonly TensorSpan<T> Log10<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5384
/// 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.
5386
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
5387
public static Tensor<T> Log10P1<T>(in
ReadOnlyTensorSpan
<T> x)
5396
/// 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.
5398
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
5400
public static ref readonly TensorSpan<T> Log10P1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5409
/// 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.
5411
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
5412
public static Tensor<T> Log2<T>(in
ReadOnlyTensorSpan
<T> x)
5421
/// 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.
5423
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
5425
public static ref readonly TensorSpan<T> Log2<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5434
/// 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.
5436
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
5437
public static Tensor<T> Log2P1<T>(in
ReadOnlyTensorSpan
<T> x)
5446
/// 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.
5448
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
5450
public static ref readonly TensorSpan<T> Log2P1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5459
/// 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.
5461
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
5462
public static Tensor<T> LogP1<T>(in
ReadOnlyTensorSpan
<T> x)
5471
/// 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.
5473
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
5475
public static ref readonly TensorSpan<T> LogP1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5484
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>..</param>
5485
public static T Max<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5494
public static Tensor<T> Max<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5515
public static ref readonly TensorSpan<T> Max<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5524
public static Tensor<T> Max<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5536
public static ref readonly TensorSpan<T> Max<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5545
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>..</param>
5546
public static T MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5555
public static Tensor<T> MaxMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5576
public static ref readonly TensorSpan<T> MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5585
public static Tensor<T> MaxMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5597
public static ref readonly TensorSpan<T> MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5606
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>..</param>
5607
public static T MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5616
public static Tensor<T> MaxMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5637
public static ref readonly TensorSpan<T> MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5646
public static Tensor<T> MaxMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5658
public static ref readonly TensorSpan<T> MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5667
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>..</param>
5668
public static T MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5677
public static Tensor<T> MaxNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5698
public static ref readonly TensorSpan<T> MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5707
public static Tensor<T> MaxNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5719
public static ref readonly TensorSpan<T> MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5728
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5729
public static T Min<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5738
public static Tensor<T> Min<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5759
public static ref readonly TensorSpan<T> Min<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5768
public static Tensor<T> Min<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5780
public static ref readonly TensorSpan<T> Min<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5789
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5790
public static T MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5799
public static Tensor<T> MinMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5820
public static ref readonly TensorSpan<T> MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5829
public static Tensor<T> MinMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5841
public static ref readonly TensorSpan<T> MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5850
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>..</param>
5851
public static T MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5860
public static Tensor<T> MinMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5881
public static ref readonly TensorSpan<T> MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5890
public static Tensor<T> MinMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5902
public static ref readonly TensorSpan<T> MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5912
public static T MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5921
public static Tensor<T> MinNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5942
public static ref readonly TensorSpan<T> MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5951
public static Tensor<T> MinNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5963
public static ref readonly TensorSpan<T> MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5974
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
5976
public static Tensor<T> Multiply<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5980
Multiply((
ReadOnlyTensorSpan
<T>)x, y, output);
5988
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/> for multiplication.</param>
5989
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/> for multiplication.</param>
5990
public static Tensor<T> Multiply<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
6003
Multiply((
ReadOnlyTensorSpan
<T>)x, y, output);
6010
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6013
public static ref readonly TensorSpan<T> Multiply<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
6026
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/> for multiplication.</param>
6027
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/> for multiplication.</param>
6029
public static ref readonly TensorSpan<T> Multiply<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6038
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6039
public static Tensor<T> Negate<T>(in
ReadOnlyTensorSpan
<T> x)
6048
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6050
public static ref readonly TensorSpan<T> Negate<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6059
/// Takes the norm of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns the result.
6061
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the norm of.</param>
6062
public static T Norm<T>(scoped in
ReadOnlyTensorSpan
<T> x)
6071
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6072
public static Tensor<T> OnesComplement<T>(in
ReadOnlyTensorSpan
<T> x)
6081
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6083
public static ref readonly TensorSpan<T> OnesComplement<T>(scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6092
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6093
public static Tensor<T> PopCount<T>(in
ReadOnlyTensorSpan
<T> x)
6102
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6104
public static ref readonly TensorSpan<T> PopCount<T>(scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6113
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6114
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6115
public static Tensor<T> Pow<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
6133
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6134
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6136
public static ref readonly TensorSpan<T> Pow<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6143
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6145
public static Tensor<T> Pow<T>(in
ReadOnlyTensorSpan
<T> x, T y)
6155
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6156
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6158
public static ref readonly TensorSpan<T> Pow<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
6165
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6167
public static Tensor<T> Pow<T>(T x, in
ReadOnlyTensorSpan
<T> y)
6177
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6178
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6180
public static ref readonly TensorSpan<T> Pow<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6189
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6190
public static T Product<T>(scoped in
ReadOnlyTensorSpan
<T> x)
6199
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6200
public static Tensor<T> RadiansToDegrees<T>(in
ReadOnlyTensorSpan
<T> x)
6209
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6211
public static ref readonly TensorSpan<T> RadiansToDegrees<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6220
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6221
public static Tensor<T> Reciprocal<T>(in
ReadOnlyTensorSpan
<T> x)
6230
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6232
public static ref readonly TensorSpan<T> Reciprocal<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6243
public static Tensor<T> RootN<T>(in
ReadOnlyTensorSpan
<T> x, int n)
6255
public static ref readonly TensorSpan<T> RootN<T>(scoped in
ReadOnlyTensorSpan
<T> x, int n, in TensorSpan<T> destination)
6273
public static Tensor<T> RotateLeft<T>(in
ReadOnlyTensorSpan
<T> x, int rotateAmount)
6286
public static ref readonly TensorSpan<T> RotateLeft<T>(scoped in
ReadOnlyTensorSpan
<T> x, int rotateAmount, in TensorSpan<T> destination)
6304
public static Tensor<T> RotateRight<T>(in
ReadOnlyTensorSpan
<T> x, int rotateAmount)
6317
public static ref readonly TensorSpan<T> RotateRight<T>(scoped in
ReadOnlyTensorSpan
<T> x, int rotateAmount, in TensorSpan<T> destination)
6332
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6333
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x)
6342
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6344
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6351
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6354
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, int digits, MidpointRounding mode)
6363
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6367
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, int digits, MidpointRounding mode, in TensorSpan<T> destination)
6380
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6382
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, int digits)
6391
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6394
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, int digits, in TensorSpan<T> destination)
6407
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6409
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, MidpointRounding mode)
6418
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6421
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, MidpointRounding mode, in TensorSpan<T> destination)
6436
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6437
public static Tensor<T> Sigmoid<T>(in
ReadOnlyTensorSpan
<T> x)
6446
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6448
public static ref readonly TensorSpan<T> Sigmoid<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6457
/// Takes the sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
6459
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6460
public static Tensor<T> Sin<T>(in
ReadOnlyTensorSpan
<T> x)
6469
/// Takes the sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
6471
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6473
public static ref readonly TensorSpan<T> Sin<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6482
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6483
public static Tensor<T> Sinh<T>(in
ReadOnlyTensorSpan
<T> x)
6492
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6494
public static ref readonly TensorSpan<T> Sinh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6503
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6504
public static Tensor<T> SinPi<T>(in
ReadOnlyTensorSpan
<T> x)
6513
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6515
public static ref readonly TensorSpan<T> SinPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6524
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6525
public static Tensor<T> SoftMax<T>(in
ReadOnlyTensorSpan
<T> x)
6534
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6536
public static ref readonly TensorSpan<T> SoftMax<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6545
/// Takes the square root of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
6547
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the square root of.</param>
6548
public static Tensor<T> Sqrt<T>(in
ReadOnlyTensorSpan
<T> x)
6559
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the square root of.</param>
6561
public static ref readonly TensorSpan<T> Sqrt<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6572
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6574
public static Tensor<T> Subtract<T>(in
ReadOnlyTensorSpan
<T> x, T y)
6586
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to subtract.</param>
6587
public static Tensor<T> Subtract<T>(T x, in
ReadOnlyTensorSpan
<T> y)
6598
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> with values to be subtracted from.</param>
6599
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> with values to subtract.</param>
6600
public static Tensor<T> Subtract<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
6620
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> with values to be subtracted from.</param>
6623
public static ref readonly TensorSpan<T> Subtract<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
6633
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> values to subtract.</param>
6635
public static ref readonly TensorSpan<T> Subtract<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6644
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to be subtracted from.</param>
6645
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/>of values to subtract.</param>
6647
public static ref readonly TensorSpan<T> Subtract<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6660
public static T Sum<T>(scoped in
ReadOnlyTensorSpan
<T> x)
6669
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6670
public static Tensor<T> Tan<T>(in
ReadOnlyTensorSpan
<T> x)
6679
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6681
public static ref readonly TensorSpan<T> Tan<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6690
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6691
public static Tensor<T> Tanh<T>(in
ReadOnlyTensorSpan
<T> x)
6700
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6702
public static ref readonly TensorSpan<T> Tanh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6711
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6712
public static Tensor<T> TanPi<T>(in
ReadOnlyTensorSpan
<T> x)
6721
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6723
public static ref readonly TensorSpan<T> TanPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6732
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6733
public static Tensor<T> TrailingZeroCount<T>(in
ReadOnlyTensorSpan
<T> x)
6742
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6744
public static ref readonly TensorSpan<T> TrailingZeroCount<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6753
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6754
public static Tensor<T> Truncate<T>(in
ReadOnlyTensorSpan
<T> x)
6763
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6765
public static ref readonly TensorSpan<T> Truncate<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6774
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6775
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6776
public static Tensor<T> Xor<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
6794
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6795
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6797
public static ref readonly TensorSpan<T> Xor<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6804
/// Computes the element-wise Xor of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
6806
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6808
public static Tensor<T> Xor<T>(in
ReadOnlyTensorSpan
<T> x, T y)
6817
/// Computes the element-wise Xor of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
6819
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6822
public static ref readonly TensorSpan<T> Xor<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
6867
private static T TensorPrimitivesHelperSpanInTOut<T>(scoped in
ReadOnlyTensorSpan
<T> input, PerformCalculationSpanInTOut<T> performCalculation)
6886
private static T TensorPrimitivesHelperTwoSpanInTOut<T>(scoped in
ReadOnlyTensorSpan
<T> left, scoped in
ReadOnlyTensorSpan
<T> right, PerformCalculationTwoSpanInTOut<T> performCalculation)
6918
private static ref readonly TensorSpan<TOut> TensorPrimitivesHelperSpanInSpanOut<TIn, TOut>(scoped in
ReadOnlyTensorSpan
<TIn> input, in TensorSpan<TOut> destination, PerformCalculationSpanInSpanOut<TIn, TOut> performCalculation)
6972
private static ref readonly TensorSpan<T> TensorPrimitivesHelperSpanInTInSpanOut<T>(scoped in
ReadOnlyTensorSpan
<T> input, T value, in TensorSpan<T> destination, PerformCalculationSpanInTInSpanOut<T> performCalculation)
7024
private static ref readonly TensorSpan<T> TensorPrimitivesHelperTInSpanInSpanOut<T>(T value, scoped in
ReadOnlyTensorSpan
<T> input, in TensorSpan<T> destination, PerformCalculationTInSpanInSpanOut<T> performCalculation)
7076
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)
7099
ReadOnlyTensorSpan
<T> broadcastedLeft = Tensor.LazyBroadcast(left, newSize);
7100
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)