40 instantiations of ReadOnlyTensorSpan
System.Numerics.Tensors (40)
System\Numerics\Tensors\netcore\ReadOnlyTensorDimensionSpan_1.cs (1)
52
return new
ReadOnlyTensorSpan
<T>(ref Unsafe.Add(ref _tensor._reference, linearOffset), _sliceShape);
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan_1.cs (5)
313
public static implicit operator ReadOnlyTensorSpan<T>(T[]? array) => new
ReadOnlyTensorSpan
<T>(array);
323
return new
ReadOnlyTensorSpan
<T>(
406
return new
ReadOnlyTensorSpan
<T>(
416
return new
ReadOnlyTensorSpan
<T>(
426
return new
ReadOnlyTensorSpan
<T>(
System\Numerics\Tensors\netcore\Tensor.cs (18)
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);
262
ReadOnlyTensorSpan<T> tempTensor = new
ReadOnlyTensorSpan
<T>(tempBuffer, 0, destination.Lengths, []);
332
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[])" />
337
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[], ReadOnlySpan{nint})" />
342
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[], ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
347
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[], int, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
1603
ReadOnlyTensorSpan<T> output = new
ReadOnlyTensorSpan
<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, strides, tensor.IsPinned);
2106
ReadOnlyTensorSpan<T> output = new
ReadOnlyTensorSpan
<T>(ref tensor._reference, tensor._shape.LinearLength, lengths[..rank], strides[..rank], tensor.IsPinned);
2255
ReadOnlyTensorSpan<T> tmpTensor = new
ReadOnlyTensorSpan
<T>(ref tensor._reference, tmpShape);
2261
tmpTensor = new
ReadOnlyTensorSpan
<T>(ref Unsafe.Add(ref tensor._reference, i * tensor.Strides[0]), tmpShape);
2518
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)
32
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[])" />
44
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[], ReadOnlySpan{nint})" />
49
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[], ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
61
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T[], int, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
73
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(ReadOnlySpan{T})" />
81
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(ReadOnlySpan{T}, ReadOnlySpan{nint})" />
85
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(ReadOnlySpan{T}, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
93
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(Array)"/>
105
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(Array, ReadOnlySpan{int}, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
117
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T*, nint)" />
125
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T*, nint, ReadOnlySpan{nint})" />
130
/// <inheritdoc cref="ReadOnlyTensorSpan{T}.
ReadOnlyTensorSpan
(T*, nint, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
212
new
ReadOnlyTensorSpan
<T>(ref tensor._reference, tensor._shape);
215
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);
825 references to ReadOnlyTensorSpan
System.Numerics.Tensors (825)
System\Numerics\Tensors\netcore\IReadOnlyTensor_1.cs (4)
35
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan();
40
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<nint> startIndexes);
43
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NIndex> startIndexes);
48
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NRange> ranges);
System\Numerics\Tensors\netcore\ReadOnlyTensorDimensionSpan_1.cs (5)
14
private readonly
ReadOnlyTensorSpan
<T> _tensor;
19
internal ReadOnlyTensorDimensionSpan(
ReadOnlyTensorSpan
<T> tensor, int dimension)
42
public
ReadOnlyTensorSpan
<T> this[nint index]
60
public ref struct Enumerator : IEnumerator<
ReadOnlyTensorSpan
<T>>
72
public readonly
ReadOnlyTensorSpan
<T> Current => _span[_index];
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan_1.cs (26)
24
public readonly ref struct ReadOnlyTensorSpan<T> : IReadOnlyTensor<
ReadOnlyTensorSpan
<T>, T>
27
public static
ReadOnlyTensorSpan
<T> Empty => default;
263
public
ReadOnlyTensorSpan
<T> this[params scoped ReadOnlySpan<NRange> ranges]
299
public static bool operator ==(in
ReadOnlyTensorSpan
<T> left, in
ReadOnlyTensorSpan
<T> right)
308
public static bool operator !=(in
ReadOnlyTensorSpan
<T> left, in
ReadOnlyTensorSpan
<T> right) => !(left == right);
313
public static implicit operator
ReadOnlyTensorSpan
<T>(T[]? array) => new ReadOnlyTensorSpan<T>(array);
320
public static
ReadOnlyTensorSpan
<T> CastUp<TDerived>(in
ReadOnlyTensorSpan
<TDerived> items)
403
public
ReadOnlyTensorSpan
<T> Slice(params scoped ReadOnlySpan<nint> startIndexes)
413
public
ReadOnlyTensorSpan
<T> Slice(params scoped ReadOnlySpan<NIndex> startIndexes)
423
public
ReadOnlyTensorSpan
<T> Slice(params scoped ReadOnlySpan<NRange> ranges)
513
ReadOnlyTensorSpan
<T> IReadOnlyTensor<
ReadOnlyTensorSpan
<T>, T>.AsReadOnlyTensorSpan() => this;
515
ReadOnlyTensorSpan
<T> IReadOnlyTensor<
ReadOnlyTensorSpan
<T>, T>.AsReadOnlyTensorSpan(params scoped ReadOnlySpan<nint> startIndexes) => Slice(startIndexes);
517
ReadOnlyTensorSpan
<T> IReadOnlyTensor<
ReadOnlyTensorSpan
<T>, T>.AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NIndex> startIndexes) => Slice(startIndexes);
519
ReadOnlyTensorSpan
<T> IReadOnlyTensor<
ReadOnlyTensorSpan
<T>, T>.AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NRange> ranges) => Slice(ranges);
521
ReadOnlyTensorSpan
<T> IReadOnlyTensor<
ReadOnlyTensorSpan
<T>, T>.ToDenseTensor()
523
ReadOnlyTensorSpan
<T> result = this;
538
private readonly
ReadOnlyTensorSpan
<T> _span;
543
internal Enumerator(
ReadOnlyTensorSpan
<T> span)
System\Numerics\Tensors\netcore\Tensor.cs (707)
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)
262
ReadOnlyTensorSpan
<T> tempTensor = new ReadOnlyTensorSpan<T>(tempBuffer, 0, destination.Lengths, []);
332
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[])" />
337
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[], ReadOnlySpan{nint})" />
342
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[], ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
347
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[], int, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
452
/// 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
455
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
456
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
458
public static Tensor<bool> Equals<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
467
/// 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
470
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
471
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
474
public static ref readonly TensorSpan<bool> Equals<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
483
/// 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
486
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
489
public static Tensor<bool> Equals<T>(in
ReadOnlyTensorSpan
<T> x, T y)
498
/// 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
501
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
505
public static ref readonly TensorSpan<bool> Equals<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
516
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are equal to <paramref name="y"/>.
520
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
521
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
523
public static bool EqualsAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
531
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are equal to <paramref name="y"/>.
535
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
536
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
538
public static bool EqualsAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
544
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are equal to <paramref name="y"/>.
548
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
549
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
551
public static bool EqualsAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
563
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are equal to <paramref name="y"/>.
567
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
570
public static bool EqualsAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
581
public static ref readonly TensorSpan<T> FilteredUpdate<T>(in this TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<bool> filter, T value)
595
public static ref readonly TensorSpan<T> FilteredUpdate<T>(in this TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<bool> filter, scoped in
ReadOnlyTensorSpan
<T> values)
605
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are greater than <paramref name="y"/>.
610
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
611
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
614
public static Tensor<bool> GreaterThan<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
623
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are greater than <paramref name="y"/>.
628
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
629
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
633
public static ref readonly TensorSpan<bool> GreaterThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
642
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than <paramref name="y"/>.
646
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
650
public static Tensor<bool> GreaterThan<T>(in
ReadOnlyTensorSpan
<T> x, T y)
659
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than <paramref name="y"/>.
663
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
668
public static ref readonly TensorSpan<bool> GreaterThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
681
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
685
public static Tensor<bool> GreaterThan<T>(T x, in
ReadOnlyTensorSpan
<T> y)
693
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
698
public static ref readonly TensorSpan<bool> GreaterThan<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
704
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
708
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
709
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
711
public static bool GreaterThanAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
719
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <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 against.</param>
726
public static bool GreaterThanAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
730
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are greater than <paramref name="y"/>.
734
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
735
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
737
public static bool GreaterThanAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
743
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
747
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
748
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
750
public static bool GreaterThanAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
762
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
766
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
769
public static bool GreaterThanAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
773
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are greater than <paramref name="x"/>.
777
/// <param name="y">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
780
public static bool GreaterThanAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
786
/// 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"/>.
791
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
792
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
795
public static Tensor<bool> GreaterThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
804
/// 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"/>.
809
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
810
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
814
public static ref readonly TensorSpan<bool> GreaterThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
823
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than or equal to <paramref name="y"/>.
827
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
831
public static Tensor<bool> GreaterThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, T y)
840
/// Compares the elements of a <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements are greater than or equal to <paramref name="y"/>.
844
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
849
public static ref readonly TensorSpan<bool> GreaterThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
862
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
866
public static Tensor<bool> GreaterThanOrEqual<T>(T x, in
ReadOnlyTensorSpan
<T> y)
874
/// <param name="x"><see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
879
public static ref readonly TensorSpan<bool> GreaterThanOrEqual<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
885
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater than <paramref name="y"/>.
889
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
890
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
892
public static bool GreaterThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
900
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are greater 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 against.</param>
907
public static bool GreaterThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
911
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are greater than <paramref name="y"/>.
915
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
916
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
918
public static bool GreaterThanOrEqualAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
924
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
928
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
929
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
931
public static bool GreaterThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
943
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are greater than <paramref name="y"/>.
947
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
950
public static bool GreaterThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
954
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are greater than <paramref name="x"/>.
958
/// <param name="y">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
961
public static bool GreaterThanOrEqualAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
967
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
972
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
973
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
976
public static Tensor<bool> LessThan<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
985
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
990
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
991
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
995
public static ref readonly TensorSpan<bool> LessThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1012
public static Tensor<bool> LessThan<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1030
public static ref readonly TensorSpan<bool> LessThan<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
1047
public static Tensor<bool> LessThan<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1060
public static ref readonly TensorSpan<bool> LessThan<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1066
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
1070
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1071
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1073
public static bool LessThanAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1081
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
1085
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1088
public static bool LessThanAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1092
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are less than <paramref name="x"/>.
1099
public static bool LessThanAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1105
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
1109
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1110
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1112
public static bool LessThanAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1124
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
1128
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1131
public static bool LessThanAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1135
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are less than <paramref name="y"/>.
1142
public static bool LessThanAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1148
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
1153
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1154
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1157
public static Tensor<bool> LessThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1166
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see which elements of <paramref name="x"/> are less than <paramref name="y"/>.
1171
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1172
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1176
public static ref readonly TensorSpan<bool> LessThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1193
public static Tensor<bool> LessThanOrEqual<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1211
public static ref readonly TensorSpan<bool> LessThanOrEqual<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<bool> destination)
1228
public static Tensor<bool> LessThanOrEqual<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1241
public static ref readonly TensorSpan<bool> LessThanOrEqual<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<bool> destination)
1247
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
1251
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1252
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1254
public static bool LessThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1262
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="x"/> are less than <paramref name="y"/>.
1266
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1269
public static bool LessThanOrEqualAll<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1273
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if all elements of <paramref name="y"/> are less than <paramref name="x"/>.
1280
public static bool LessThanOrEqualAll<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1286
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
1290
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1291
/// <param name="y">Second <see cref="
ReadOnlyTensorSpan
{T}"/> to compare against.</param>
1293
public static bool LessThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
1305
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="x"/> are less than <paramref name="y"/>.
1309
/// <param name="x">First <see cref="
ReadOnlyTensorSpan
{T}"/> to compare.</param>
1312
public static bool LessThanOrEqualAny<T>(in
ReadOnlyTensorSpan
<T> x, T y)
1316
/// Compares the elements of two <see cref="
ReadOnlyTensorSpan
{T}"/> to see if any elements of <paramref name="y"/> are less than <paramref name="y"/>.
1323
public static bool LessThanOrEqualAny<T>(T x, in
ReadOnlyTensorSpan
<T> y)
1539
public static
ReadOnlyTensorSpan
<T> Reshape<T>(this scoped in
ReadOnlyTensorSpan
<T> tensor, scoped ReadOnlySpan<nint> lengths)
1603
ReadOnlyTensorSpan
<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, strides, tensor.IsPinned);
1637
ReadOnlyTensorSpan
<T>.Enumerator enumerator = tensor.AsReadOnlyTensorSpan().GetEnumerator();
1677
/// <param name="tensor">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
1679
public static void ResizeTo<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination)
1697
ReadOnlyTensorSpan
<T>.Enumerator srcEnumerator = tensor.GetEnumerator();
1716
public static Tensor<T> Reverse<T>(in
ReadOnlyTensorSpan
<T> tensor)
1730
public static Tensor<T> ReverseDimension<T>(in
ReadOnlyTensorSpan
<T> tensor, int dimension)
1743
public static ref readonly TensorSpan<T> Reverse<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination)
1755
public static ref readonly TensorSpan<T> ReverseDimension<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination, int dimension)
1794
public static bool SequenceEqual<T>(this scoped in TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<T> other)
1797
return ((
ReadOnlyTensorSpan
<T>)tensor).SequenceEqual(other);
1803
public static bool SequenceEqual<T>(this scoped in
ReadOnlyTensorSpan
<T> tensor, scoped in
ReadOnlyTensorSpan
<T> other)
1817
ReadOnlyTensorSpan
<T>.Enumerator enumerator1 = tensor.GetEnumerator();
1818
ReadOnlyTensorSpan
<T>.Enumerator enumerator2 = other.GetEnumerator();
1842
public static Tensor<T> SetSlice<T>(this Tensor<T> tensor, in
ReadOnlyTensorSpan
<T> values, params ReadOnlySpan<NRange> ranges)
1854
public static ref readonly TensorSpan<T> SetSlice<T>(this in TensorSpan<T> tensor, scoped in
ReadOnlyTensorSpan
<T> values, params scoped ReadOnlySpan<NRange> ranges)
1876
public static Tensor<T>[] Split<T>(scoped in
ReadOnlyTensorSpan
<T> tensor, int splitCount, nint dimension)
2050
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> to remove all dimensions of length 1.</param>
2051
public static
ReadOnlyTensorSpan
<T> Squeeze<T>(this scoped in
ReadOnlyTensorSpan
<T> tensor)
2060
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> to remove dimension of length 1.</param>
2062
public static
ReadOnlyTensorSpan
<T> SqueezeDimension<T>(this scoped in
ReadOnlyTensorSpan
<T> tensor, int dimension)
2106
ReadOnlyTensorSpan
<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, lengths[..rank], strides[..rank], tensor.IsPinned);
2196
internal static string ToString<T>(in
ReadOnlyTensorSpan
<T> tensor, ReadOnlySpan<nint> maximumLengths, string typeName)
2233
private static void ToString<T>(in
ReadOnlyTensorSpan
<T> tensor, ReadOnlySpan<nint> maximumLengths, StringBuilder sb, int indentLevel = 0)
2255
ReadOnlyTensorSpan
<T> tmpTensor = new ReadOnlyTensorSpan<T>(ref tensor._reference, tmpShape);
2286
private static void ToString<T>(in
ReadOnlyTensorSpan
<T> tensor, nint length, StringBuilder sb, int indentLevel)
2399
/// <param name="tensor">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2401
public static bool TryBroadcastTo<T>(in this
ReadOnlyTensorSpan
<T> tensor, in TensorSpan<T> destination)
2490
/// <param name="tensor">The <see cref="
ReadOnlyTensorSpan
{T}"/> to add a dimension of length 1.</param>
2492
public static
ReadOnlyTensorSpan
<T> Unsqueeze<T>(this scoped in
ReadOnlyTensorSpan
<T> tensor, int dimension)
2518
ReadOnlyTensorSpan
<T> output = new ReadOnlyTensorSpan<T>(ref tensor._reference, tensor._shape.LinearLength, newLengths, newStrides, tensor.IsPinned);
2530
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the abs of.</param>
2531
public static Tensor<T> Abs<T>(in
ReadOnlyTensorSpan
<T> x)
2540
/// Takes the absolute value of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2544
public static ref readonly TensorSpan<T> Abs<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2557
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2558
public static Tensor<T> Acos<T>(in
ReadOnlyTensorSpan
<T> x)
2571
public static ref readonly TensorSpan<T> Acos<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2582
/// 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.
2584
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2585
public static Tensor<T> Acosh<T>(in
ReadOnlyTensorSpan
<T> x)
2598
public static ref readonly TensorSpan<T> Acosh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2611
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2612
public static Tensor<T> AcosPi<T>(in
ReadOnlyTensorSpan
<T> x)
2623
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2625
public static ref readonly TensorSpan<T> AcosPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2636
/// Takes the inverse sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2638
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2639
public static Tensor<T> Asin<T>(in
ReadOnlyTensorSpan
<T> x)
2648
/// Takes the inverse sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2650
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2652
public static ref readonly TensorSpan<T> Asin<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2663
/// 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.
2665
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2666
public static Tensor<T> Asinh<T>(in
ReadOnlyTensorSpan
<T> x)
2675
/// 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.
2677
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2679
public static ref readonly TensorSpan<T> Asinh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2690
/// 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.
2692
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2693
public static Tensor<T> AsinPi<T>(in
ReadOnlyTensorSpan
<T> x)
2702
/// 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.
2704
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
2706
public static ref readonly TensorSpan<T> AsinPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2717
/// Takes the arc tangent of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2719
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
2720
public static Tensor<T> Atan<T>(in
ReadOnlyTensorSpan
<T> x)
2729
/// Takes the arc tangent of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2731
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
2733
public static ref readonly TensorSpan<T> Atan<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2744
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2746
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2747
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2748
public static Tensor<T> Atan2<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2757
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2759
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2760
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2762
public static ref readonly TensorSpan<T> Atan2<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
2771
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2773
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2774
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2775
public static Tensor<T> Atan2<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2784
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2786
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2787
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2789
public static ref readonly TensorSpan<T> Atan2<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
2798
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2800
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2801
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2802
public static Tensor<T> Atan2<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2811
/// Takes the arc tangent of the two input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2813
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2814
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2816
public static ref readonly TensorSpan<T> Atan2<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
2827
/// 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.
2829
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2830
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2831
public static Tensor<T> Atan2Pi<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
2840
/// 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.
2842
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2843
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2845
public static ref readonly TensorSpan<T> Atan2Pi<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
2854
/// 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.
2856
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2857
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2858
public static Tensor<T> Atan2Pi<T>(in
ReadOnlyTensorSpan
<T> x, T y)
2867
/// 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.
2869
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2870
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2872
public static ref readonly TensorSpan<T> Atan2Pi<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
2881
/// 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.
2883
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2884
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2885
public static Tensor<T> Atan2Pi<T>(T x, in
ReadOnlyTensorSpan
<T> y)
2894
/// 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.
2896
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2897
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2899
public static ref readonly TensorSpan<T> Atan2Pi<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
2910
/// 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.
2912
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2913
public static Tensor<T> Atanh<T>(in
ReadOnlyTensorSpan
<T> x)
2922
/// 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.
2924
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2926
public static ref readonly TensorSpan<T> Atanh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2937
/// 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.
2939
/// <param name="x">The input<see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2940
public static Tensor<T> AtanPi<T>(in
ReadOnlyTensorSpan
<T> x)
2949
/// 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.
2951
/// <param name="x">The input<see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2953
public static ref readonly TensorSpan<T> AtanPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
2968
public static T Average<T>(scoped in
ReadOnlyTensorSpan
<T> x)
2981
/// Computes the element-wise cube root of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
2983
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2984
public static Tensor<T> Cbrt<T>(in
ReadOnlyTensorSpan
<T> x)
2993
/// Computes the element-wise cube root of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
2995
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
2997
public static ref readonly TensorSpan<T> Cbrt<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3008
/// Computes the element-wise ceiling of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3010
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3011
public static Tensor<T> Ceiling<T>(in
ReadOnlyTensorSpan
<T> x)
3020
/// Computes the element-wise ceiling of the input <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3022
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3024
public static ref readonly TensorSpan<T> Ceiling<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3035
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
3038
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3039
public static Tensor<TTo> ConvertChecked<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
3054
public static ref readonly TensorSpan<TTo> ConvertChecked<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
3066
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
3069
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3070
public static Tensor<TTo> ConvertSaturating<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
3085
public static ref readonly TensorSpan<TTo> ConvertSaturating<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
3097
/// Copies <paramref name="source"/> to a new <see cref="
ReadOnlyTensorSpan
{TTO}"/> converting each <typeparamref name="TFrom"/>
3100
/// <param name="source">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3101
public static Tensor<TTo> ConvertTruncating<TFrom, TTo>(in
ReadOnlyTensorSpan
<TFrom> source)
3116
public static ref readonly TensorSpan<TTo> ConvertTruncating<TFrom, TTo>(scoped in
ReadOnlyTensorSpan
<TFrom> source, in TensorSpan<TTo> destination)
3130
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3132
public static Tensor<T> CopySign<T>(in
ReadOnlyTensorSpan
<T> x, T sign)
3143
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3144
/// <param name="sign">The <see cref="
ReadOnlyTensorSpan
{T}"/> with the associated signs.</param>
3145
public static Tensor<T> CopySign<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> sign)
3156
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3159
public static ref readonly TensorSpan<T> CopySign<T>(scoped in
ReadOnlyTensorSpan
<T> x, T sign, in TensorSpan<T> destination)
3170
/// <param name="x">Input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3171
/// <param name="sign">The <see cref="
ReadOnlyTensorSpan
{T}"/> with the associated signs.</param>
3173
public static ref readonly TensorSpan<T> CopySign<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> sign, in TensorSpan<T> destination)
3184
/// Takes the cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3186
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
3187
public static Tensor<T> Cos<T>(in
ReadOnlyTensorSpan
<T> x)
3196
/// Takes the cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3198
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
3200
public static ref readonly TensorSpan<T> Cos<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3211
/// Takes the hyperbolic cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3213
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
3214
public static Tensor<T> Cosh<T>(in
ReadOnlyTensorSpan
<T> x)
3223
/// Takes the hyperbolic cosine of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3225
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the cosine of.</param>
3227
public static ref readonly TensorSpan<T> Cosh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3240
/// <param name="x">The first <see cref="
ReadOnlyTensorSpan
{T}"/></param>
3241
/// <param name="y">The second <see cref="
ReadOnlyTensorSpan
{T}"/></param>
3242
public static T CosineSimilarity<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3254
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
3267
public static Tensor<T> CosPi<T>(in
ReadOnlyTensorSpan
<T> x)
3276
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
3290
public static ref readonly TensorSpan<T> CosPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3303
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3304
public static Tensor<T> DegreesToRadians<T>(in
ReadOnlyTensorSpan
<T> x)
3315
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3317
public static ref readonly TensorSpan<T> DegreesToRadians<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3330
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3331
/// <param name="y">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3332
public static T Distance<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y)
3346
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3347
/// <param name="y">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3348
public static T Dot<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3362
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3363
public static Tensor<T> Exp<T>(in
ReadOnlyTensorSpan
<T> x)
3374
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3376
public static ref readonly TensorSpan<T> Exp<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3389
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3390
public static Tensor<T> Exp10<T>(in
ReadOnlyTensorSpan
<T> x)
3401
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3403
public static ref readonly TensorSpan<T> Exp10<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3414
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3415
public static Tensor<T> Exp10M1<T>(in
ReadOnlyTensorSpan
<T> x)
3424
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3426
public static ref readonly TensorSpan<T> Exp10M1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3437
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3438
public static Tensor<T> Exp2<T>(in
ReadOnlyTensorSpan
<T> x)
3447
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3449
public static ref readonly TensorSpan<T> Exp2<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3460
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3461
public static Tensor<T> Exp2M1<T>(in
ReadOnlyTensorSpan
<T> x)
3470
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3472
public static ref readonly TensorSpan<T> Exp2M1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3483
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3484
public static Tensor<T> ExpM1<T>(in
ReadOnlyTensorSpan
<T> x)
3493
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3495
public static ref readonly TensorSpan<T> ExpM1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3506
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3507
public static Tensor<T> Floor<T>(in
ReadOnlyTensorSpan
<T> x)
3516
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3518
public static ref readonly TensorSpan<T> Floor<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3532
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3533
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3534
public static Tensor<T> Hypot<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3546
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3547
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3549
public static ref readonly TensorSpan<T> Hypot<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3561
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3562
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3563
public static Tensor<T> Ieee754Remainder<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3573
/// <param name="x">Left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3574
/// <param name="y">Right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3576
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3585
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3586
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3587
public static Tensor<T> Ieee754Remainder<T>(in
ReadOnlyTensorSpan
<T> x, T y)
3596
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3597
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3599
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
3608
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3609
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3610
public static Tensor<T> Ieee754Remainder<T>(T x, in
ReadOnlyTensorSpan
<T> y)
3619
/// <param name="x">The left <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3620
/// <param name="y">The right <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3622
public static ref readonly TensorSpan<T> Ieee754Remainder<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3633
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3634
public static Tensor<int> ILogB<T>(in
ReadOnlyTensorSpan
<T> x)
3643
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3645
public static ref readonly TensorSpan<int> ILogB<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<int> destination)
3656
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3657
public static nint IndexOfMax<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3669
private static nint IndexOfMaxFallback<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3688
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3689
public static nint IndexOfMaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3701
private static nint IndexOfMaxMagnitudeFallback<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3719
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3720
public static nint IndexOfMin<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3732
private static nint IndexOfMinFallback<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3752
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3753
public static nint IndexOfMinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3765
private static nint IndexOfMinMagnitudeFallback<T>(scoped in
ReadOnlyTensorSpan
<T> x)
3785
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3786
public static Tensor<T> LeadingZeroCount<T>(in
ReadOnlyTensorSpan
<T> x)
3797
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
3799
public static ref readonly TensorSpan<T> LeadingZeroCount<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3810
/// Takes the natural logarithm of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
3812
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
3813
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x)
3822
/// Takes the natural logarithm of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
3824
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
3826
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3837
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
3849
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
3860
public static Tensor<T> Log<T>(in
ReadOnlyTensorSpan
<T> x, T y)
3872
public static ref readonly TensorSpan<T> Log<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
3883
/// 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.
3885
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
3886
public static Tensor<T> Log10<T>(in
ReadOnlyTensorSpan
<T> x)
3895
/// 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.
3897
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
3899
public static ref readonly TensorSpan<T> Log10<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3910
/// 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.
3912
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
3913
public static Tensor<T> Log10P1<T>(in
ReadOnlyTensorSpan
<T> x)
3922
/// 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.
3924
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 10 logarithm of.</param>
3926
public static ref readonly TensorSpan<T> Log10P1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3937
/// 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.
3939
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
3940
public static Tensor<T> Log2<T>(in
ReadOnlyTensorSpan
<T> x)
3949
/// 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.
3951
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
3953
public static ref readonly TensorSpan<T> Log2<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3964
/// 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.
3966
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
3967
public static Tensor<T> Log2P1<T>(in
ReadOnlyTensorSpan
<T> x)
3976
/// 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.
3978
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the base 2 logarithm of.</param>
3980
public static ref readonly TensorSpan<T> Log2P1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
3991
/// 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.
3993
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
3994
public static Tensor<T> LogP1<T>(in
ReadOnlyTensorSpan
<T> x)
4003
/// 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.
4005
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the natural logarithm of.</param>
4007
public static ref readonly TensorSpan<T> LogP1<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4018
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4019
public static T Max<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4035
public static Tensor<T> Max<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4047
public static ref readonly TensorSpan<T> Max<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4058
public static Tensor<T> Max<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4070
public static ref readonly TensorSpan<T> Max<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4081
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4082
public static T MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4098
public static Tensor<T> MaxMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4110
public static ref readonly TensorSpan<T> MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4121
public static Tensor<T> MaxMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4133
public static ref readonly TensorSpan<T> MaxMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4144
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4145
public static T MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4161
public static Tensor<T> MaxMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4173
public static ref readonly TensorSpan<T> MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4184
public static Tensor<T> MaxMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4196
public static ref readonly TensorSpan<T> MaxMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4207
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4208
public static T MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4224
public static Tensor<T> MaxNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4236
public static ref readonly TensorSpan<T> MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4247
public static Tensor<T> MaxNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4259
public static ref readonly TensorSpan<T> MaxNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4270
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4271
public static T Min<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4287
public static Tensor<T> Min<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4299
public static ref readonly TensorSpan<T> Min<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4310
public static Tensor<T> Min<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4322
public static ref readonly TensorSpan<T> Min<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4333
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4334
public static T MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4350
public static Tensor<T> MinMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4362
public static ref readonly TensorSpan<T> MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4373
public static Tensor<T> MinMagnitude<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4385
public static ref readonly TensorSpan<T> MinMagnitude<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4396
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4397
public static T MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4413
public static Tensor<T> MinMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4425
public static ref readonly TensorSpan<T> MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4436
public static Tensor<T> MinMagnitudeNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4448
public static ref readonly TensorSpan<T> MinMagnitudeNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4459
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4460
public static T MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4476
public static Tensor<T> MinNumber<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4488
public static ref readonly TensorSpan<T> MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4499
public static Tensor<T> MinNumber<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4511
public static ref readonly TensorSpan<T> MinNumber<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4522
/// Takes the norm of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns the result.
4524
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the norm of.</param>
4525
public static T Norm<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4536
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4537
public static Tensor<T> PopCount<T>(in
ReadOnlyTensorSpan
<T> x)
4546
/// <param name="y">The <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4548
public static ref readonly TensorSpan<T> PopCount<T>(scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4559
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4560
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4561
public static Tensor<T> Pow<T>(in
ReadOnlyTensorSpan
<T> x, in
ReadOnlyTensorSpan
<T> y)
4570
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4571
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4573
public static ref readonly TensorSpan<T> Pow<T>(scoped in
ReadOnlyTensorSpan
<T> x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4582
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4584
public static Tensor<T> Pow<T>(in
ReadOnlyTensorSpan
<T> x, T y)
4593
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4594
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4596
public static ref readonly TensorSpan<T> Pow<T>(scoped in
ReadOnlyTensorSpan
<T> x, T y, in TensorSpan<T> destination)
4605
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4607
public static Tensor<T> Pow<T>(T x, in
ReadOnlyTensorSpan
<T> y)
4616
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4617
/// <param name="y">The second input <see cref="
ReadOnlyTensorSpan
{T}"/></param>
4619
public static ref readonly TensorSpan<T> Pow<T>(T x, scoped in
ReadOnlyTensorSpan
<T> y, in TensorSpan<T> destination)
4630
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4631
public static T Product<T>(scoped in
ReadOnlyTensorSpan
<T> x)
4642
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4643
public static Tensor<T> RadiansToDegrees<T>(in
ReadOnlyTensorSpan
<T> x)
4652
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4654
public static ref readonly TensorSpan<T> RadiansToDegrees<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4665
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4666
public static Tensor<T> Reciprocal<T>(in
ReadOnlyTensorSpan
<T> x)
4675
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4677
public static ref readonly TensorSpan<T> Reciprocal<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4690
public static Tensor<T> RootN<T>(in
ReadOnlyTensorSpan
<T> x, int n)
4702
public static ref readonly TensorSpan<T> RootN<T>(scoped in
ReadOnlyTensorSpan
<T> x, int n, in TensorSpan<T> destination)
4716
public static Tensor<T> RotateLeft<T>(in
ReadOnlyTensorSpan
<T> x, int rotateAmount)
4729
public static ref readonly TensorSpan<T> RotateLeft<T>(scoped in
ReadOnlyTensorSpan
<T> x, int rotateAmount, in TensorSpan<T> destination)
4743
public static Tensor<T> RotateRight<T>(in
ReadOnlyTensorSpan
<T> x, int rotateAmount)
4756
public static ref readonly TensorSpan<T> RotateRight<T>(scoped in
ReadOnlyTensorSpan
<T> x, int rotateAmount, in TensorSpan<T> destination)
4767
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4768
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x)
4777
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4779
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4788
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4791
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, int digits, MidpointRounding mode)
4800
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4804
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, int digits, MidpointRounding mode, in TensorSpan<T> destination)
4813
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4815
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, int digits)
4824
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4827
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, int digits, in TensorSpan<T> destination)
4836
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4838
public static Tensor<T> Round<T>(in
ReadOnlyTensorSpan
<T> x, MidpointRounding mode)
4847
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4850
public static ref readonly TensorSpan<T> Round<T>(scoped in
ReadOnlyTensorSpan
<T> x, MidpointRounding mode, in TensorSpan<T> destination)
4861
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4862
public static Tensor<T> Sigmoid<T>(in
ReadOnlyTensorSpan
<T> x)
4871
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
4873
public static ref readonly TensorSpan<T> Sigmoid<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4884
/// Takes the sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4886
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4887
public static Tensor<T> Sin<T>(in
ReadOnlyTensorSpan
<T> x)
4896
/// Takes the sin of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="TensorSpan{T}"/> with the result.
4898
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4900
public static ref readonly TensorSpan<T> Sin<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4911
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4912
public static Tensor<T> Sinh<T>(in
ReadOnlyTensorSpan
<T> x)
4921
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4923
public static ref readonly TensorSpan<T> Sinh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4934
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4935
public static Tensor<T> SinPi<T>(in
ReadOnlyTensorSpan
<T> x)
4944
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4946
public static ref readonly TensorSpan<T> SinPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4957
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4958
public static Tensor<T> SoftMax<T>(in
ReadOnlyTensorSpan
<T> x)
4970
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
4972
public static ref readonly TensorSpan<T> SoftMax<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
4986
/// Takes the square root of each element of the <see cref="
ReadOnlyTensorSpan
{T}"/> and returns a new <see cref="Tensor{T}"/> with the result.
4988
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the square root of.</param>
4989
public static Tensor<T> Sqrt<T>(in
ReadOnlyTensorSpan
<T> x)
5000
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the square root of.</param>
5002
public static ref readonly TensorSpan<T> Sqrt<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5017
public static T StdDev<T>(in
ReadOnlyTensorSpan
<T> x)
5034
public static T Sum<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5049
internal static T SumOfSquares<T>(scoped in
ReadOnlyTensorSpan
<T> x)
5060
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5061
public static Tensor<T> Tan<T>(in
ReadOnlyTensorSpan
<T> x)
5070
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5072
public static ref readonly TensorSpan<T> Tan<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5083
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5084
public static Tensor<T> Tanh<T>(in
ReadOnlyTensorSpan
<T> x)
5093
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5095
public static ref readonly TensorSpan<T> Tanh<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5106
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5107
public static Tensor<T> TanPi<T>(in
ReadOnlyTensorSpan
<T> x)
5116
/// <param name="x">The <see cref="
ReadOnlyTensorSpan
{T}"/> to take the sin of.</param>
5118
public static ref readonly TensorSpan<T> TanPi<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5129
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5130
public static Tensor<T> TrailingZeroCount<T>(in
ReadOnlyTensorSpan
<T> x)
5139
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5141
public static ref readonly TensorSpan<T> TrailingZeroCount<T>(scoped in
ReadOnlyTensorSpan
<T> x, in TensorSpan<T> destination)
5152
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5153
public static Tensor<T> Truncate<T>(in
ReadOnlyTensorSpan
<T> x)
5162
/// <param name="x">The input <see cref="
ReadOnlyTensorSpan
{T}"/>.</param>
5164
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)
32
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[])" />
44
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[], ReadOnlySpan{nint})" />
49
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[], ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
61
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T[], int, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
73
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(ReadOnlySpan{T})" />
81
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(ReadOnlySpan{T}, ReadOnlySpan{nint})" />
85
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(ReadOnlySpan{T}, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
93
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(Array)"/>
105
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(Array, ReadOnlySpan{int}, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
117
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T*, nint)" />
125
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T*, nint, ReadOnlySpan{nint})" />
130
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ReadOnlyTensorSpan(T*, nint, ReadOnlySpan{nint}, ReadOnlySpan{nint})" />
195
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.operator ==(in
ReadOnlyTensorSpan
{T}, in
ReadOnlyTensorSpan
{T})" />
200
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.operator !=(in
ReadOnlyTensorSpan
{T}, in
ReadOnlyTensorSpan
{T})" />
211
public static implicit operator
ReadOnlyTensorSpan
<T>(scoped in TensorSpan<T> tensor) =>
215
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan() => new ReadOnlyTensorSpan<T>(ref _reference, in _shape);
218
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<nint> startIndexes) => AsReadOnlyTensorSpan().Slice(startIndexes);
221
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NIndex> startIndexes) => AsReadOnlyTensorSpan().Slice(startIndexes);
224
public
ReadOnlyTensorSpan
<T> AsReadOnlyTensorSpan(params scoped ReadOnlySpan<NRange> ranges) => AsReadOnlyTensorSpan().Slice(ranges);
238
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.Equals(object?)" />
262
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.GetHashCode" />
328
/// <inheritdoc cref="
ReadOnlyTensorSpan
{T}.ToString()" />
331
/// <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)