1 instantiation of ReadOnlyTensorSpan
System.Numerics.Tensors (1)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan.cs (1)
624
public static implicit operator ReadOnlyTensorSpan<T>(T[]? array) => new
ReadOnlyTensorSpan
<T>(array);
905 references to ReadOnlyTensorSpan
System.Numerics.Tensors (905)
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)
110
/// Creates a new <see cref="
ReadOnlyTensorSpan
{T}"/> over the provided <see cref="ReadOnlySpan{T}"/>. The new <see cref="
ReadOnlyTensorSpan
{T}"/> will
117
/// Creates a new <see cref="
ReadOnlyTensorSpan
{T}"/> over the provided <see cref="Span{T}"/> using the specified lengths and strides.
140
/// Creates a new <see cref="
ReadOnlyTensorSpan
{T}"/> over the provided <see cref="Array"/>. The new <see cref="
ReadOnlyTensorSpan
{T}"/> will
147
/// Creates a new <see cref="
ReadOnlyTensorSpan
{T}"/> over the provided <see cref="Array"/> using the specified start offsets, lengths, and strides.
191
/// Creates a new <see cref="
ReadOnlyTensorSpan
{T}"/> over the provided <see cref="Array"/> using the specified start offsets, lengths, and strides.
353
public
ReadOnlyTensorSpan
<T> this[params scoped ReadOnlySpan<NRange> ranges]
396
public static bool operator !=(
ReadOnlyTensorSpan
<T> left,
ReadOnlyTensorSpan
<T> right) => !(left == right);
402
public static bool operator ==(
ReadOnlyTensorSpan
<T> left,
ReadOnlyTensorSpan
<T> right) =>
435
public static
ReadOnlyTensorSpan
<T> Empty => default;
444
public static
ReadOnlyTensorSpan
<T> CastUp<TDerived>(
ReadOnlyTensorSpan
<TDerived> items) where TDerived : class?, T
452
/// <summary>Enumerates the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/>.</summary>
456
private readonly
ReadOnlyTensorSpan
<T> _span;
465
internal Enumerator(
ReadOnlyTensorSpan
<T> span)
545
ReadOnlyTensorSpan
<T> srcSlice = Tensor.LazyBroadcast(this, tempLengths);
601
ReadOnlyTensorSpan
<T> srcSlice = Tensor.LazyBroadcast(this, tempLengths);
624
public static implicit operator
ReadOnlyTensorSpan
<T>(T[]? array) => new ReadOnlyTensorSpan<T>(array);
638
public
ReadOnlyTensorSpan
<T> Slice(params scoped ReadOnlySpan<NIndex> indexes)
652
/// <returns>A <see cref="
ReadOnlyTensorSpan
{T}"/> based on the provided <paramref name="lengths"/>.</returns>
653
internal
ReadOnlyTensorSpan
<T> Slice(scoped ReadOnlySpan<nint> lengths)
667
/// <returns>A <see cref="
ReadOnlyTensorSpan
{T}"/> based on the provided <paramref name="ranges"/>.</returns>
669
public
ReadOnlyTensorSpan
<T> Slice(params scoped ReadOnlySpan<NRange> ranges)
674
ReadOnlyTensorSpan
<T> toReturn;
System\Numerics\Tensors\netcore\Tensor.cs (13)
384
public static implicit operator
ReadOnlyTensorSpan
<T>(Tensor<T> value) => new ReadOnlyTensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(value._values), value._lengths, value._strides, value.FlattenedLength);
414
/// Converts this <see cref="Tensor{T}"/> to a <see cref="
ReadOnlyTensorSpan
{T}"/> pointing to the same backing memory."/>
416
/// <returns><see cref="
ReadOnlyTensorSpan
{T}"/></returns>
417
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref MemoryMarshal.GetArrayDataReference(_values), _lengths, _strides, _flattenedLength);
420
/// Converts this <see cref="Tensor{T}"/> to a <see cref="
ReadOnlyTensorSpan
{T}"/> pointing to the same backing memory based on the provided ranges."/>
422
/// <param name="start">The ranges you want in the <see cref="
ReadOnlyTensorSpan
{T}"/></param>
424
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NRange> start) => AsTensorSpan().Slice(start);
427
/// Converts this <see cref="Tensor{T}"/> to a <see cref="
ReadOnlyTensorSpan
{T}"/> pointing to the same backing memory based on the provided start locations."/>
429
/// <param name="start">The start locations you want in the <see cref="
ReadOnlyTensorSpan
{T}"/></param>
431
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<nint> start) => Slice(start);
434
/// Converts this <see cref="Tensor{T}"/> to a <see cref="
ReadOnlyTensorSpan
{T}"/> pointing to the same backing memory based on the provided start indexes."/>
436
/// <param name="startIndex">The start indexes you want in the <see cref="
ReadOnlyTensorSpan
{T}"/></param>
438
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NIndex> startIndex) => AsTensorSpan().Slice(startIndex);
System\Numerics\Tensors\netcore\TensorExtensions.cs (842)
35
public static
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan<T>(this T[]? array, params scoped ReadOnlySpan<nint> lengths) => new(array, 0, lengths, default);
55
public static T Average<T>(scoped in
ReadOnlyTensorSpan
<T> x)
69
public static Tensor<T> Broadcast<T>(scoped in
ReadOnlyTensorSpan
<T> source, scoped in
ReadOnlyTensorSpan
<T> lengthsSource)
81
public static Tensor<T> Broadcast<T>(scoped in
ReadOnlyTensorSpan
<T> source, scoped ReadOnlySpan<nint> lengths)
85
ReadOnlyTensorSpan
<T> intermediate = LazyBroadcast(source, newSize);
104
ReadOnlyTensorSpan
<T> intermediate = LazyBroadcast(source, newSize);
119
ReadOnlyTensorSpan
<T> intermediate = LazyBroadcast(source, newSize);
128
public static void BroadcastTo<T>(in this
ReadOnlyTensorSpan
<T> source, in TensorSpan<T> destination)
134
ReadOnlyTensorSpan
<T> intermediate = LazyBroadcast(source, newSize);
190
internal static
ReadOnlyTensorSpan
<T> LazyBroadcast<T>(in
ReadOnlyTensorSpan
<T> input, ReadOnlySpan<nint> shape)
448
/// 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
451
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
452
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
454
public static Tensor<bool> Equals<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
473
/// 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
476
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
477
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
480
public static ref readonly TensorSpan<bool> Equals<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
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>
535
public static Tensor<bool> Equals<T>(in
ReadOnlyTensorSpan
<T> x, T y)
544
/// 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
547
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
551
public static ref readonly TensorSpan<bool> Equals<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
587
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are equal to <paramref name="y"/>.
591
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
592
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
594
public static bool EqualsAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
599
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
600
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
631
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are equal to <paramref name="y"/>.
635
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
636
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
638
public static bool EqualsAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
672
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are equal to <paramref name="y"/>.
676
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
677
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
679
public static bool EqualsAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
683
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
684
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
715
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are equal to <paramref name="y"/>.
719
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
722
public static bool EqualsAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
761
public static ref readonly TensorSpan<T> FilteredUpdate<T>(in this TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<bool> filter, T value)
787
public static ref readonly TensorSpan<T> FilteredUpdate<T>(in this TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<bool> filter, scoped in
ReadOnlyTensorSpan
<T> values)
813
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are greater than <paramref name="y"/>.
818
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
819
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
822
public static Tensor<bool> GreaterThan<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
841
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are greater than <paramref name="y"/>.
846
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
847
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
851
public static ref readonly TensorSpan<bool> GreaterThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
900
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than <paramref name="y"/>.
904
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
908
public static Tensor<bool> GreaterThan<T>(in
ReadOnlyTensorSpan
<T> x, T y)
917
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than <paramref name="y"/>.
921
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
926
public static ref readonly TensorSpan<bool> GreaterThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
964
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
968
public static Tensor<bool> GreaterThan<T>(T x, in
ReadOnlyTensorSpan
<T> y)
981
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
986
public static ref readonly TensorSpan<bool> GreaterThan<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1022
/// 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"/>.
1027
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1028
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1031
public static Tensor<bool> GreaterThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1050
/// 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"/>.
1055
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1056
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1060
public static ref readonly TensorSpan<bool> GreaterThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1109
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than or equal to <paramref name="y"/>.
1113
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1117
public static Tensor<bool> GreaterThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1126
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than or equal to <paramref name="y"/>.
1130
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1135
public static ref readonly TensorSpan<bool> GreaterThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
1173
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1177
public static Tensor<bool> GreaterThanOrEqual<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1190
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1195
public static ref readonly TensorSpan<bool> GreaterThanOrEqual<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1231
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1235
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1236
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1238
public static bool GreaterThanAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1242
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
1243
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
1274
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1278
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1281
public static bool GreaterThanAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1313
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are greater than <paramref name="x"/>.
1317
/// <param name="y">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1320
public static bool GreaterThanAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1354
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1358
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1359
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1361
public static bool GreaterThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1365
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
1366
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
1397
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1401
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1404
public static bool GreaterThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1436
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are greater than <paramref name="x"/>.
1440
/// <param name="y">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1443
public static bool GreaterThanOrEqualAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1477
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1481
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1482
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1484
public static bool GreaterThanAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1489
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
1490
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
1521
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1525
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1526
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1528
public static bool GreaterThanAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1560
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are greater than <paramref name="y"/>.
1564
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1565
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1567
public static bool GreaterThanAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1601
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1605
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1606
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1608
public static bool GreaterThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1613
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
1614
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
1645
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
1649
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1650
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1652
public static bool GreaterThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1684
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are greater than <paramref name="y"/>.
1688
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1689
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1691
public static bool GreaterThanOrEqualAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1725
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
1730
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1731
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1734
public static Tensor<bool> LessThan<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1753
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
1758
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1759
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1763
public static ref readonly TensorSpan<bool> LessThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1820
public static Tensor<bool> LessThan<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1838
public static ref readonly TensorSpan<bool> LessThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
1880
public static Tensor<bool> LessThan<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1898
public static ref readonly TensorSpan<bool> LessThan<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1934
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
1939
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1940
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1943
public static Tensor<bool> LessThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1962
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
1967
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1968
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1972
public static ref readonly TensorSpan<bool> LessThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
2029
public static Tensor<bool> LessThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2047
public static ref readonly TensorSpan<bool> LessThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
2089
public static Tensor<bool> LessThanOrEqual<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2107
public static ref readonly TensorSpan<bool> LessThanOrEqual<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
2143
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
2147
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2148
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
2150
public static bool LessThanAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2155
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
2156
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
2187
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
2191
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2194
public static bool LessThanAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2226
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are less than <paramref name="y"/>.
2233
public static bool LessThanAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2267
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
2271
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2272
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
2274
public static bool LessThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2279
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
2280
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
2311
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
2315
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2318
public static bool LessThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2350
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are less than <paramref name="y"/>.
2357
public static bool LessThanOrEqualAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2391
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
2395
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2396
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
2398
public static bool LessThanAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2402
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
2403
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
2434
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
2438
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2441
public static bool LessThanAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2473
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are less than <paramref name="x"/>.
2480
public static bool LessThanAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2514
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
2518
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2519
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
2521
public static bool LessThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2525
ReadOnlyTensorSpan
<T> broadcastedLeft = LazyBroadcast(x, newSize);
2526
ReadOnlyTensorSpan
<T> broadcastedRight = LazyBroadcast(y, newSize);
2557
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
2561
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
2564
public static bool LessThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2596
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are less than <paramref name="x"/>.
2603
public static bool LessThanOrEqualAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2864
public static
ReadOnlyTensorSpan
<T> Reshape<T>(in this
ReadOnlyTensorSpan
<T> tensor, params scoped ReadOnlySpan<nint> lengths)
2922
ReadOnlyTensorSpan
<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, arrLengths, strides, tensor._shape._memoryLength);
2985
/// <param name="tensor">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2987
public static void ResizeTo<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination)
3003
public static Tensor<T> Reverse<T>(in
ReadOnlyTensorSpan
<T> tensor)
3017
public static Tensor<T> ReverseDimension<T>(in
ReadOnlyTensorSpan
<T> tensor, int dimension)
3030
public static ref readonly TensorSpan<T> Reverse<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination)
3042
public static ref readonly TensorSpan<T> ReverseDimension<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination, int dimension)
3088
ReadOnlyTensorSpan
<T> islice = tensor.Slice(tensor.Lengths);
3113
public static bool SequenceEqual<T>(this scoped in TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<T> other)
3125
public static bool SequenceEqual<T>(this scoped in
ReadOnlyTensorSpan
<T> tensor, scoped in
ReadOnlyTensorSpan
<T> other)
3142
public static Tensor<T> SetSlice<T>(this Tensor<T> tensor, in
ReadOnlyTensorSpan
<T> values, params ReadOnlySpan<NRange> ranges)
3155
public static ref readonly TensorSpan<T> SetSlice<T>(this in TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<T> values, params scoped ReadOnlySpan<NRange> ranges)
3187
public static Tensor<T>[] Split<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, int splitCount, nint dimension)
3234
ReadOnlyTensorSpan
<T> islice = tensor.Slice(tensor.Lengths);
3373
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> to remove all dimensions of length 1.</param>
3374
public static
ReadOnlyTensorSpan
<T> Squeeze<T>(in this
ReadOnlyTensorSpan
<T> tensor)
3383
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> to remove dimension of length 1.</param>
3385
public static
ReadOnlyTensorSpan
<T> SqueezeDimension<T>(in this
ReadOnlyTensorSpan
<T> tensor, int dimension)
3509
public static T StdDev<T>(in
ReadOnlyTensorSpan
<T> x)
3530
public static string ToString<T>(this in TensorSpan<T> tensor, params ReadOnlySpan<nint> maximumLengths) => ((
ReadOnlyTensorSpan
<T>)tensor).ToString(maximumLengths);
3533
/// Creates a <see cref="string"/> representation of the <see cref="
ReadOnlyTensorSpan
{T}"/>."/>
3536
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> you want to represent as a string.</param>
3538
public static string ToString<T>(this in
ReadOnlyTensorSpan
<T> tensor, params ReadOnlySpan<nint> maximumLengths)
3564
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]);
3586
public static string ToString<T>(this Tensor<T> tensor, params ReadOnlySpan<nint> maximumLengths) => ((
ReadOnlyTensorSpan
<T>)tensor).ToString(maximumLengths);
3616
return TryBroadcastTo((
ReadOnlyTensorSpan
<T>)tensor, destination);
3627
return TryBroadcastTo((
ReadOnlyTensorSpan
<T>)tensor, destination);
3634
/// <param name="tensor">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3636
public static bool TryBroadcastTo<T>(in this
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination)
3702
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> to add a dimension of length 1.</param>
3704
public static
ReadOnlyTensorSpan
<T> Unsqueeze<T>(in this
ReadOnlyTensorSpan
<T> tensor, int dimension)
3729
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the abs of.</param>
3730
public static Tensor<T> Abs<T>(in
ReadOnlyTensorSpan
<T> x)
3739
/// Takes the absolute value of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3743
public static ref readonly TensorSpan<T> Abs<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3754
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3755
public static Tensor<T> Acos<T>(in
ReadOnlyTensorSpan
<T> x)
3768
public static ref readonly TensorSpan<T> Acos<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3777
/// 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.
3779
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3780
public static Tensor<T> Acosh<T>(in
ReadOnlyTensorSpan
<T> x)
3793
public static ref readonly TensorSpan<T> Acosh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3804
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3805
public static Tensor<T> AcosPi<T>(in
ReadOnlyTensorSpan
<T> x)
3816
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3818
public static ref readonly TensorSpan<T> AcosPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3829
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3830
/// <param name="y">The second <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3831
public static Tensor<T> Add<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3851
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3853
public static Tensor<T> Add<T>(in
ReadOnlyTensorSpan
<T> x, T y)
3862
/// 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.
3864
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3865
/// <param name="y">The second <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3867
public static ref readonly TensorSpan<T> Add<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3876
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
3879
public static ref readonly TensorSpan<T> Add<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
3888
/// Takes the inverse sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3890
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3891
public static Tensor<T> Asin<T>(in
ReadOnlyTensorSpan
<T> x)
3900
/// Takes the inverse sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3902
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3904
public static ref readonly TensorSpan<T> Asin<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3913
/// 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.
3915
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3916
public static Tensor<T> Asinh<T>(in
ReadOnlyTensorSpan
<T> x)
3925
/// 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.
3927
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3929
public static ref readonly TensorSpan<T> Asinh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3938
/// 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.
3940
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3941
public static Tensor<T> AsinPi<T>(in
ReadOnlyTensorSpan
<T> x)
3950
/// 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.
3952
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
3954
public static ref readonly TensorSpan<T> AsinPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3963
/// Takes the arc tangent of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3965
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
3966
public static Tensor<T> Atan<T>(in
ReadOnlyTensorSpan
<T> x)
3975
/// Takes the arc tangent of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3977
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
3979
public static ref readonly TensorSpan<T> Atan<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3988
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3990
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3991
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3992
public static Tensor<T> Atan2<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4010
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4012
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4013
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4015
public static ref readonly TensorSpan<T> Atan2<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4022
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4024
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4025
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4026
public static Tensor<T> Atan2<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4036
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4038
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4039
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4041
public static ref readonly TensorSpan<T> Atan2<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4048
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4050
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4051
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4052
public static Tensor<T> Atan2<T>(T x, in
ReadOnlyTensorSpan
<T> y)
4062
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4064
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4065
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4067
public static ref readonly TensorSpan<T> Atan2<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4076
/// 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.
4078
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4079
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4080
public static Tensor<T> Atan2Pi<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4098
/// 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.
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> Atan2Pi<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4110
/// 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.
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> Atan2Pi<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4124
/// 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.
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> Atan2Pi<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4136
/// 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.
4138
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4139
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4140
public static Tensor<T> Atan2Pi<T>(T x, in
ReadOnlyTensorSpan
<T> y)
4150
/// 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.
4152
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4153
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4155
public static ref readonly TensorSpan<T> Atan2Pi<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4165
/// 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.
4167
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4168
public static Tensor<T> Atanh<T>(in
ReadOnlyTensorSpan
<T> x)
4177
/// 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.
4179
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4181
public static ref readonly TensorSpan<T> Atanh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4190
/// 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.
4192
/// <param name="x">The input<see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4193
public static Tensor<T> AtanPi<T>(in
ReadOnlyTensorSpan
<T> x)
4202
/// 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.
4204
/// <param name="x">The input<see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4206
public static ref readonly TensorSpan<T> AtanPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4215
/// 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.
4217
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4218
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4219
public static Tensor<T> BitwiseAnd<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4237
/// 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.
4239
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4240
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4242
public static ref readonly TensorSpan<T> BitwiseAnd<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4249
/// 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.
4251
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4253
public static Tensor<T> BitwiseAnd<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4263
/// 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.
4265
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4268
public static ref readonly TensorSpan<T> BitwiseAnd<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4277
/// 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.
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> BitwiseOr<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4299
/// 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.
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> BitwiseOr<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4311
/// 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.
4313
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4315
public static Tensor<T> BitwiseOr<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4325
/// 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.
4327
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4330
public static ref readonly TensorSpan<T> BitwiseOr<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4339
/// Computes the element-wise cube root of the 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
public static Tensor<T> Cbrt<T>(in
ReadOnlyTensorSpan
<T> x)
4351
/// Computes the element-wise cube root of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4353
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4355
public static ref readonly TensorSpan<T> Cbrt<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4364
/// Computes the element-wise ceiling of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4366
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4367
public static Tensor<T> Ceiling<T>(in
ReadOnlyTensorSpan
<T> x)
4376
/// Computes the element-wise ceiling of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4378
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4380
public static ref readonly TensorSpan<T> Ceiling<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4389
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
4392
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4393
public static Tensor<TTo> ConvertChecked<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
4409
public static ref readonly TensorSpan<TTo> ConvertChecked<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
4419
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
4422
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4423
public static Tensor<TTo> ConvertSaturating<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
4439
public static ref readonly TensorSpan<TTo> ConvertSaturating<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
4449
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
4452
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4453
public static Tensor<TTo> ConvertTruncating<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
4469
public static ref readonly TensorSpan<TTo> ConvertTruncating<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
4481
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4483
public static Tensor<T> CopySign<T>(in
ReadOnlyTensorSpan
<T> x, T sign)
4495
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4496
/// <param name="sign">The <see cref="
ReadOnlyTensorSpan
{T}"/> with the associated signs.</param>
4497
public static Tensor<T> CopySign<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> sign)
4517
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4520
public static ref readonly TensorSpan<T> CopySign<T>(scoped in
ReadOnlyTensorSpan
<T> x, T sign, in TensorSpan<T> destination)
4529
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4530
/// <param name="sign">The <see cref="
ReadOnlyTensorSpan
{T}"/> with the associated signs.</param>
4532
public static ref readonly TensorSpan<T> CopySign<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> sign, in TensorSpan<T> destination)
4541
/// Takes the cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4543
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
4544
public static Tensor<T> Cos<T>(in
ReadOnlyTensorSpan
<T> x)
4553
/// Takes the cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4555
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
4557
public static ref readonly TensorSpan<T> Cos<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4566
/// Takes the hyperbolic cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4568
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
4569
public static Tensor<T> Cosh<T>(in
ReadOnlyTensorSpan
<T> x)
4578
/// Takes the hyperbolic cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4580
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
4582
public static ref readonly TensorSpan<T> Cosh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4593
/// <param name="x">The first <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4594
/// <param name="y">The second <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4595
public static Tensor<T> CosineSimilarity<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4622
/// <param name="x">The first <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4623
/// <param name="y">The second <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4625
public static ref readonly TensorSpan<T> CosineSimilarity<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4673
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4686
public static Tensor<T> CosPi<T>(in
ReadOnlyTensorSpan
<T> x)
4695
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4709
public static ref readonly TensorSpan<T> CosPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4720
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4721
public static Tensor<T> DegreesToRadians<T>(in
ReadOnlyTensorSpan
<T> x)
4732
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4734
public static ref readonly TensorSpan<T> DegreesToRadians<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4745
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4746
/// <param name="y">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4747
public static T Distance<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y)
4758
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4760
public static Tensor<T> Divide<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4772
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> divisor.</param>
4773
public static Tensor<T> Divide<T>(T x, in
ReadOnlyTensorSpan
<T> y)
4783
/// a new <see cref="
ReadOnlyTensorSpan
{T}"/> with the result.
4785
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to be divided.</param>
4786
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> divisor.</param>
4787
public static Tensor<T> Divide<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4807
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4810
public static ref readonly TensorSpan<T> Divide<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4820
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> divisor.</param>
4822
public static ref readonly TensorSpan<T> Divide<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4832
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to be divided.</param>
4833
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> divisor.</param>
4835
public static ref readonly TensorSpan<T> Divide<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4846
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4847
/// <param name="y">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4848
public static T Dot<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4859
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4860
public static Tensor<T> Exp<T>(in
ReadOnlyTensorSpan
<T> x)
4871
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4873
public static ref readonly TensorSpan<T> Exp<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4884
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4885
public static Tensor<T> Exp10<T>(in
ReadOnlyTensorSpan
<T> x)
4896
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4898
public static ref readonly TensorSpan<T> Exp10<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4907
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4908
public static Tensor<T> Exp10M1<T>(in
ReadOnlyTensorSpan
<T> x)
4917
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4919
public static ref readonly TensorSpan<T> Exp10M1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4928
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4929
public static Tensor<T> Exp2<T>(in
ReadOnlyTensorSpan
<T> x)
4938
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4940
public static ref readonly TensorSpan<T> Exp2<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4949
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4950
public static Tensor<T> Exp2M1<T>(in
ReadOnlyTensorSpan
<T> x)
4959
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4961
public static ref readonly TensorSpan<T> Exp2M1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4970
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4971
public static Tensor<T> ExpM1<T>(in
ReadOnlyTensorSpan
<T> x)
4980
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4982
public static ref readonly TensorSpan<T> ExpM1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4991
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4992
public static Tensor<T> Floor<T>(in
ReadOnlyTensorSpan
<T> x)
5001
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5003
public static ref readonly TensorSpan<T> Floor<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5015
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5016
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5017
public static Tensor<T> Hypot<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5038
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5039
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5041
public static ref readonly TensorSpan<T> Hypot<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5051
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5052
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5053
public static Tensor<T> Ieee754Remainder<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5072
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5073
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5075
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5082
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5083
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5084
public static Tensor<T> Ieee754Remainder<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5094
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5095
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5097
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5104
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5105
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5106
public static Tensor<T> Ieee754Remainder<T>(T x, in
ReadOnlyTensorSpan
<T> y)
5116
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5117
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5119
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5128
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5129
public static Tensor<int> ILogB<T>(in
ReadOnlyTensorSpan
<T> x)
5138
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5140
public static ref readonly TensorSpan<int> ILogB<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<int> destination)
5149
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5150
public static int IndexOfMax<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5160
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5161
public static int IndexOfMaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5171
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5172
public static int IndexOfMin<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5184
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5185
public static int IndexOfMinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5197
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5198
public static Tensor<T> LeadingZeroCount<T>(in
ReadOnlyTensorSpan
<T> x)
5209
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5211
public static ref readonly TensorSpan<T> LeadingZeroCount<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5220
/// Takes the natural logarithm of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
5222
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
5223
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x)
5232
/// Takes the natural logarithm of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
5234
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
5236
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5245
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5266
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5275
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5288
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5297
/// 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.
5299
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
5300
public static Tensor<T> Log10<T>(in
ReadOnlyTensorSpan
<T> x)
5309
/// 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.
5311
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
5313
public static ref readonly TensorSpan<T> Log10<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5322
/// 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.
5324
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
5325
public static Tensor<T> Log10P1<T>(in
ReadOnlyTensorSpan
<T> x)
5334
/// 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.
5336
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
5338
public static ref readonly TensorSpan<T> Log10P1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5347
/// 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.
5349
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
5350
public static Tensor<T> Log2<T>(in
ReadOnlyTensorSpan
<T> x)
5359
/// 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.
5361
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
5363
public static ref readonly TensorSpan<T> Log2<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5372
/// 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.
5374
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
5375
public static Tensor<T> Log2P1<T>(in
ReadOnlyTensorSpan
<T> x)
5384
/// 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.
5386
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
5388
public static ref readonly TensorSpan<T> Log2P1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5397
/// 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.
5399
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
5400
public static Tensor<T> LogP1<T>(in
ReadOnlyTensorSpan
<T> x)
5409
/// 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.
5411
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
5413
public static ref readonly TensorSpan<T> LogP1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5422
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>..</param>
5423
public static T Max<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5432
public static Tensor<T> Max<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5453
public static ref readonly TensorSpan<T> Max<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5462
public static Tensor<T> Max<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5474
public static ref readonly TensorSpan<T> Max<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5483
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>..</param>
5484
public static T MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5493
public static Tensor<T> MaxMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5514
public static ref readonly TensorSpan<T> MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5523
public static Tensor<T> MaxMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5535
public static ref readonly TensorSpan<T> MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5544
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>..</param>
5545
public static T MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5554
public static Tensor<T> MaxMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5575
public static ref readonly TensorSpan<T> MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5584
public static Tensor<T> MaxMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5596
public static ref readonly TensorSpan<T> MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5605
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>..</param>
5606
public static T MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5615
public static Tensor<T> MaxNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5636
public static ref readonly TensorSpan<T> MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5645
public static Tensor<T> MaxNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5657
public static ref readonly TensorSpan<T> MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5666
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5667
public static T Min<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5676
public static Tensor<T> Min<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5697
public static ref readonly TensorSpan<T> Min<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5706
public static Tensor<T> Min<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5718
public static ref readonly TensorSpan<T> Min<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5727
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5728
public static T MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5737
public static Tensor<T> MinMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5758
public static ref readonly TensorSpan<T> MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5767
public static Tensor<T> MinMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5779
public static ref readonly TensorSpan<T> MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5788
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>..</param>
5789
public static T MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5798
public static Tensor<T> MinMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5819
public static ref readonly TensorSpan<T> MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5828
public static Tensor<T> MinMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5840
public static ref readonly TensorSpan<T> MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5850
public static T MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5859
public static Tensor<T> MinNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5880
public static ref readonly TensorSpan<T> MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5889
public static Tensor<T> MinNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5901
public static ref readonly TensorSpan<T> MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5912
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
5914
public static Tensor<T> Multiply<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5918
Multiply((
ReadOnlyTensorSpan
<T>)x, y, output);
5926
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/> for multiplication.</param>
5927
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/> for multiplication.</param>
5928
public static Tensor<T> Multiply<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5941
Multiply((
ReadOnlyTensorSpan
<T>)x, y, output);
5948
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
5951
public static ref readonly TensorSpan<T> Multiply<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5964
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/> for multiplication.</param>
5965
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/> for multiplication.</param>
5967
public static ref readonly TensorSpan<T> Multiply<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5976
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
5977
public static Tensor<T> Negate<T>(in
ReadOnlyTensorSpan
<T> x)
5986
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
5988
public static ref readonly TensorSpan<T> Negate<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5997
/// Takes the norm of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns the result.
5999
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the norm of.</param>
6000
public static T Norm<T>(scoped in
ReadOnlyTensorSpan
<T> x)
6009
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6010
public static Tensor<T> OnesComplement<T>(in
ReadOnlyTensorSpan
<T> x)
6019
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6021
public static ref readonly TensorSpan<T> OnesComplement<T>(scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6030
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6031
public static Tensor<T> PopCount<T>(in
ReadOnlyTensorSpan
<T> x)
6040
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6042
public static ref readonly TensorSpan<T> PopCount<T>(scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6051
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6052
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6053
public static Tensor<T> Pow<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
6071
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6072
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6074
public static ref readonly TensorSpan<T> Pow<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6081
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6083
public static Tensor<T> Pow<T>(in
ReadOnlyTensorSpan
<T> x, T y)
6093
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6094
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6096
public static ref readonly TensorSpan<T> Pow<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
6103
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6105
public static Tensor<T> Pow<T>(T x, in
ReadOnlyTensorSpan
<T> y)
6115
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6116
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
6118
public static ref readonly TensorSpan<T> Pow<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6127
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6128
public static T Product<T>(scoped in
ReadOnlyTensorSpan
<T> x)
6137
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6138
public static Tensor<T> RadiansToDegrees<T>(in
ReadOnlyTensorSpan
<T> x)
6147
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6149
public static ref readonly TensorSpan<T> RadiansToDegrees<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6158
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6159
public static Tensor<T> Reciprocal<T>(in
ReadOnlyTensorSpan
<T> x)
6168
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6170
public static ref readonly TensorSpan<T> Reciprocal<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6181
public static Tensor<T> RootN<T>(in
ReadOnlyTensorSpan
<T> x, int n)
6193
public static ref readonly TensorSpan<T> RootN<T>(scoped in
ReadOnlyTensorSpan
<T> x, int n, in TensorSpan<T> destination)
6211
public static Tensor<T> RotateLeft<T>(in
ReadOnlyTensorSpan
<T> x, int rotateAmount)
6224
public static ref readonly TensorSpan<T> RotateLeft<T>(scoped in
ReadOnlyTensorSpan
<T> x, int rotateAmount, in TensorSpan<T> destination)
6242
public static Tensor<T> RotateRight<T>(in
ReadOnlyTensorSpan
<T> x, int rotateAmount)
6255
public static ref readonly TensorSpan<T> RotateRight<T>(scoped in
ReadOnlyTensorSpan
<T> x, int rotateAmount, in TensorSpan<T> destination)
6270
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6271
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x)
6280
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6282
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6289
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6292
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, int digits, MidpointRounding mode)
6301
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6305
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, int digits, MidpointRounding mode, in TensorSpan<T> destination)
6318
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6320
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, int digits)
6329
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6332
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, int digits, in TensorSpan<T> destination)
6345
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6347
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, MidpointRounding mode)
6356
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6359
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, MidpointRounding mode, in TensorSpan<T> destination)
6374
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6375
public static Tensor<T> Sigmoid<T>(in
ReadOnlyTensorSpan
<T> x)
6384
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6386
public static ref readonly TensorSpan<T> Sigmoid<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6395
/// Takes the sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
6397
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6398
public static Tensor<T> Sin<T>(in
ReadOnlyTensorSpan
<T> x)
6407
/// Takes the sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
6409
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6411
public static ref readonly TensorSpan<T> Sin<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6420
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6421
public static Tensor<T> Sinh<T>(in
ReadOnlyTensorSpan
<T> x)
6430
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6432
public static ref readonly TensorSpan<T> Sinh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6441
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6442
public static Tensor<T> SinPi<T>(in
ReadOnlyTensorSpan
<T> x)
6451
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6453
public static ref readonly TensorSpan<T> SinPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6462
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6463
public static Tensor<T> SoftMax<T>(in
ReadOnlyTensorSpan
<T> x)
6472
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6474
public static ref readonly TensorSpan<T> SoftMax<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6483
/// Takes the square root of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
6485
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the square root of.</param>
6486
public static Tensor<T> Sqrt<T>(in
ReadOnlyTensorSpan
<T> x)
6497
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the square root of.</param>
6499
public static ref readonly TensorSpan<T> Sqrt<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6510
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6512
public static Tensor<T> Subtract<T>(in
ReadOnlyTensorSpan
<T> x, T y)
6524
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to subtract.</param>
6525
public static Tensor<T> Subtract<T>(T x, in
ReadOnlyTensorSpan
<T> y)
6536
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> with values to be subtracted from.</param>
6537
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> with values to subtract.</param>
6538
public static Tensor<T> Subtract<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
6558
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> with values to be subtracted from.</param>
6561
public static ref readonly TensorSpan<T> Subtract<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
6571
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> values to subtract.</param>
6573
public static ref readonly TensorSpan<T> Subtract<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6582
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to be subtracted from.</param>
6583
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/>of values to subtract.</param>
6585
public static ref readonly TensorSpan<T> Subtract<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6598
public static T Sum<T>(scoped in
ReadOnlyTensorSpan
<T> x)
6607
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6608
public static Tensor<T> Tan<T>(in
ReadOnlyTensorSpan
<T> x)
6617
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6619
public static ref readonly TensorSpan<T> Tan<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6628
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6629
public static Tensor<T> Tanh<T>(in
ReadOnlyTensorSpan
<T> x)
6638
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6640
public static ref readonly TensorSpan<T> Tanh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6649
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6650
public static Tensor<T> TanPi<T>(in
ReadOnlyTensorSpan
<T> x)
6659
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
6661
public static ref readonly TensorSpan<T> TanPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6670
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6671
public static Tensor<T> TrailingZeroCount<T>(in
ReadOnlyTensorSpan
<T> x)
6680
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6682
public static ref readonly TensorSpan<T> TrailingZeroCount<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6691
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6692
public static Tensor<T> Truncate<T>(in
ReadOnlyTensorSpan
<T> x)
6701
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6703
public static ref readonly TensorSpan<T> Truncate<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
6712
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6713
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6714
public static Tensor<T> Xor<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
6732
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6733
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6735
public static ref readonly TensorSpan<T> Xor<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
6742
/// Computes the element-wise Xor of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
6744
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6746
public static Tensor<T> Xor<T>(in
ReadOnlyTensorSpan
<T> x, T y)
6755
/// Computes the element-wise Xor of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
6757
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
6760
public static ref readonly TensorSpan<T> Xor<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
6805
private static T TensorPrimitivesHelperSpanInTOut<T>(scoped in
ReadOnlyTensorSpan
<T> input, PerformCalculationSpanInTOut<T> performCalculation)
6824
private static T TensorPrimitivesHelperTwoSpanInTOut<T>(scoped in
ReadOnlyTensorSpan
<T> left, scoped in
ReadOnlyTensorSpan
<T> right, PerformCalculationTwoSpanInTOut<T> performCalculation)
6856
private static ref readonly TensorSpan<TOut> TensorPrimitivesHelperSpanInSpanOut<TIn, TOut>(scoped in
ReadOnlyTensorSpan
<TIn> input, in TensorSpan<TOut> destination, PerformCalculationSpanInSpanOut<TIn, TOut> performCalculation)
6910
private static ref readonly TensorSpan<T> TensorPrimitivesHelperSpanInTInSpanOut<T>(scoped in
ReadOnlyTensorSpan
<T> input, T value, in TensorSpan<T> destination, PerformCalculationSpanInTInSpanOut<T> performCalculation)
6962
private static ref readonly TensorSpan<T> TensorPrimitivesHelperTInSpanInSpanOut<T>(T value, scoped in
ReadOnlyTensorSpan
<T> input, in TensorSpan<T> destination, PerformCalculationTInSpanInSpanOut<T> performCalculation)
7014
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)
7037
ReadOnlyTensorSpan
<T> broadcastedLeft = Tensor.LazyBroadcast(left, newSize);
7038
ReadOnlyTensorSpan
<T> broadcastedRight = Tensor.LazyBroadcast(right, newSize);
System\Numerics\Tensors\netcore\TensorHelpers.cs (6)
20
public static nint CountTrueElements(scoped in
ReadOnlyTensorSpan
<bool> filter)
91
internal static bool IsUnderlyingStorageSameSize<T>(scoped in
ReadOnlyTensorSpan
<T> tensor1, scoped in
ReadOnlyTensorSpan
<T> tensor2)
97
internal static bool AreLengthsTheSame<T>(scoped in
ReadOnlyTensorSpan
<T> tensor1, scoped in
ReadOnlyTensorSpan
<T> tensor2)
103
internal static bool IsContiguousAndDense<T>(scoped in
ReadOnlyTensorSpan
<T> tensor)
System\Numerics\Tensors\netcore\TensorSpan.cs (6)
576
ReadOnlyTensorSpan
<T> srcSlice = Tensor.LazyBroadcast(this, tempLengths);
630
ReadOnlyTensorSpan
<T> srcSlice = Tensor.LazyBroadcast(this, tempLengths);
655
/// Implicitly converts a <see cref="TensorSpan{T}"/> to a <see cref="
ReadOnlyTensorSpan
{T}"/>
657
public static implicit operator
ReadOnlyTensorSpan
<T>(TensorSpan<T> span) =>
688
/// <returns>A <see cref="
ReadOnlyTensorSpan
{T}"/> based on the provided <paramref name="lengths"/>.</returns>
703
/// <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)