38 instantiations of ReadOnlyTensorSpan
System.Numerics.Tensors (38)
System\Numerics\Tensors\netcore\ReadOnlyTensorDimensionSpan_1.cs (1)
55
return new
ReadOnlyTensorSpan
<T>(ref Unsafe.Add(ref _tensor._reference, linearOffset), _sliceShape);
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan_1.cs (5)
316
public static implicit operator ReadOnlyTensorSpan<T>(T[]? array) => new
ReadOnlyTensorSpan
<T>(array);
326
return new
ReadOnlyTensorSpan
<T>(
409
return new
ReadOnlyTensorSpan
<T>(
419
return new
ReadOnlyTensorSpan
<T>(
429
return new
ReadOnlyTensorSpan
<T>(
System\Numerics\Tensors\netcore\Tensor.cs (16)
17
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[])" />
19
=> new
ReadOnlyTensorSpan
<T>(array);
21
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[], ReadOnlySpan{nint})" />
23
=> new
ReadOnlyTensorSpan
<T>(array, lengths);
25
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[], ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
27
=> new
ReadOnlyTensorSpan
<T>(array, lengths, strides);
29
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[], int, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
31
=> new
ReadOnlyTensorSpan
<T>(array, start, lengths, strides);
294
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[])" />
299
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[], ReadOnlySpan{nint})" />
304
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[], ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
309
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[], int, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
1535
ReadOnlyTensorSpan<T> output = new
ReadOnlyTensorSpan
<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, strides, tensor.IsPinned);
1977
ReadOnlyTensorSpan<T> output = new
ReadOnlyTensorSpan
<T>(ref tensor._reference, tensor._shape.LinearLength, lengths[..rank], strides[..rank], tensor.IsPinned);
2114
ReadOnlyTensorSpan<T> tmpTensor = new
ReadOnlyTensorSpan
<T>(ref Unsafe.Add(ref tensor._reference, i * tensor.Strides[0]), tmpShape);
2340
ReadOnlyTensorSpan<T> output = new
ReadOnlyTensorSpan
<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, newStrides, tensor.IsPinned);
System\Numerics\Tensors\netcore\Tensor_1.cs (1)
137
public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan() => new
ReadOnlyTensorSpan
<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_values), _start), in _shape);
System\Numerics\Tensors\netcore\TensorSpan_1.cs (14)
35
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[])" />
47
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[], ReadOnlySpan{nint})" />
52
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[], ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
64
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[], int, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
76
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(ReadOnlySpan{T})" />
84
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(ReadOnlySpan{T}, ReadOnlySpan{nint})" />
88
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(ReadOnlySpan{T}, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
96
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(Array)"/>
108
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(Array, ReadOnlySpan{int}, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
120
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T*, nint)" />
128
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T*, nint, ReadOnlySpan{nint})" />
133
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T*, nint, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
215
new
ReadOnlyTensorSpan
<T>(ref tensor._reference, tensor._shape);
218
public ReadOnlyTensorSpan<T> AsReadOnlyTensorSpan() => new
ReadOnlyTensorSpan
<T>(ref _reference, in _shape);
System\Runtime\InteropServices\TensorMarshal.cs (1)
37
return new
ReadOnlyTensorSpan
<T>(in Unsafe.AsRef(in data), dataLength, lengths, strides, pinned);
908 references to ReadOnlyTensorSpan
System.Numerics.Tensors (908)
System\Numerics\Tensors\netcore\IReadOnlyTensor_1.cs (4)
38
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan();
43
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<nint> startIndexes);
46
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NIndex> startIndexes);
51
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NRange> ranges);
System\Numerics\Tensors\netcore\ReadOnlyTensorDimensionSpan_1.cs (5)
17
private readonly
ReadOnlyTensorSpan
<T> _tensor;
22
internal ReadOnlyTensorDimensionSpan(
ReadOnlyTensorSpan
<T> tensor, int dimension)
45
public
ReadOnlyTensorSpan
<T> this[nint index]
65
: IEnumerator<
ReadOnlyTensorSpan
<T>>
78
public readonly
ReadOnlyTensorSpan
<T> Current => _span[_index];
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan_1.cs (26)
26
: IReadOnlyTensor<
ReadOnlyTensorSpan
<T>, T>
30
public static
ReadOnlyTensorSpan
<T> Empty => default;
266
public
ReadOnlyTensorSpan
<T> this[params scoped ReadOnlySpan<NRange> ranges]
302
public static bool operator ==(in
ReadOnlyTensorSpan
<T> left, in
ReadOnlyTensorSpan
<T> right)
311
public static bool operator !=(in
ReadOnlyTensorSpan
<T> left, in
ReadOnlyTensorSpan
<T> right) => !(left == right);
316
public static implicit operator
ReadOnlyTensorSpan
<T>(T[]? array) => new ReadOnlyTensorSpan<T>(array);
323
public static
ReadOnlyTensorSpan
<T> CastUp<TDerived>(in
ReadOnlyTensorSpan
<TDerived> items)
406
public
ReadOnlyTensorSpan
<T> Slice(params scoped ReadOnlySpan<nint> startIndexes)
416
public
ReadOnlyTensorSpan
<T> Slice(params scoped ReadOnlySpan<NIndex> startIndexes)
426
public
ReadOnlyTensorSpan
<T> Slice(params scoped ReadOnlySpan<NRange> ranges)
506
ReadOnlyTensorSpan
<T> IReadOnlyTensor<
ReadOnlyTensorSpan
<T>, T>.AsReadOnlyTensorSpan() => this;
508
ReadOnlyTensorSpan
<T> IReadOnlyTensor<
ReadOnlyTensorSpan
<T>, T>.AsReadOnlyTensorSpan(params scoped ReadOnlySpan<nint> startIndexes) => Slice(startIndexes);
510
ReadOnlyTensorSpan
<T> IReadOnlyTensor<
ReadOnlyTensorSpan
<T>, T>.AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NIndex> startIndexes) => Slice(startIndexes);
512
ReadOnlyTensorSpan
<T> IReadOnlyTensor<
ReadOnlyTensorSpan
<T>, T>.AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NRange> ranges) => Slice(ranges);
514
ReadOnlyTensorSpan
<T> IReadOnlyTensor<
ReadOnlyTensorSpan
<T>, T>.ToDenseTensor()
516
ReadOnlyTensorSpan
<T> result = this;
532
private readonly
ReadOnlyTensorSpan
<T> _span;
537
internal Enumerator(
ReadOnlyTensorSpan
<T> span)
System\Numerics\Tensors\netcore\Tensor.cs (810)
17
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[])" />
18
public static
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan<T>(this T[]? array)
21
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[], ReadOnlySpan{nint})" />
22
public static
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan<T>(this T[]? array, scoped ReadOnlySpan<nint> lengths)
25
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[], ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
26
public static
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan<T>(this T[]? array, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
29
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[], int, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
30
public static
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan<T>(this T[]? array, int start, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
55
public static Tensor<T> Broadcast<T>(scoped in
ReadOnlyTensorSpan
<T> source, scoped in
ReadOnlyTensorSpan
<T> lengthsSource)
67
public static Tensor<T> Broadcast<T>(scoped in
ReadOnlyTensorSpan
<T> source, scoped ReadOnlySpan<nint> lengths)
104
public static void BroadcastTo<T>(in this
ReadOnlyTensorSpan
<T> source, in TensorSpan<T> destination)
294
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[])" />
299
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[], ReadOnlySpan{nint})" />
304
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[], ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
309
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[], int, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
384
/// 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
387
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
388
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
390
public static Tensor<bool> Equals<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
399
/// 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
402
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
403
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
406
public static ref readonly TensorSpan<bool> Equals<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
415
/// 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
418
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
421
public static Tensor<bool> Equals<T>(in
ReadOnlyTensorSpan
<T> x, T y)
430
/// 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
433
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
437
public static ref readonly TensorSpan<bool> Equals<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
448
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are equal to <paramref name="y"/>.
452
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
453
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
455
public static bool EqualsAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
463
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are equal to <paramref name="y"/>.
467
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
468
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
470
public static bool EqualsAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
476
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are equal to <paramref name="y"/>.
480
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
481
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
483
public static bool EqualsAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
495
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are equal to <paramref name="y"/>.
499
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
502
public static bool EqualsAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
513
public static ref readonly TensorSpan<T> FilteredUpdate<T>(in this TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<bool> filter, T value)
527
public static ref readonly TensorSpan<T> FilteredUpdate<T>(in this TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<bool> filter, scoped in
ReadOnlyTensorSpan
<T> values)
537
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are greater than <paramref name="y"/>.
542
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
543
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
546
public static Tensor<bool> GreaterThan<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
555
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are greater than <paramref name="y"/>.
560
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
561
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
565
public static ref readonly TensorSpan<bool> GreaterThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
574
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than <paramref name="y"/>.
578
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
582
public static Tensor<bool> GreaterThan<T>(in
ReadOnlyTensorSpan
<T> x, T y)
591
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than <paramref name="y"/>.
595
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
600
public static ref readonly TensorSpan<bool> GreaterThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
613
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
617
public static Tensor<bool> GreaterThan<T>(T x, in
ReadOnlyTensorSpan
<T> y)
625
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
630
public static ref readonly TensorSpan<bool> GreaterThan<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
636
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
640
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
641
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
643
public static bool GreaterThanAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
651
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
655
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
656
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
658
public static bool GreaterThanAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
662
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are greater than <paramref name="y"/>.
666
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
667
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
669
public static bool GreaterThanAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
675
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
679
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
680
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
682
public static bool GreaterThanAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
694
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
698
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
701
public static bool GreaterThanAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
705
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are greater than <paramref name="x"/>.
709
/// <param name="y">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
712
public static bool GreaterThanAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
718
/// 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"/>.
723
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
724
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
727
public static Tensor<bool> GreaterThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
736
/// 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"/>.
741
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
742
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
746
public static ref readonly TensorSpan<bool> GreaterThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
755
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than or equal to <paramref name="y"/>.
759
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
763
public static Tensor<bool> GreaterThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, T y)
772
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than or equal to <paramref name="y"/>.
776
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
781
public static ref readonly TensorSpan<bool> GreaterThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
794
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
798
public static Tensor<bool> GreaterThanOrEqual<T>(T x, in
ReadOnlyTensorSpan
<T> y)
806
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
811
public static ref readonly TensorSpan<bool> GreaterThanOrEqual<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
817
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
821
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
822
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
824
public static bool GreaterThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
832
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
836
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
837
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
839
public static bool GreaterThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
843
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are greater than <paramref name="y"/>.
847
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
848
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
850
public static bool GreaterThanOrEqualAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
856
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
860
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
861
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
863
public static bool GreaterThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
875
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
879
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
882
public static bool GreaterThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
886
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are greater than <paramref name="x"/>.
890
/// <param name="y">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
893
public static bool GreaterThanOrEqualAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
899
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
904
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
905
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
908
public static Tensor<bool> LessThan<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
917
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
922
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
923
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
927
public static ref readonly TensorSpan<bool> LessThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
944
public static Tensor<bool> LessThan<T>(in
ReadOnlyTensorSpan
<T> x, T y)
962
public static ref readonly TensorSpan<bool> LessThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
979
public static Tensor<bool> LessThan<T>(T x, in
ReadOnlyTensorSpan
<T> y)
992
public static ref readonly TensorSpan<bool> LessThan<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
998
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
1002
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1003
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1005
public static bool LessThanAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1013
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
1017
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1020
public static bool LessThanAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1024
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are less than <paramref name="x"/>.
1031
public static bool LessThanAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1037
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
1041
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1042
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1044
public static bool LessThanAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1056
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
1060
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1063
public static bool LessThanAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1067
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are less than <paramref name="y"/>.
1074
public static bool LessThanAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1080
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
1085
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1086
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1089
public static Tensor<bool> LessThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1098
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
1103
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1104
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1108
public static ref readonly TensorSpan<bool> LessThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1125
public static Tensor<bool> LessThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1143
public static ref readonly TensorSpan<bool> LessThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
1160
public static Tensor<bool> LessThanOrEqual<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1173
public static ref readonly TensorSpan<bool> LessThanOrEqual<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1179
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
1183
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1184
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1186
public static bool LessThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1194
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
1198
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1201
public static bool LessThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1205
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are less than <paramref name="x"/>.
1212
public static bool LessThanOrEqualAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1218
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
1222
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1223
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1225
public static bool LessThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1237
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
1241
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1244
public static bool LessThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1248
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are less than <paramref name="y"/>.
1255
public static bool LessThanOrEqualAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1471
public static
ReadOnlyTensorSpan
<T> Reshape<T>(this scoped in
ReadOnlyTensorSpan
<T> tensor, scoped ReadOnlySpan<nint> lengths)
1535
ReadOnlyTensorSpan
<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, strides, tensor.IsPinned);
1588
/// <param name="tensor">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
1590
public static void ResizeTo<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination)
1606
public static Tensor<T> Reverse<T>(in
ReadOnlyTensorSpan
<T> tensor)
1620
public static Tensor<T> ReverseDimension<T>(in
ReadOnlyTensorSpan
<T> tensor, int dimension)
1633
public static ref readonly TensorSpan<T> Reverse<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination)
1645
public static ref readonly TensorSpan<T> ReverseDimension<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination, int dimension)
1684
public static bool SequenceEqual<T>(this scoped in TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<T> other)
1696
public static bool SequenceEqual<T>(this scoped in
ReadOnlyTensorSpan
<T> tensor, scoped in
ReadOnlyTensorSpan
<T> other)
1713
public static Tensor<T> SetSlice<T>(this Tensor<T> tensor, in
ReadOnlyTensorSpan
<T> values, params ReadOnlySpan<NRange> ranges)
1725
public static ref readonly TensorSpan<T> SetSlice<T>(this in TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<T> values, params scoped ReadOnlySpan<NRange> ranges)
1747
public static Tensor<T>[] Split<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, int splitCount, nint dimension)
1921
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> to remove all dimensions of length 1.</param>
1922
public static
ReadOnlyTensorSpan
<T> Squeeze<T>(this scoped in
ReadOnlyTensorSpan
<T> tensor)
1931
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> to remove dimension of length 1.</param>
1933
public static
ReadOnlyTensorSpan
<T> SqueezeDimension<T>(this scoped in
ReadOnlyTensorSpan
<T> tensor, int dimension)
1977
ReadOnlyTensorSpan
<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, lengths[..rank], strides[..rank], tensor.IsPinned);
2077
/// Creates a <see cref="string"/> representation of the <see cref="
ReadOnlyTensorSpan
{T}"/>."/>
2080
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> you want to represent as a string.</param>
2082
public static string ToString<T>(this in
ReadOnlyTensorSpan
<T> tensor, ReadOnlySpan<nint> maximumLengths)
2094
internal static void ToString<T>(in
ReadOnlyTensorSpan
<T> tensor, ReadOnlySpan<nint> maximumLengths, StringBuilder sb, int indentLevel = 0)
2114
ReadOnlyTensorSpan
<T> tmpTensor = new ReadOnlyTensorSpan<T>(ref Unsafe.Add(ref tensor._reference, i * tensor.Strides[0]), tmpShape);
2221
/// <param name="tensor">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2223
public static bool TryBroadcastTo<T>(in this
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination)
2312
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> to add a dimension of length 1.</param>
2314
public static
ReadOnlyTensorSpan
<T> Unsqueeze<T>(this scoped in
ReadOnlyTensorSpan
<T> tensor, int dimension)
2340
ReadOnlyTensorSpan
<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, newStrides, tensor.IsPinned);
2352
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the abs of.</param>
2353
public static Tensor<T> Abs<T>(in
ReadOnlyTensorSpan
<T> x)
2362
/// Takes the absolute value of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2366
public static ref readonly TensorSpan<T> Abs<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2379
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2380
public static Tensor<T> Acos<T>(in
ReadOnlyTensorSpan
<T> x)
2393
public static ref readonly TensorSpan<T> Acos<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2404
/// 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.
2406
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2407
public static Tensor<T> Acosh<T>(in
ReadOnlyTensorSpan
<T> x)
2420
public static ref readonly TensorSpan<T> Acosh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2433
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2434
public static Tensor<T> AcosPi<T>(in
ReadOnlyTensorSpan
<T> x)
2445
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2447
public static ref readonly TensorSpan<T> AcosPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2460
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
2461
/// <param name="y">The second <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
2462
public static Tensor<T> Add<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2473
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
2475
public static Tensor<T> Add<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2484
/// 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.
2486
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
2487
/// <param name="y">The second <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
2489
public static ref readonly TensorSpan<T> Add<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
2500
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to add.</param>
2503
public static ref readonly TensorSpan<T> Add<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
2514
/// Takes the inverse sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2516
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2517
public static Tensor<T> Asin<T>(in
ReadOnlyTensorSpan
<T> x)
2526
/// Takes the inverse sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2528
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2530
public static ref readonly TensorSpan<T> Asin<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2541
/// 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.
2543
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2544
public static Tensor<T> Asinh<T>(in
ReadOnlyTensorSpan
<T> x)
2553
/// 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.
2555
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2557
public static ref readonly TensorSpan<T> Asinh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2568
/// 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.
2570
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2571
public static Tensor<T> AsinPi<T>(in
ReadOnlyTensorSpan
<T> x)
2580
/// 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.
2582
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2584
public static ref readonly TensorSpan<T> AsinPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2595
/// Takes the arc tangent of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2597
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
2598
public static Tensor<T> Atan<T>(in
ReadOnlyTensorSpan
<T> x)
2607
/// Takes the arc tangent of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2609
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
2611
public static ref readonly TensorSpan<T> Atan<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2622
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2624
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2625
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2626
public static Tensor<T> Atan2<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2635
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2637
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2638
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2640
public static ref readonly TensorSpan<T> Atan2<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
2649
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2651
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2652
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2653
public static Tensor<T> Atan2<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2662
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2664
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2665
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2667
public static ref readonly TensorSpan<T> Atan2<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
2676
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2678
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2679
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2680
public static Tensor<T> Atan2<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2689
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2691
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2692
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2694
public static ref readonly TensorSpan<T> Atan2<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
2705
/// 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.
2707
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2708
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2709
public static Tensor<T> Atan2Pi<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2718
/// 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.
2720
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2721
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2723
public static ref readonly TensorSpan<T> Atan2Pi<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
2732
/// 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.
2734
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2735
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2736
public static Tensor<T> Atan2Pi<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2745
/// 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.
2747
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2748
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2750
public static ref readonly TensorSpan<T> Atan2Pi<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
2759
/// 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.
2761
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2762
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2763
public static Tensor<T> Atan2Pi<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2772
/// 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.
2774
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2775
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2777
public static ref readonly TensorSpan<T> Atan2Pi<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
2788
/// 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.
2790
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2791
public static Tensor<T> Atanh<T>(in
ReadOnlyTensorSpan
<T> x)
2800
/// 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.
2802
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2804
public static ref readonly TensorSpan<T> Atanh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2815
/// 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.
2817
/// <param name="x">The input<see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2818
public static Tensor<T> AtanPi<T>(in
ReadOnlyTensorSpan
<T> x)
2827
/// 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.
2829
/// <param name="x">The input<see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2831
public static ref readonly TensorSpan<T> AtanPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2846
public static T Average<T>(scoped in
ReadOnlyTensorSpan
<T> x)
2859
/// 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.
2861
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2862
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2863
public static Tensor<T> BitwiseAnd<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2872
/// 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.
2874
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2875
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2877
public static ref readonly TensorSpan<T> BitwiseAnd<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
2886
/// 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.
2888
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2890
public static Tensor<T> BitwiseAnd<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2899
/// 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.
2901
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2904
public static ref readonly TensorSpan<T> BitwiseAnd<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
2915
/// 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.
2917
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2918
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2919
public static Tensor<T> BitwiseOr<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2928
/// 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.
2930
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2931
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2933
public static ref readonly TensorSpan<T> BitwiseOr<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
2942
/// 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.
2944
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2946
public static Tensor<T> BitwiseOr<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2955
/// 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.
2957
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2960
public static ref readonly TensorSpan<T> BitwiseOr<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
2971
/// Computes the element-wise cube root of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2973
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2974
public static Tensor<T> Cbrt<T>(in
ReadOnlyTensorSpan
<T> x)
2983
/// Computes the element-wise cube root of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2985
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2987
public static ref readonly TensorSpan<T> Cbrt<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2998
/// Computes the element-wise ceiling of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3000
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3001
public static Tensor<T> Ceiling<T>(in
ReadOnlyTensorSpan
<T> x)
3010
/// Computes the element-wise ceiling of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3012
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3014
public static ref readonly TensorSpan<T> Ceiling<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3025
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
3028
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3029
public static Tensor<TTo> ConvertChecked<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
3044
public static ref readonly TensorSpan<TTo> ConvertChecked<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
3056
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
3059
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3060
public static Tensor<TTo> ConvertSaturating<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
3075
public static ref readonly TensorSpan<TTo> ConvertSaturating<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
3087
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
3090
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3091
public static Tensor<TTo> ConvertTruncating<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
3106
public static ref readonly TensorSpan<TTo> ConvertTruncating<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
3120
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3122
public static Tensor<T> CopySign<T>(in
ReadOnlyTensorSpan
<T> x, T sign)
3133
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3134
/// <param name="sign">The <see cref="
ReadOnlyTensorSpan
{T}"/> with the associated signs.</param>
3135
public static Tensor<T> CopySign<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> sign)
3146
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3149
public static ref readonly TensorSpan<T> CopySign<T>(scoped in
ReadOnlyTensorSpan
<T> x, T sign, in TensorSpan<T> destination)
3160
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3161
/// <param name="sign">The <see cref="
ReadOnlyTensorSpan
{T}"/> with the associated signs.</param>
3163
public static ref readonly TensorSpan<T> CopySign<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> sign, in TensorSpan<T> destination)
3174
/// Takes the cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3176
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
3177
public static Tensor<T> Cos<T>(in
ReadOnlyTensorSpan
<T> x)
3186
/// Takes the cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3188
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
3190
public static ref readonly TensorSpan<T> Cos<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3201
/// Takes the hyperbolic cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3203
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
3204
public static Tensor<T> Cosh<T>(in
ReadOnlyTensorSpan
<T> x)
3213
/// Takes the hyperbolic cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3215
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
3217
public static ref readonly TensorSpan<T> Cosh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3230
/// <param name="x">The first <see cref="
ReadOnlyTensorSpan
{T}"/></param>
3231
/// <param name="y">The second <see cref="
ReadOnlyTensorSpan
{T}"/></param>
3232
public static T CosineSimilarity<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3244
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
3257
public static Tensor<T> CosPi<T>(in
ReadOnlyTensorSpan
<T> x)
3266
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
3280
public static ref readonly TensorSpan<T> CosPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3293
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3294
public static Tensor<T> DegreesToRadians<T>(in
ReadOnlyTensorSpan
<T> x)
3305
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3307
public static ref readonly TensorSpan<T> DegreesToRadians<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3320
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3321
/// <param name="y">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3322
public static T Distance<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y)
3336
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3338
public static Tensor<T> Divide<T>(in
ReadOnlyTensorSpan
<T> x, T y)
3350
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> divisor.</param>
3351
public static Tensor<T> Divide<T>(T x, in
ReadOnlyTensorSpan
<T> y)
3361
/// a new <see cref="
ReadOnlyTensorSpan
{T}"/> with the result.
3363
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to be divided.</param>
3364
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> divisor.</param>
3365
public static Tensor<T> Divide<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3376
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3379
public static ref readonly TensorSpan<T> Divide<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
3391
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> divisor.</param>
3393
public static ref readonly TensorSpan<T> Divide<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3405
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to be divided.</param>
3406
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> divisor.</param>
3408
public static ref readonly TensorSpan<T> Divide<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3421
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3422
/// <param name="y">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3423
public static T Dot<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3437
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3438
public static Tensor<T> Exp<T>(in
ReadOnlyTensorSpan
<T> x)
3449
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3451
public static ref readonly TensorSpan<T> Exp<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3464
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3465
public static Tensor<T> Exp10<T>(in
ReadOnlyTensorSpan
<T> x)
3476
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3478
public static ref readonly TensorSpan<T> Exp10<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3489
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3490
public static Tensor<T> Exp10M1<T>(in
ReadOnlyTensorSpan
<T> x)
3499
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3501
public static ref readonly TensorSpan<T> Exp10M1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3512
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3513
public static Tensor<T> Exp2<T>(in
ReadOnlyTensorSpan
<T> x)
3522
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3524
public static ref readonly TensorSpan<T> Exp2<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3535
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3536
public static Tensor<T> Exp2M1<T>(in
ReadOnlyTensorSpan
<T> x)
3545
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3547
public static ref readonly TensorSpan<T> Exp2M1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3558
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3559
public static Tensor<T> ExpM1<T>(in
ReadOnlyTensorSpan
<T> x)
3568
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3570
public static ref readonly TensorSpan<T> ExpM1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3581
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3582
public static Tensor<T> Floor<T>(in
ReadOnlyTensorSpan
<T> x)
3591
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3593
public static ref readonly TensorSpan<T> Floor<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3607
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3608
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3609
public static Tensor<T> Hypot<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3621
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3622
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3624
public static ref readonly TensorSpan<T> Hypot<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3636
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3637
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3638
public static Tensor<T> Ieee754Remainder<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3648
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3649
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3651
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3660
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3661
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3662
public static Tensor<T> Ieee754Remainder<T>(in
ReadOnlyTensorSpan
<T> x, T y)
3671
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3672
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3674
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
3683
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3684
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3685
public static Tensor<T> Ieee754Remainder<T>(T x, in
ReadOnlyTensorSpan
<T> y)
3694
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3695
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3697
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3708
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3709
public static Tensor<int> ILogB<T>(in
ReadOnlyTensorSpan
<T> x)
3718
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3720
public static ref readonly TensorSpan<int> ILogB<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<int> destination)
3731
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3732
public static nint IndexOfMax<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3743
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3744
public static nint IndexOfMaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3754
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3755
public static nint IndexOfMin<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3767
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3768
public static nint IndexOfMinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3780
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3781
public static Tensor<T> LeadingZeroCount<T>(in
ReadOnlyTensorSpan
<T> x)
3792
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3794
public static ref readonly TensorSpan<T> LeadingZeroCount<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3805
/// Takes the natural logarithm of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3807
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
3808
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x)
3817
/// Takes the natural logarithm of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3819
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
3821
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3832
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3844
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3855
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x, T y)
3867
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
3878
/// 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.
3880
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
3881
public static Tensor<T> Log10<T>(in
ReadOnlyTensorSpan
<T> x)
3890
/// 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.
3892
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
3894
public static ref readonly TensorSpan<T> Log10<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3905
/// 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.
3907
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
3908
public static Tensor<T> Log10P1<T>(in
ReadOnlyTensorSpan
<T> x)
3917
/// 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.
3919
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
3921
public static ref readonly TensorSpan<T> Log10P1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3932
/// 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.
3934
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
3935
public static Tensor<T> Log2<T>(in
ReadOnlyTensorSpan
<T> x)
3944
/// 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.
3946
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
3948
public static ref readonly TensorSpan<T> Log2<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3959
/// 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.
3961
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
3962
public static Tensor<T> Log2P1<T>(in
ReadOnlyTensorSpan
<T> x)
3971
/// 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.
3973
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
3975
public static ref readonly TensorSpan<T> Log2P1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3986
/// 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.
3988
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
3989
public static Tensor<T> LogP1<T>(in
ReadOnlyTensorSpan
<T> x)
3998
/// 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.
4000
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
4002
public static ref readonly TensorSpan<T> LogP1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4013
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4014
public static T Max<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4030
public static Tensor<T> Max<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4042
public static ref readonly TensorSpan<T> Max<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4053
public static Tensor<T> Max<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4065
public static ref readonly TensorSpan<T> Max<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4076
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4077
public static T MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4093
public static Tensor<T> MaxMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4105
public static ref readonly TensorSpan<T> MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4116
public static Tensor<T> MaxMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4128
public static ref readonly TensorSpan<T> MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4139
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4140
public static T MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4156
public static Tensor<T> MaxMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4168
public static ref readonly TensorSpan<T> MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4179
public static Tensor<T> MaxMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4191
public static ref readonly TensorSpan<T> MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4202
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4203
public static T MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4219
public static Tensor<T> MaxNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4231
public static ref readonly TensorSpan<T> MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4242
public static Tensor<T> MaxNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4254
public static ref readonly TensorSpan<T> MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4265
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4266
public static T Min<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4282
public static Tensor<T> Min<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4294
public static ref readonly TensorSpan<T> Min<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4305
public static Tensor<T> Min<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4317
public static ref readonly TensorSpan<T> Min<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4328
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4329
public static T MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4345
public static Tensor<T> MinMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4357
public static ref readonly TensorSpan<T> MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4368
public static Tensor<T> MinMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4380
public static ref readonly TensorSpan<T> MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4391
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4392
public static T MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4408
public static Tensor<T> MinMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4420
public static ref readonly TensorSpan<T> MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4431
public static Tensor<T> MinMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4443
public static ref readonly TensorSpan<T> MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4454
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4455
public static T MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4471
public static Tensor<T> MinNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4483
public static ref readonly TensorSpan<T> MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4494
public static Tensor<T> MinNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4506
public static ref readonly TensorSpan<T> MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4519
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4521
public static Tensor<T> Multiply<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4533
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/> for multiplication.</param>
4534
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/> for multiplication.</param>
4535
public static Tensor<T> Multiply<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4546
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4549
public static ref readonly TensorSpan<T> Multiply<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4561
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/> for multiplication.</param>
4562
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/> for multiplication.</param>
4564
public static ref readonly TensorSpan<T> Multiply<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4575
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4576
public static Tensor<T> Negate<T>(in
ReadOnlyTensorSpan
<T> x)
4585
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4587
public static ref readonly TensorSpan<T> Negate<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4598
/// Takes the norm of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns the result.
4600
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the norm of.</param>
4601
public static T Norm<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4612
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4613
public static Tensor<T> OnesComplement<T>(in
ReadOnlyTensorSpan
<T> x)
4622
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4624
public static ref readonly TensorSpan<T> OnesComplement<T>(scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4635
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4636
public static Tensor<T> PopCount<T>(in
ReadOnlyTensorSpan
<T> x)
4645
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4647
public static ref readonly TensorSpan<T> PopCount<T>(scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4658
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4659
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4660
public static Tensor<T> Pow<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4669
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4670
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4672
public static ref readonly TensorSpan<T> Pow<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4681
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4683
public static Tensor<T> Pow<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4692
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4693
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4695
public static ref readonly TensorSpan<T> Pow<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4704
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4706
public static Tensor<T> Pow<T>(T x, in
ReadOnlyTensorSpan
<T> y)
4715
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4716
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4718
public static ref readonly TensorSpan<T> Pow<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4729
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4730
public static T Product<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4741
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4742
public static Tensor<T> RadiansToDegrees<T>(in
ReadOnlyTensorSpan
<T> x)
4751
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4753
public static ref readonly TensorSpan<T> RadiansToDegrees<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4764
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4765
public static Tensor<T> Reciprocal<T>(in
ReadOnlyTensorSpan
<T> x)
4774
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4776
public static ref readonly TensorSpan<T> Reciprocal<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4789
public static Tensor<T> RootN<T>(in
ReadOnlyTensorSpan
<T> x, int n)
4801
public static ref readonly TensorSpan<T> RootN<T>(scoped in
ReadOnlyTensorSpan
<T> x, int n, in TensorSpan<T> destination)
4815
public static Tensor<T> RotateLeft<T>(in
ReadOnlyTensorSpan
<T> x, int rotateAmount)
4828
public static ref readonly TensorSpan<T> RotateLeft<T>(scoped in
ReadOnlyTensorSpan
<T> x, int rotateAmount, in TensorSpan<T> destination)
4842
public static Tensor<T> RotateRight<T>(in
ReadOnlyTensorSpan
<T> x, int rotateAmount)
4855
public static ref readonly TensorSpan<T> RotateRight<T>(scoped in
ReadOnlyTensorSpan
<T> x, int rotateAmount, in TensorSpan<T> destination)
4866
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4867
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x)
4876
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4878
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4887
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4890
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, int digits, MidpointRounding mode)
4899
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4903
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, int digits, MidpointRounding mode, in TensorSpan<T> destination)
4912
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4914
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, int digits)
4923
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4926
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, int digits, in TensorSpan<T> destination)
4935
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4937
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, MidpointRounding mode)
4946
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4949
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, MidpointRounding mode, in TensorSpan<T> destination)
4960
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4961
public static Tensor<T> Sigmoid<T>(in
ReadOnlyTensorSpan
<T> x)
4970
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4972
public static ref readonly TensorSpan<T> Sigmoid<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4983
/// Takes the sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4985
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4986
public static Tensor<T> Sin<T>(in
ReadOnlyTensorSpan
<T> x)
4995
/// Takes the sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4997
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4999
public static ref readonly TensorSpan<T> Sin<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5010
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5011
public static Tensor<T> Sinh<T>(in
ReadOnlyTensorSpan
<T> x)
5020
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5022
public static ref readonly TensorSpan<T> Sinh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5033
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5034
public static Tensor<T> SinPi<T>(in
ReadOnlyTensorSpan
<T> x)
5043
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5045
public static ref readonly TensorSpan<T> SinPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5056
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5057
public static Tensor<T> SoftMax<T>(in
ReadOnlyTensorSpan
<T> x)
5069
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5071
public static ref readonly TensorSpan<T> SoftMax<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5085
/// Takes the square root of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
5087
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the square root of.</param>
5088
public static Tensor<T> Sqrt<T>(in
ReadOnlyTensorSpan
<T> x)
5099
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the square root of.</param>
5101
public static ref readonly TensorSpan<T> Sqrt<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5116
public static T StdDev<T>(in
ReadOnlyTensorSpan
<T> x)
5132
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5134
public static Tensor<T> Subtract<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5146
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to subtract.</param>
5147
public static Tensor<T> Subtract<T>(T x, in
ReadOnlyTensorSpan
<T> y)
5158
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> with values to be subtracted from.</param>
5159
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> with values to subtract.</param>
5160
public static Tensor<T> Subtract<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5171
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> with values to be subtracted from.</param>
5174
public static ref readonly TensorSpan<T> Subtract<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
5186
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/> values to subtract.</param>
5188
public static ref readonly TensorSpan<T> Subtract<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5199
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> of values to be subtracted from.</param>
5200
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/>of values to subtract.</param>
5202
public static ref readonly TensorSpan<T> Subtract<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5217
public static T Sum<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5232
internal static T SumOfSquares<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5243
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5244
public static Tensor<T> Tan<T>(in
ReadOnlyTensorSpan
<T> x)
5253
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5255
public static ref readonly TensorSpan<T> Tan<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5266
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5267
public static Tensor<T> Tanh<T>(in
ReadOnlyTensorSpan
<T> x)
5276
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5278
public static ref readonly TensorSpan<T> Tanh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5289
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5290
public static Tensor<T> TanPi<T>(in
ReadOnlyTensorSpan
<T> x)
5299
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5301
public static ref readonly TensorSpan<T> TanPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5312
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5313
public static Tensor<T> TrailingZeroCount<T>(in
ReadOnlyTensorSpan
<T> x)
5322
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5324
public static ref readonly TensorSpan<T> TrailingZeroCount<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5335
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5336
public static Tensor<T> Truncate<T>(in
ReadOnlyTensorSpan
<T> x)
5345
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5347
public static ref readonly TensorSpan<T> Truncate<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5358
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5359
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5360
public static Tensor<T> Xor<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
5369
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5370
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5372
public static ref readonly TensorSpan<T> Xor<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
5381
/// Computes the element-wise Xor of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
5383
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5385
public static Tensor<T> Xor<T>(in
ReadOnlyTensorSpan
<T> x, T y)
5394
/// Computes the element-wise Xor of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
5396
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5399
public static ref readonly TensorSpan<T> Xor<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
System\Numerics\Tensors\netcore\Tensor_1.cs (6)
133
/// <inheritdoc cref="TensorSpan{T}.implicit operator
ReadOnlyTensorSpan
{T}(in TensorSpan{T})" />
134
public static implicit operator
ReadOnlyTensorSpan
<T>(Tensor<T> tensor) => tensor.AsReadOnlyTensorSpan();
137
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref Unsafe.Add(ref MemoryMarshal.GetArrayDataReference(_values), _start), in _shape);
140
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<nint> startIndexes) => AsReadOnlyTensorSpan().Slice(startIndexes);
143
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NIndex> startIndexes) => AsReadOnlyTensorSpan().Slice(startIndexes);
146
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NRange> ranges) => AsReadOnlyTensorSpan().Slice(ranges);
System\Numerics\Tensors\netcore\TensorOperation.cs (27)
29
public static bool Invoke<TOperation, TArg>(in
ReadOnlyTensorSpan
<TArg> x, in
ReadOnlyTensorSpan
<TArg> y)
61
public static bool Invoke<TOperation, TArg>(in
ReadOnlyTensorSpan
<TArg> x, TArg y)
106
public static void Invoke<TOperation, TArg, TResult>(in
ReadOnlyTensorSpan
<TArg> x, in TensorSpan<TResult> destination)
127
public static void ReverseInvoke<TOperation, TArg, TResult>(in
ReadOnlyTensorSpan
<TArg> x, in TensorSpan<TResult> destination)
156
public static void Invoke<TOperation, TArg, TResult>(in
ReadOnlyTensorSpan
<TArg> x, in Span<TResult> destination)
176
public static void Invoke<TOperation, TArg, TResult>(in
ReadOnlyTensorSpan
<TArg> x, ref TResult destination)
194
public static void Invoke<TOperation, TArg1, TArg2, TResult>(in
ReadOnlyTensorSpan
<TArg1> x, in
ReadOnlyTensorSpan
<TArg2> y, in TensorSpan<TResult> destination)
219
public static void Invoke<TOperation, TArg, TResult>(in
ReadOnlyTensorSpan
<TArg> x, in
ReadOnlyTensorSpan
<TArg> y, in TensorSpan<TResult> destination)
223
public static void Invoke<TOperation, TArg, TResult>(in
ReadOnlyTensorSpan
<TArg> x, in
ReadOnlyTensorSpan
<TArg> y, ref TResult result)
248
public static void Invoke<TOperation, TArg, TResult>(in
ReadOnlyTensorSpan
<TArg> x, TArg y, in TensorSpan<TResult> destination)
252
public static void Invoke<TOperation, TArg, TResult>(in
ReadOnlyTensorSpan
<TArg> x, int y, in TensorSpan<TResult> destination)
255
public static void Invoke<TOperation, TArg1, TArg2, TResult>(in
ReadOnlyTensorSpan
<TArg1> x, TArg2 y, in TensorSpan<TResult> destination)
277
public static void Invoke<TOperation, TArg, TResult>(TArg x, in
ReadOnlyTensorSpan
<TArg> y, in TensorSpan<TResult> destination)
299
public static void Invoke<TOperation, TArg1, TArg2, TResult>(in
ReadOnlyTensorSpan
<TArg1> x, TArg2 y, ref TResult result)
318
public static void Invoke<TOperation, TArg, TResult>(in
ReadOnlyTensorSpan
<TArg> x, TArg y, ref TResult result)
321
public static void ValidateCompatibility<TArg>(in
ReadOnlyTensorSpan
<TArg> x, in ReadOnlySpan<nint> lengths)
328
public static void ValidateCompatibility<TArg, TResult>(in
ReadOnlyTensorSpan
<TArg> x, in
ReadOnlyTensorSpan
<TResult> y)
335
public static void ValidateCompatibility<TArg, TResult>(in
ReadOnlyTensorSpan
<TArg> x, in TensorSpan<TResult> destination)
342
public static void ValidateCompatibility<TArg1, TArg2, TResult>(in
ReadOnlyTensorSpan
<TArg1> x, in
ReadOnlyTensorSpan
<TArg2> y, in TensorSpan<TResult> destination)
359
public static void ValidateCompatibility<TArg, TResult>(in
ReadOnlyTensorSpan
<TArg> x, in
ReadOnlyTensorSpan
<TArg> y, out Tensor<TResult> destination)
System\Numerics\Tensors\netcore\TensorSpan_1.cs (26)
35
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[])" />
47
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[], ReadOnlySpan{nint})" />
52
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[], ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
64
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[], int, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
76
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(ReadOnlySpan{T})" />
84
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(ReadOnlySpan{T}, ReadOnlySpan{nint})" />
88
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(ReadOnlySpan{T}, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
96
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(Array)"/>
108
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(Array, ReadOnlySpan{int}, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
120
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T*, nint)" />
128
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T*, nint, ReadOnlySpan{nint})" />
133
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T*, nint, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
198
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.operator ==(in
ReadOnlyTensorSpan
{T}, in
ReadOnlyTensorSpan
{T})" />
203
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.operator !=(in
ReadOnlyTensorSpan
{T}, in
ReadOnlyTensorSpan
{T})" />
214
public static implicit operator
ReadOnlyTensorSpan
<T>(scoped in TensorSpan<T> tensor) =>
218
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref _reference, in _shape);
221
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<nint> startIndexes) => AsReadOnlyTensorSpan().Slice(startIndexes);
224
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NIndex> startIndexes) => AsReadOnlyTensorSpan().Slice(startIndexes);
227
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NRange> ranges) => AsReadOnlyTensorSpan().Slice(ranges);
241
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.Equals(object?)" />
265
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.GetHashCode" />
331
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ToString" />
System\Numerics\Tensors\netcore\TensorSpanDebugView.cs (1)
18
public TensorSpanDebugView(
ReadOnlyTensorSpan
<T> span)
System\Runtime\InteropServices\TensorMarshal.cs (3)
9
/// <summary>Provides methods to interoperate with <see cref="Tensor{T}" />, <see cref="TensorSpan{T}" />, and <see cref="
ReadOnlyTensorSpan
{T}" />.</summary>
35
public static
ReadOnlyTensorSpan
<T> CreateReadOnlyTensorSpan<T>(scoped ref readonly T data, nint dataLength, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned)
55
public static ref readonly T GetReference<T>(in
ReadOnlyTensorSpan
<T> tensorSpan)