39 instantiations of ReadOnlyTensorSpan
System.Numerics.Tensors (39)
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 (17)
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);
2126
ReadOnlyTensorSpan<T> tmpTensor = new
ReadOnlyTensorSpan
<T>(ref tensor._reference, tmpShape);
2132
tmpTensor = new
ReadOnlyTensorSpan
<T>(ref Unsafe.Add(ref tensor._reference, i * tensor.Strides[0]), tmpShape);
2389
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);
815 references to ReadOnlyTensorSpan
System.Numerics.Tensors (815)
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)
517
ReadOnlyTensorSpan
<T> IReadOnlyTensor<
ReadOnlyTensorSpan
<T>, T>.AsReadOnlyTensorSpan() => this;
519
ReadOnlyTensorSpan
<T> IReadOnlyTensor<
ReadOnlyTensorSpan
<T>, T>.AsReadOnlyTensorSpan(params scoped ReadOnlySpan<nint> startIndexes) => Slice(startIndexes);
521
ReadOnlyTensorSpan
<T> IReadOnlyTensor<
ReadOnlyTensorSpan
<T>, T>.AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NIndex> startIndexes) => Slice(startIndexes);
523
ReadOnlyTensorSpan
<T> IReadOnlyTensor<
ReadOnlyTensorSpan
<T>, T>.AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NRange> ranges) => Slice(ranges);
525
ReadOnlyTensorSpan
<T> IReadOnlyTensor<
ReadOnlyTensorSpan
<T>, T>.ToDenseTensor()
527
ReadOnlyTensorSpan
<T> result = this;
543
private readonly
ReadOnlyTensorSpan
<T> _span;
548
internal Enumerator(
ReadOnlyTensorSpan
<T> span)
System\Numerics\Tensors\netcore\Tensor.cs (697)
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);
2067
internal static string ToString<T>(in
ReadOnlyTensorSpan
<T> tensor, ReadOnlySpan<nint> maximumLengths, string typeName)
2104
private static void ToString<T>(in
ReadOnlyTensorSpan
<T> tensor, ReadOnlySpan<nint> maximumLengths, StringBuilder sb, int indentLevel = 0)
2126
ReadOnlyTensorSpan
<T> tmpTensor = new ReadOnlyTensorSpan<T>(ref tensor._reference, tmpShape);
2157
private static void ToString<T>(in
ReadOnlyTensorSpan
<T> tensor, nint length, StringBuilder sb, int indentLevel)
2270
/// <param name="tensor">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2272
public static bool TryBroadcastTo<T>(in this
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination)
2361
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> to add a dimension of length 1.</param>
2363
public static
ReadOnlyTensorSpan
<T> Unsqueeze<T>(this scoped in
ReadOnlyTensorSpan
<T> tensor, int dimension)
2389
ReadOnlyTensorSpan
<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, newStrides, tensor.IsPinned);
2401
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the abs of.</param>
2402
public static Tensor<T> Abs<T>(in
ReadOnlyTensorSpan
<T> x)
2411
/// Takes the absolute value of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2415
public static ref readonly TensorSpan<T> Abs<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2428
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2429
public static Tensor<T> Acos<T>(in
ReadOnlyTensorSpan
<T> x)
2442
public static ref readonly TensorSpan<T> Acos<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2453
/// 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.
2455
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2456
public static Tensor<T> Acosh<T>(in
ReadOnlyTensorSpan
<T> x)
2469
public static ref readonly TensorSpan<T> Acosh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2482
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2483
public static Tensor<T> AcosPi<T>(in
ReadOnlyTensorSpan
<T> x)
2494
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2496
public static ref readonly TensorSpan<T> AcosPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2507
/// Takes the inverse sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2509
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2510
public static Tensor<T> Asin<T>(in
ReadOnlyTensorSpan
<T> x)
2519
/// Takes the inverse sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2521
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2523
public static ref readonly TensorSpan<T> Asin<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2534
/// 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.
2536
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2537
public static Tensor<T> Asinh<T>(in
ReadOnlyTensorSpan
<T> x)
2546
/// 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.
2548
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2550
public static ref readonly TensorSpan<T> Asinh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2561
/// 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.
2563
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2564
public static Tensor<T> AsinPi<T>(in
ReadOnlyTensorSpan
<T> x)
2573
/// 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.
2575
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2577
public static ref readonly TensorSpan<T> AsinPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2588
/// Takes the arc tangent of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2590
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
2591
public static Tensor<T> Atan<T>(in
ReadOnlyTensorSpan
<T> x)
2600
/// Takes the arc tangent of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2602
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
2604
public static ref readonly TensorSpan<T> Atan<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2615
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2617
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2618
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2619
public static Tensor<T> Atan2<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2628
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2630
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2631
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2633
public static ref readonly TensorSpan<T> Atan2<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
2642
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2644
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2645
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2646
public static Tensor<T> Atan2<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2655
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2657
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2658
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2660
public static ref readonly TensorSpan<T> Atan2<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
2669
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2671
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2672
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2673
public static Tensor<T> Atan2<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2682
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2684
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2685
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2687
public static ref readonly TensorSpan<T> Atan2<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
2698
/// 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.
2700
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2701
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2702
public static Tensor<T> Atan2Pi<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2711
/// 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.
2713
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2714
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2716
public static ref readonly TensorSpan<T> Atan2Pi<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
2725
/// 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.
2727
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2728
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2729
public static Tensor<T> Atan2Pi<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2738
/// 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.
2740
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2741
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2743
public static ref readonly TensorSpan<T> Atan2Pi<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
2752
/// 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.
2754
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2755
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2756
public static Tensor<T> Atan2Pi<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2765
/// 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.
2767
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2768
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2770
public static ref readonly TensorSpan<T> Atan2Pi<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
2781
/// 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.
2783
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2784
public static Tensor<T> Atanh<T>(in
ReadOnlyTensorSpan
<T> x)
2793
/// 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.
2795
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2797
public static ref readonly TensorSpan<T> Atanh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2808
/// 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.
2810
/// <param name="x">The input<see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2811
public static Tensor<T> AtanPi<T>(in
ReadOnlyTensorSpan
<T> x)
2820
/// 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.
2822
/// <param name="x">The input<see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2824
public static ref readonly TensorSpan<T> AtanPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2839
public static T Average<T>(scoped in
ReadOnlyTensorSpan
<T> x)
2852
/// Computes the element-wise cube root of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2854
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2855
public static Tensor<T> Cbrt<T>(in
ReadOnlyTensorSpan
<T> x)
2864
/// Computes the element-wise cube root of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2866
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2868
public static ref readonly TensorSpan<T> Cbrt<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2879
/// Computes the element-wise ceiling of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2881
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2882
public static Tensor<T> Ceiling<T>(in
ReadOnlyTensorSpan
<T> x)
2891
/// Computes the element-wise ceiling of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2893
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2895
public static ref readonly TensorSpan<T> Ceiling<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2906
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
2909
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2910
public static Tensor<TTo> ConvertChecked<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
2925
public static ref readonly TensorSpan<TTo> ConvertChecked<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
2937
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
2940
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2941
public static Tensor<TTo> ConvertSaturating<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
2956
public static ref readonly TensorSpan<TTo> ConvertSaturating<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
2968
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
2971
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2972
public static Tensor<TTo> ConvertTruncating<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
2987
public static ref readonly TensorSpan<TTo> ConvertTruncating<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
3001
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3003
public static Tensor<T> CopySign<T>(in
ReadOnlyTensorSpan
<T> x, T sign)
3014
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3015
/// <param name="sign">The <see cref="
ReadOnlyTensorSpan
{T}"/> with the associated signs.</param>
3016
public static Tensor<T> CopySign<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> sign)
3027
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3030
public static ref readonly TensorSpan<T> CopySign<T>(scoped in
ReadOnlyTensorSpan
<T> x, T sign, in TensorSpan<T> destination)
3041
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3042
/// <param name="sign">The <see cref="
ReadOnlyTensorSpan
{T}"/> with the associated signs.</param>
3044
public static ref readonly TensorSpan<T> CopySign<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> sign, in TensorSpan<T> destination)
3055
/// Takes the cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3057
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
3058
public static Tensor<T> Cos<T>(in
ReadOnlyTensorSpan
<T> x)
3067
/// Takes the cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3069
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
3071
public static ref readonly TensorSpan<T> Cos<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3082
/// Takes the hyperbolic cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3084
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
3085
public static Tensor<T> Cosh<T>(in
ReadOnlyTensorSpan
<T> x)
3094
/// Takes the hyperbolic cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3096
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
3098
public static ref readonly TensorSpan<T> Cosh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3111
/// <param name="x">The first <see cref="
ReadOnlyTensorSpan
{T}"/></param>
3112
/// <param name="y">The second <see cref="
ReadOnlyTensorSpan
{T}"/></param>
3113
public static T CosineSimilarity<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3125
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
3138
public static Tensor<T> CosPi<T>(in
ReadOnlyTensorSpan
<T> x)
3147
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
3161
public static ref readonly TensorSpan<T> CosPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3174
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3175
public static Tensor<T> DegreesToRadians<T>(in
ReadOnlyTensorSpan
<T> x)
3186
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3188
public static ref readonly TensorSpan<T> DegreesToRadians<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3201
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3202
/// <param name="y">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3203
public static T Distance<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y)
3217
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3218
/// <param name="y">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3219
public static T Dot<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3233
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3234
public static Tensor<T> Exp<T>(in
ReadOnlyTensorSpan
<T> x)
3245
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3247
public static ref readonly TensorSpan<T> Exp<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3260
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3261
public static Tensor<T> Exp10<T>(in
ReadOnlyTensorSpan
<T> x)
3272
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3274
public static ref readonly TensorSpan<T> Exp10<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3285
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3286
public static Tensor<T> Exp10M1<T>(in
ReadOnlyTensorSpan
<T> x)
3295
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3297
public static ref readonly TensorSpan<T> Exp10M1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3308
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3309
public static Tensor<T> Exp2<T>(in
ReadOnlyTensorSpan
<T> x)
3318
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3320
public static ref readonly TensorSpan<T> Exp2<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3331
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3332
public static Tensor<T> Exp2M1<T>(in
ReadOnlyTensorSpan
<T> x)
3341
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3343
public static ref readonly TensorSpan<T> Exp2M1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3354
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3355
public static Tensor<T> ExpM1<T>(in
ReadOnlyTensorSpan
<T> x)
3364
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3366
public static ref readonly TensorSpan<T> ExpM1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3377
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3378
public static Tensor<T> Floor<T>(in
ReadOnlyTensorSpan
<T> x)
3387
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3389
public static ref readonly TensorSpan<T> Floor<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3403
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3404
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3405
public static Tensor<T> Hypot<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3417
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3418
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3420
public static ref readonly TensorSpan<T> Hypot<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3432
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3433
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3434
public static Tensor<T> Ieee754Remainder<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3444
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3445
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3447
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3456
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3457
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3458
public static Tensor<T> Ieee754Remainder<T>(in
ReadOnlyTensorSpan
<T> x, T y)
3467
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3468
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3470
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
3479
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3480
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3481
public static Tensor<T> Ieee754Remainder<T>(T x, in
ReadOnlyTensorSpan
<T> y)
3490
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3491
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3493
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3504
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3505
public static Tensor<int> ILogB<T>(in
ReadOnlyTensorSpan
<T> x)
3514
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3516
public static ref readonly TensorSpan<int> ILogB<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<int> destination)
3527
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3528
public static nint IndexOfMax<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3539
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3540
public static nint IndexOfMaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3550
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3551
public static nint IndexOfMin<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3563
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3564
public static nint IndexOfMinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3576
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3577
public static Tensor<T> LeadingZeroCount<T>(in
ReadOnlyTensorSpan
<T> x)
3588
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3590
public static ref readonly TensorSpan<T> LeadingZeroCount<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3601
/// Takes the natural logarithm of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3603
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
3604
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x)
3613
/// Takes the natural logarithm of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3615
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
3617
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3628
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3640
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3651
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x, T y)
3663
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
3674
/// 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.
3676
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
3677
public static Tensor<T> Log10<T>(in
ReadOnlyTensorSpan
<T> x)
3686
/// 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.
3688
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
3690
public static ref readonly TensorSpan<T> Log10<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3701
/// 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.
3703
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
3704
public static Tensor<T> Log10P1<T>(in
ReadOnlyTensorSpan
<T> x)
3713
/// 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.
3715
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
3717
public static ref readonly TensorSpan<T> Log10P1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3728
/// 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.
3730
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
3731
public static Tensor<T> Log2<T>(in
ReadOnlyTensorSpan
<T> x)
3740
/// 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.
3742
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
3744
public static ref readonly TensorSpan<T> Log2<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3755
/// 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.
3757
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
3758
public static Tensor<T> Log2P1<T>(in
ReadOnlyTensorSpan
<T> x)
3767
/// 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.
3769
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
3771
public static ref readonly TensorSpan<T> Log2P1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3782
/// 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.
3784
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
3785
public static Tensor<T> LogP1<T>(in
ReadOnlyTensorSpan
<T> x)
3794
/// 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.
3796
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
3798
public static ref readonly TensorSpan<T> LogP1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3809
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3810
public static T Max<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3826
public static Tensor<T> Max<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3838
public static ref readonly TensorSpan<T> Max<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3849
public static Tensor<T> Max<T>(in
ReadOnlyTensorSpan
<T> x, T y)
3861
public static ref readonly TensorSpan<T> Max<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
3872
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3873
public static T MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3889
public static Tensor<T> MaxMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3901
public static ref readonly TensorSpan<T> MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3912
public static Tensor<T> MaxMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, T y)
3924
public static ref readonly TensorSpan<T> MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
3935
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3936
public static T MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3952
public static Tensor<T> MaxMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3964
public static ref readonly TensorSpan<T> MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3975
public static Tensor<T> MaxMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
3987
public static ref readonly TensorSpan<T> MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
3998
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3999
public static T MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4015
public static Tensor<T> MaxNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4027
public static ref readonly TensorSpan<T> MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4038
public static Tensor<T> MaxNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4050
public static ref readonly TensorSpan<T> MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4061
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4062
public static T Min<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4078
public static Tensor<T> Min<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4090
public static ref readonly TensorSpan<T> Min<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4101
public static Tensor<T> Min<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4113
public static ref readonly TensorSpan<T> Min<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4124
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4125
public static T MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4141
public static Tensor<T> MinMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4153
public static ref readonly TensorSpan<T> MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4164
public static Tensor<T> MinMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4176
public static ref readonly TensorSpan<T> MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4187
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4188
public static T MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4204
public static Tensor<T> MinMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4216
public static ref readonly TensorSpan<T> MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4227
public static Tensor<T> MinMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4239
public static ref readonly TensorSpan<T> MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4250
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4251
public static T MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4267
public static Tensor<T> MinNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4279
public static ref readonly TensorSpan<T> MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4290
public static Tensor<T> MinNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4302
public static ref readonly TensorSpan<T> MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4313
/// Takes the norm of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns the result.
4315
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the norm of.</param>
4316
public static T Norm<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4327
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4328
public static Tensor<T> PopCount<T>(in
ReadOnlyTensorSpan
<T> x)
4337
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4339
public static ref readonly TensorSpan<T> PopCount<T>(scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4350
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4351
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4352
public static Tensor<T> Pow<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4361
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4362
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4364
public static ref readonly TensorSpan<T> Pow<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4373
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4375
public static Tensor<T> Pow<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4384
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4385
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4387
public static ref readonly TensorSpan<T> Pow<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4396
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4398
public static Tensor<T> Pow<T>(T x, in
ReadOnlyTensorSpan
<T> y)
4407
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4408
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4410
public static ref readonly TensorSpan<T> Pow<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4421
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4422
public static T Product<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4433
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4434
public static Tensor<T> RadiansToDegrees<T>(in
ReadOnlyTensorSpan
<T> x)
4443
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4445
public static ref readonly TensorSpan<T> RadiansToDegrees<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4456
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4457
public static Tensor<T> Reciprocal<T>(in
ReadOnlyTensorSpan
<T> x)
4466
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4468
public static ref readonly TensorSpan<T> Reciprocal<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4481
public static Tensor<T> RootN<T>(in
ReadOnlyTensorSpan
<T> x, int n)
4493
public static ref readonly TensorSpan<T> RootN<T>(scoped in
ReadOnlyTensorSpan
<T> x, int n, in TensorSpan<T> destination)
4507
public static Tensor<T> RotateLeft<T>(in
ReadOnlyTensorSpan
<T> x, int rotateAmount)
4520
public static ref readonly TensorSpan<T> RotateLeft<T>(scoped in
ReadOnlyTensorSpan
<T> x, int rotateAmount, in TensorSpan<T> destination)
4534
public static Tensor<T> RotateRight<T>(in
ReadOnlyTensorSpan
<T> x, int rotateAmount)
4547
public static ref readonly TensorSpan<T> RotateRight<T>(scoped in
ReadOnlyTensorSpan
<T> x, int rotateAmount, in TensorSpan<T> destination)
4558
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4559
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x)
4568
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4570
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4579
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4582
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, int digits, MidpointRounding mode)
4591
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4595
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, int digits, MidpointRounding mode, in TensorSpan<T> destination)
4604
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4606
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, int digits)
4615
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4618
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, int digits, in TensorSpan<T> destination)
4627
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4629
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, MidpointRounding mode)
4638
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4641
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, MidpointRounding mode, in TensorSpan<T> destination)
4652
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4653
public static Tensor<T> Sigmoid<T>(in
ReadOnlyTensorSpan
<T> x)
4662
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4664
public static ref readonly TensorSpan<T> Sigmoid<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4675
/// Takes the sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4677
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4678
public static Tensor<T> Sin<T>(in
ReadOnlyTensorSpan
<T> x)
4687
/// Takes the sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4689
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4691
public static ref readonly TensorSpan<T> Sin<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4702
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4703
public static Tensor<T> Sinh<T>(in
ReadOnlyTensorSpan
<T> x)
4712
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4714
public static ref readonly TensorSpan<T> Sinh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4725
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4726
public static Tensor<T> SinPi<T>(in
ReadOnlyTensorSpan
<T> x)
4735
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4737
public static ref readonly TensorSpan<T> SinPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4748
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4749
public static Tensor<T> SoftMax<T>(in
ReadOnlyTensorSpan
<T> x)
4761
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4763
public static ref readonly TensorSpan<T> SoftMax<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4777
/// Takes the square root of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4779
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the square root of.</param>
4780
public static Tensor<T> Sqrt<T>(in
ReadOnlyTensorSpan
<T> x)
4791
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the square root of.</param>
4793
public static ref readonly TensorSpan<T> Sqrt<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4808
public static T StdDev<T>(in
ReadOnlyTensorSpan
<T> x)
4826
public static T Sum<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4841
internal static T SumOfSquares<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4852
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4853
public static Tensor<T> Tan<T>(in
ReadOnlyTensorSpan
<T> x)
4862
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4864
public static ref readonly TensorSpan<T> Tan<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4875
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4876
public static Tensor<T> Tanh<T>(in
ReadOnlyTensorSpan
<T> x)
4885
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4887
public static ref readonly TensorSpan<T> Tanh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4898
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4899
public static Tensor<T> TanPi<T>(in
ReadOnlyTensorSpan
<T> x)
4908
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4910
public static ref readonly TensorSpan<T> TanPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4921
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4922
public static Tensor<T> TrailingZeroCount<T>(in
ReadOnlyTensorSpan
<T> x)
4931
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4933
public static ref readonly TensorSpan<T> TrailingZeroCount<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4944
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4945
public static Tensor<T> Truncate<T>(in
ReadOnlyTensorSpan
<T> x)
4954
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4956
public static ref readonly TensorSpan<T> Truncate<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
System\Numerics\Tensors\netcore\Tensor.op_OnesComplement.cs (6)
12
public static Tensor<T> OnesComplement<T>(in
ReadOnlyTensorSpan
<T> x)
26
public static ref readonly TensorSpan<T> OnesComplement<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
35
extension<TScalar>(
ReadOnlyTensorSpan
<TScalar>)
41
public static Tensor<TScalar> operator ~(in
ReadOnlyTensorSpan
<TScalar> tensor) => OnesComplement(tensor);
48
/// <inheritdoc cref="op_OnesComplement{T}(in
ReadOnlyTensorSpan
{T})" />
56
/// <inheritdoc cref="op_OnesComplement{T}(in
ReadOnlyTensorSpan
{T})" />
System\Numerics\Tensors\netcore\Tensor.op_UnaryNegation.cs (6)
11
public static Tensor<T> Negate<T>(in
ReadOnlyTensorSpan
<T> x)
24
public static ref readonly TensorSpan<T> Negate<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
33
extension<TScalar>(
ReadOnlyTensorSpan
<TScalar>)
39
public static Tensor<TScalar> operator -(in
ReadOnlyTensorSpan
<TScalar> tensor) => Negate(tensor);
46
/// <inheritdoc cref="op_UnaryNegation{T}(in
ReadOnlyTensorSpan
{T})" />
54
/// <inheritdoc cref="op_UnaryNegation{T}(in
ReadOnlyTensorSpan
{T})" />
System\Numerics\Tensors\netcore\Tensor.op_UnaryPlus.cs (5)
9
extension<TScalar>(
ReadOnlyTensorSpan
<TScalar>)
15
public static
ReadOnlyTensorSpan
<TScalar> operator +(in
ReadOnlyTensorSpan
<TScalar> tensor) => tensor;
22
/// <inheritdoc cref="op_UnaryPlus{T}(in
ReadOnlyTensorSpan
{T})" />
30
/// <inheritdoc cref="op_UnaryPlus{T}(in
ReadOnlyTensorSpan
{T})" />
System\Numerics\Tensors\netcore\Tensor_1.cs (8)
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);
291
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ToString()" />
294
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ToString(ReadOnlySpan{nint})" />
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 (27)
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()" />
334
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ToString(ReadOnlySpan{nint})" />
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)