17 instantiations of Tensor
System.Numerics.Tensors (17)
System\Numerics\Tensors\netcore\Tensor.cs (13)
335
=> new
Tensor
<T>(array);
340
=> new
Tensor
<T>(array, lengths, strides: []);
345
=> new
Tensor
<T>(array, lengths, strides);
350
=> new
Tensor
<T>(array, start, lengths, strides);
357
=> new
Tensor
<T>(lengths, strides: [], pinned);
362
=> new
Tensor
<T>(lengths, strides, pinned);
373
return new
Tensor
<T>(values, in shape);
1372
outTensor = new
Tensor
<T>(tensor._values, tensor._start, newLengths, newStrides);
1453
return new
Tensor
<T>(tensor._values, tensor._start, newLengths, strides);
1901
outputs[i] = new
Tensor
<T>(values, newLengths, strides: []);
1972
Tensor<T> output = new
Tensor
<T>(tensor._values, tensor._start, lengths[..rank], strides[..rank]);
2363
Tensor<T> output = new
Tensor
<T>(tensor._values, tensor._start, lengths, strides);
2444
Tensor<T> output = new
Tensor
<T>(tensor._values, tensor._start, newLengths, newStrides);
System\Numerics\Tensors\netcore\Tensor_1.cs (4)
21
public static Tensor<T> Empty { get; } =
new
();
222
return new
Tensor
<T>(
237
return new
Tensor
<T>(
252
return new
Tensor
<T>(
437 references to Tensor
System.Numerics.Tensors (437)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan_1.cs (1)
527
Tensor
<T> tmp = Tensor.CreateFromShape<T>(Lengths, IsPinned);
System\Numerics\Tensors\netcore\Tensor.cs (390)
51
/// Broadcast the data from <paramref name="source"/> to the smallest broadcastable shape compatible with <paramref name="lengthsSource"/>. Creates a new <see cref="
Tensor
{T}"/> and allocates new memory.
53
/// <param name="source">Input <see cref="
Tensor
{T}"/>.</param>
54
/// <param name="lengthsSource">Other <see cref="
Tensor
{T}"/> to make shapes broadcastable.</param>
55
public static
Tensor
<T> Broadcast<T>(scoped in ReadOnlyTensorSpan<T> source, scoped in ReadOnlyTensorSpan<T> lengthsSource)
61
/// Broadcast the data from <paramref name="source"/> to the new shape <paramref name="lengths"/>. Creates a new <see cref="
Tensor
{T}"/> and allocates new memory.
64
/// <param name="source">Input <see cref="
Tensor
{T}"/>.</param>
67
public static
Tensor
<T> Broadcast<T>(scoped in ReadOnlyTensorSpan<T> source, scoped ReadOnlySpan<nint> lengths)
70
Tensor
<T> destination = CreateFromShapeUninitialized<T>(lengths);
82
public static void BroadcastTo<T>(this
Tensor
<T> source, in TensorSpan<T> destination)
116
public static
Tensor
<T> Concatenate<T>(params scoped ReadOnlySpan<
Tensor
<T>> tensors)
126
public static
Tensor
<T> ConcatenateOnDimension<T>(int dimension, params scoped ReadOnlySpan<
Tensor
<T>> tensors)
134
Tensor
<T> tensor;
187
public static ref readonly TensorSpan<T> Concatenate<T>(scoped ReadOnlySpan<
Tensor
<T>> tensors, in TensorSpan<T> destination)
199
public static ref readonly TensorSpan<T> ConcatenateOnDimension<T>(int dimension, scoped ReadOnlySpan<
Tensor
<T>> tensors, in TensorSpan<T> destination)
279
private static void ConcatenateOnDimensionToSpan<T>(int dimension, scoped ReadOnlySpan<
Tensor
<T>> tensors, in TensorSpan<T> destination, Span<T> dstSpan)
306
Tensor
<T> slice = tensors[i].Slice(ranges);
334
public static
Tensor
<T> Create<T>(T[] array)
339
public static
Tensor
<T> Create<T>(T[] array, scoped ReadOnlySpan<nint> lengths)
344
public static
Tensor
<T> Create<T>(T[] array, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
349
public static
Tensor
<T> Create<T>(T[] array, int start, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
356
public static
Tensor
<T> CreateFromShape<T>(scoped ReadOnlySpan<nint> lengths, bool pinned = false)
361
public static
Tensor
<T> CreateFromShape<T>(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned = false)
365
public static
Tensor
<T> CreateFromShapeUninitialized<T>(scoped ReadOnlySpan<nint> lengths, bool pinned = false)
369
public static
Tensor
<T> CreateFromShapeUninitialized<T>(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned = false)
458
public static
Tensor
<bool> Equals<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
461
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<bool> destination);
489
public static
Tensor
<bool> Equals<T>(in ReadOnlyTensorSpan<T> x, T y)
492
Tensor
<bool> destination = CreateFromShapeUninitialized<bool>(x.Lengths);
578
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
592
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
607
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
612
/// <returns>A <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> and
614
public static
Tensor
<bool> GreaterThan<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
617
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<bool> destination);
625
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
631
/// <returns>A <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> and
643
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
648
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
650
public static
Tensor
<bool> GreaterThan<T>(in ReadOnlyTensorSpan<T> x, T y)
653
Tensor
<bool> destination = CreateFromShape<bool>(x.Lengths, false);
660
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
666
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
678
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
683
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
685
public static
Tensor
<bool> GreaterThan<T>(T x, in ReadOnlyTensorSpan<T> y)
690
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
696
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
788
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
793
/// <returns>A <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> and
795
public static
Tensor
<bool> GreaterThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
798
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<bool> destination);
806
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
812
/// <returns>A <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> and
824
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
829
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
831
public static
Tensor
<bool> GreaterThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, T y)
834
Tensor
<bool> destination = CreateFromShape<bool>(x.Lengths, false);
841
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
847
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
859
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
864
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
866
public static
Tensor
<bool> GreaterThanOrEqual<T>(T x, in ReadOnlyTensorSpan<T> y)
871
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
877
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
969
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
974
/// <returns>A <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> and
976
public static
Tensor
<bool> LessThan<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
979
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<bool> destination);
987
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
993
/// <returns>A <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> and
1004
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1005
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1008
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
1010
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1012
public static
Tensor
<bool> LessThan<T>(in ReadOnlyTensorSpan<T> x, T y)
1015
Tensor
<bool> destination = CreateFromShape<bool>(x.Lengths, false);
1021
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1022
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1025
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
1028
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1039
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1040
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1043
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
1045
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1047
public static
Tensor
<bool> LessThan<T>(T x, in ReadOnlyTensorSpan<T> y)
1051
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1052
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1055
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
1058
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1150
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1155
/// <returns>A <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> and
1157
public static
Tensor
<bool> LessThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
1160
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<bool> destination);
1168
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1174
/// <returns>A <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> and
1185
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1186
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1189
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
1191
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1193
public static
Tensor
<bool> LessThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, T y)
1196
Tensor
<bool> destination = CreateFromShape<bool>(x.Lengths, false);
1202
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1203
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1206
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
1209
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1220
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1221
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1224
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
1226
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1228
public static
Tensor
<bool> LessThanOrEqual<T>(T x, in ReadOnlyTensorSpan<T> y)
1232
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1233
/// It returns a <see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1236
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
1239
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1331
/// If <paramref name="tensor"/> is a 1D tensor, it will return <paramref name="tensor"/>. Otherwise it creates a new <see cref="
Tensor
{T}"/>
1334
/// <param name="tensor">Input <see cref="
Tensor
{T}"/></param>
1336
public static
Tensor
<T> PermuteDimensions<T>(this
Tensor
<T> tensor, ReadOnlySpan<int> dimensions)
1350
Tensor
<T> outTensor;
1388
/// <param name="tensor"><see cref="
Tensor
{T}"/> you want to reshape.</param>
1390
public static
Tensor
<T> Reshape<T>(this
Tensor
<T> tensor, ReadOnlySpan<nint> lengths)
1610
/// Creates a new <see cref="
Tensor
{T}"/>, allocates new memory, and copies the data from <paramref name="tensor"/>. If the final shape is smaller all data after
1613
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1615
public static
Tensor
<T> Resize<T>(
Tensor
<T> tensor, ReadOnlySpan<nint> lengths)
1619
Tensor
<T> output = Create(values, lengths, []);
1655
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1657
public static void ResizeTo<T>(scoped in
Tensor
<T> tensor, in TensorSpan<T> destination)
1715
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1716
public static
Tensor
<T> Reverse<T>(in ReadOnlyTensorSpan<T> tensor)
1718
Tensor
<T> output = CreateFromShape<T>(tensor.Lengths);
1728
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1730
public static
Tensor
<T> ReverseDimension<T>(in ReadOnlyTensorSpan<T> tensor, int dimension)
1732
Tensor
<T> output = CreateFromShape<T>(tensor.Lengths);
1839
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1842
public static
Tensor
<T> SetSlice<T>(this
Tensor
<T> tensor, in ReadOnlyTensorSpan<T> values, params ReadOnlySpan<NRange> ranges)
1851
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1870
/// Split a <see cref="
Tensor
{T}"/> into <paramref name="splitCount"/> along the given <paramref name="dimension"/>. If the tensor cannot be split
1873
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1876
public static
Tensor
<T>[] Split<T>(scoped in ReadOnlyTensorSpan<T> tensor, int splitCount, nint dimension)
1883
Tensor
<T>[] outputs = new
Tensor
<T>[splitCount];
1916
/// <param name="tensor">The <see cref="
Tensor
{T}"/> to remove all dimensions of length 1.</param>
1917
public static
Tensor
<T> Squeeze<T>(this
Tensor
<T> tensor)
1926
/// <param name="tensor">The <see cref="
Tensor
{T}"/> to remove dimension of length 1.</param>
1928
public static
Tensor
<T> SqueezeDimension<T>(this
Tensor
<T> tensor, int dimension)
1972
Tensor
<T> output = new Tensor<T>(tensor._values, tensor._start, lengths[..rank], strides[..rank]);
2117
/// Join multiple <see cref="
Tensor
{T}"/> along a new dimension that is added at position 0. All tensors must have the same shape.
2119
/// <param name="tensors">Input <see cref="
Tensor
{T}"/>.</param>
2120
public static
Tensor
<T> Stack<T>(params ReadOnlySpan<
Tensor
<T>> tensors)
2126
/// Join multiple <see cref="
Tensor
{T}"/> along a new dimension. The axis parameter specifies the index of the new dimension. All tensors must have the same shape.
2128
/// <param name="tensors">Input <see cref="
Tensor
{T}"/>.</param>
2130
public static
Tensor
<T> StackAlongDimension<T>(int dimension, params ReadOnlySpan<
Tensor
<T>> tensors)
2146
Tensor
<T>[] outputs = new
Tensor
<T>[tensors.Length];
2155
/// Join multiple <see cref="
Tensor
{T}"/> along a new dimension that is added at position 0. All tensors must have the same shape.
2157
/// <param name="tensors">Input <see cref="
Tensor
{T}"/>.</param>
2159
public static ref readonly TensorSpan<T> Stack<T>(scoped in ReadOnlySpan<
Tensor
<T>> tensors, in TensorSpan<T> destination)
2165
/// Join multiple <see cref="
Tensor
{T}"/> along a new dimension. The axis parameter specifies the index of the new dimension. All tensors must have the same shape.
2167
/// <param name="tensors">Input <see cref="
Tensor
{T}"/>.</param>
2170
public static ref readonly TensorSpan<T> StackAlongDimension<T>(scoped ReadOnlySpan<
Tensor
<T>> tensors, in TensorSpan<T> destination, int dimension)
2186
Tensor
<T>[] outputs = new
Tensor
<T>[tensors.Length];
2343
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
2344
public static
Tensor
<T> Transpose<T>(
Tensor
<T> tensor)
2363
Tensor
<T> output = new Tensor<T>(tensor._values, tensor._start, lengths, strides);
2377
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
2379
public static bool TryBroadcastTo<T>(this
Tensor
<T> tensor, in TensorSpan<T> destination)
2416
/// <param name="tensor">The <see cref="
Tensor
{T}"/> to add a dimension of length 1.</param>
2418
public static
Tensor
<T> Unsqueeze<T>(this
Tensor
<T> tensor, int dimension)
2444
Tensor
<T> output = new Tensor<T>(tensor._values, tensor._start, newLengths, newStrides);
2528
/// Takes the absolute value of each element of the <see cref="
Tensor
{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2531
public static
Tensor
<T> Abs<T>(in ReadOnlyTensorSpan<T> x)
2534
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2555
/// Takes the inverse cosine of each element of the <see cref="
Tensor
{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2558
public static
Tensor
<T> Acos<T>(in ReadOnlyTensorSpan<T> x)
2561
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2567
/// Takes the inverse cosine of each element of the <see cref="
Tensor
{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
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.
2585
public static
Tensor
<T> Acosh<T>(in ReadOnlyTensorSpan<T> x)
2588
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2609
/// Takes the inverse hyperbolic cosine divided by pi of each element of the <see cref="
Tensor
{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2612
public static
Tensor
<T> AcosPi<T>(in ReadOnlyTensorSpan<T> x)
2615
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
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.
2639
public static
Tensor
<T> Asin<T>(in ReadOnlyTensorSpan<T> x)
2642
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
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.
2666
public static
Tensor
<T> Asinh<T>(in ReadOnlyTensorSpan<T> x)
2669
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
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.
2693
public static
Tensor
<T> AsinPi<T>(in ReadOnlyTensorSpan<T> x)
2696
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
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.
2720
public static
Tensor
<T> Atan<T>(in ReadOnlyTensorSpan<T> x)
2723
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2744
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2748
public static
Tensor
<T> Atan2<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
2751
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2771
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2775
public static
Tensor
<T> Atan2<T>(in ReadOnlyTensorSpan<T> x, T y)
2778
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2798
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2802
public static
Tensor
<T> Atan2<T>(T x, in ReadOnlyTensorSpan<T> y)
2805
Tensor
<T> destination = CreateFromShapeUninitialized<T>(y.Lengths);
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.
2831
public static
Tensor
<T> Atan2Pi<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
2834
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2858
public static
Tensor
<T> Atan2Pi<T>(in ReadOnlyTensorSpan<T> x, T y)
2861
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2885
public static
Tensor
<T> Atan2Pi<T>(T x, in ReadOnlyTensorSpan<T> y)
2888
Tensor
<T> destination = CreateFromShapeUninitialized<T>(y.Lengths);
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.
2913
public static
Tensor
<T> Atanh<T>(in ReadOnlyTensorSpan<T> x)
2916
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
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.
2940
public static
Tensor
<T> AtanPi<T>(in ReadOnlyTensorSpan<T> x)
2943
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
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.
2984
public static
Tensor
<T> Cbrt<T>(in ReadOnlyTensorSpan<T> x)
2987
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3008
/// Computes the element-wise ceiling of the input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
3011
public static
Tensor
<T> Ceiling<T>(in ReadOnlyTensorSpan<T> x)
3014
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3039
public static
Tensor
<TTo> ConvertChecked<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source)
3043
Tensor
<TTo> destination = CreateFromShapeUninitialized<TTo>(source.Lengths);
3070
public static
Tensor
<TTo> ConvertSaturating<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source)
3074
Tensor
<TTo> destination = CreateFromShapeUninitialized<TTo>(source.Lengths);
3101
public static
Tensor
<TTo> ConvertTruncating<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source)
3105
Tensor
<TTo> destination = CreateFromShapeUninitialized<TTo>(source.Lengths);
3132
public static
Tensor
<T> CopySign<T>(in ReadOnlyTensorSpan<T> x, T sign)
3135
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3141
/// Computes the element-wise result of copying the sign from one number to another number in the specified tensors and returns a new <see cref="
Tensor
{T}"/> with the result.
3145
public static
Tensor
<T> CopySign<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> sign)
3148
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3184
/// Takes the cosine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
3187
public static
Tensor
<T> Cos<T>(in ReadOnlyTensorSpan<T> x)
3190
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
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.
3214
public static
Tensor
<T> Cosh<T>(in ReadOnlyTensorSpan<T> x)
3217
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3253
/// <summary>Computes the element-wise cosine of the value in the specified tensor that has been multiplied by Pi and returns a new <see cref="
Tensor
{T}"/> with the results.</summary>
3267
public static
Tensor
<T> CosPi<T>(in ReadOnlyTensorSpan<T> x)
3270
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3304
public static
Tensor
<T> DegreesToRadians<T>(in ReadOnlyTensorSpan<T> x)
3307
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3363
public static
Tensor
<T> Exp<T>(in ReadOnlyTensorSpan<T> x)
3366
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3390
public static
Tensor
<T> Exp10<T>(in ReadOnlyTensorSpan<T> x)
3393
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3415
public static
Tensor
<T> Exp10M1<T>(in ReadOnlyTensorSpan<T> x)
3418
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3438
public static
Tensor
<T> Exp2<T>(in ReadOnlyTensorSpan<T> x)
3441
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3461
public static
Tensor
<T> Exp2M1<T>(in ReadOnlyTensorSpan<T> x)
3464
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3484
public static
Tensor
<T> ExpM1<T>(in ReadOnlyTensorSpan<T> x)
3487
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3507
public static
Tensor
<T> Floor<T>(in ReadOnlyTensorSpan<T> x)
3510
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3534
public static
Tensor
<T> Hypot<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
3537
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<T> destination);
3563
public static
Tensor
<T> Ieee754Remainder<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
3566
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<T> destination);
3587
public static
Tensor
<T> Ieee754Remainder<T>(in ReadOnlyTensorSpan<T> x, T y)
3590
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3610
public static
Tensor
<T> Ieee754Remainder<T>(T x, in ReadOnlyTensorSpan<T> y)
3613
Tensor
<T> destination = CreateFromShapeUninitialized<T>(y.Lengths);
3634
public static
Tensor
<int> ILogB<T>(in ReadOnlyTensorSpan<T> x)
3637
Tensor
<int> destination = CreateFromShapeUninitialized<int>(x.Lengths);
3786
public static
Tensor
<T> LeadingZeroCount<T>(in ReadOnlyTensorSpan<T> x)
3789
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
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.
3813
public static
Tensor
<T> Log<T>(in ReadOnlyTensorSpan<T> x)
3816
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3837
public static
Tensor
<T> Log<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
3840
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<T> destination);
3860
public static
Tensor
<T> Log<T>(in ReadOnlyTensorSpan<T> x, T y)
3863
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
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.
3886
public static
Tensor
<T> Log10<T>(in ReadOnlyTensorSpan<T> x)
3889
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
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.
3913
public static
Tensor
<T> Log10P1<T>(in ReadOnlyTensorSpan<T> x)
3916
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
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.
3940
public static
Tensor
<T> Log2<T>(in ReadOnlyTensorSpan<T> x)
3943
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
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.
3967
public static
Tensor
<T> Log2P1<T>(in ReadOnlyTensorSpan<T> x)
3970
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
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.
3994
public static
Tensor
<T> LogP1<T>(in ReadOnlyTensorSpan<T> x)
3997
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4035
public static
Tensor
<T> Max<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4038
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> output);
4058
public static
Tensor
<T> Max<T>(in ReadOnlyTensorSpan<T> x, T y)
4061
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4098
public static
Tensor
<T> MaxMagnitude<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4101
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
4121
public static
Tensor
<T> MaxMagnitude<T>(in ReadOnlyTensorSpan<T> x, T y)
4124
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4161
public static
Tensor
<T> MaxMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4164
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
4184
public static
Tensor
<T> MaxMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, T y)
4187
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4224
public static
Tensor
<T> MaxNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4227
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
4247
public static
Tensor
<T> MaxNumber<T>(in ReadOnlyTensorSpan<T> x, T y)
4250
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4287
public static
Tensor
<T> Min<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4290
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> output);
4310
public static
Tensor
<T> Min<T>(in ReadOnlyTensorSpan<T> x, T y)
4313
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4350
public static
Tensor
<T> MinMagnitude<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4353
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
4373
public static
Tensor
<T> MinMagnitude<T>(in ReadOnlyTensorSpan<T> x, T y)
4376
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4413
public static
Tensor
<T> MinMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4416
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
4436
public static
Tensor
<T> MinMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, T y)
4439
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4476
public static
Tensor
<T> MinNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4479
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
4499
public static
Tensor
<T> MinNumber<T>(in ReadOnlyTensorSpan<T> x, T y)
4502
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4537
public static
Tensor
<T> PopCount<T>(in ReadOnlyTensorSpan<T> x)
4540
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4561
public static
Tensor
<T> Pow<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4564
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<T> destination);
4584
public static
Tensor
<T> Pow<T>(in ReadOnlyTensorSpan<T> x, T y)
4587
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4607
public static
Tensor
<T> Pow<T>(T x, in ReadOnlyTensorSpan<T> y)
4610
Tensor
<T> destination = CreateFromShapeUninitialized<T>(y.Lengths);
4643
public static
Tensor
<T> RadiansToDegrees<T>(in ReadOnlyTensorSpan<T> x)
4646
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4666
public static
Tensor
<T> Reciprocal<T>(in ReadOnlyTensorSpan<T> x)
4669
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4690
public static
Tensor
<T> RootN<T>(in ReadOnlyTensorSpan<T> x, int n)
4693
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4716
public static
Tensor
<T> RotateLeft<T>(in ReadOnlyTensorSpan<T> x, int rotateAmount)
4719
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4743
public static
Tensor
<T> RotateRight<T>(in ReadOnlyTensorSpan<T> x, int rotateAmount)
4746
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4768
public static
Tensor
<T> Round<T>(in ReadOnlyTensorSpan<T> x)
4771
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4791
public static
Tensor
<T> Round<T>(in ReadOnlyTensorSpan<T> x, int digits, MidpointRounding mode)
4794
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4815
public static
Tensor
<T> Round<T>(in ReadOnlyTensorSpan<T> x, int digits)
4818
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4838
public static
Tensor
<T> Round<T>(in ReadOnlyTensorSpan<T> x, MidpointRounding mode)
4841
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4862
public static
Tensor
<T> Sigmoid<T>(in ReadOnlyTensorSpan<T> x)
4865
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4884
/// Takes the sin of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
4887
public static
Tensor
<T> Sin<T>(in ReadOnlyTensorSpan<T> x)
4890
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4912
public static
Tensor
<T> Sinh<T>(in ReadOnlyTensorSpan<T> x)
4915
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4935
public static
Tensor
<T> SinPi<T>(in ReadOnlyTensorSpan<T> x)
4938
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4958
public static
Tensor
<T> SoftMax<T>(in ReadOnlyTensorSpan<T> x)
4964
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
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.
4989
public static
Tensor
<T> Sqrt<T>(in ReadOnlyTensorSpan<T> x)
4992
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
5061
public static
Tensor
<T> Tan<T>(in ReadOnlyTensorSpan<T> x)
5064
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
5084
public static
Tensor
<T> Tanh<T>(in ReadOnlyTensorSpan<T> x)
5087
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
5107
public static
Tensor
<T> TanPi<T>(in ReadOnlyTensorSpan<T> x)
5110
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
5130
public static
Tensor
<T> TrailingZeroCount<T>(in ReadOnlyTensorSpan<T> x)
5133
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
5153
public static
Tensor
<T> Truncate<T>(in ReadOnlyTensorSpan<T> x)
5156
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
System\Numerics\Tensors\netcore\Tensor.op_OnesComplement.cs (7)
12
public static
Tensor
<T> OnesComplement<T>(in ReadOnlyTensorSpan<T> x)
15
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
41
public static
Tensor
<TScalar> operator ~(in ReadOnlyTensorSpan<TScalar> tensor) => OnesComplement(tensor);
45
extension<TScalar>(
Tensor
<TScalar>)
49
public static
Tensor
<TScalar> operator ~(
Tensor
<TScalar> tensor) => OnesComplement<TScalar>(tensor);
57
public static
Tensor
<TScalar> operator ~(in TensorSpan<TScalar> tensor) => OnesComplement<TScalar>(tensor);
System\Numerics\Tensors\netcore\Tensor.op_UnaryNegation.cs (7)
11
public static
Tensor
<T> Negate<T>(in ReadOnlyTensorSpan<T> x)
14
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
39
public static
Tensor
<TScalar> operator -(in ReadOnlyTensorSpan<TScalar> tensor) => Negate(tensor);
43
extension<TScalar>(
Tensor
<TScalar>)
47
public static
Tensor
<TScalar> operator -(
Tensor
<TScalar> tensor) => Negate<TScalar>(tensor);
55
public static
Tensor
<TScalar> operator -(in TensorSpan<TScalar> tensor) => Negate<TScalar>(tensor);
System\Numerics\Tensors\netcore\Tensor.op_UnaryPlus.cs (3)
19
extension<TScalar>(
Tensor
<TScalar>)
23
public static
Tensor
<TScalar> operator +(
Tensor
<TScalar> tensor) => tensor;
System\Numerics\Tensors\netcore\Tensor_1.cs (27)
18
public sealed class Tensor<T> : ITensor<
Tensor
<T>, T>, IEnumerable<T>
21
public static
Tensor
<T> Empty { get; } = new();
93
public
Tensor
<T> this[params ReadOnlySpan<NRange> ranges]
126
public static implicit operator
Tensor
<T>(T[] array) => Tensor.Create(array);
131
public static implicit operator TensorSpan<T>(
Tensor
<T> tensor) => tensor.AsTensorSpan();
134
public static implicit operator ReadOnlyTensorSpan<T>(
Tensor
<T> tensor) => tensor.AsReadOnlyTensorSpan();
215
public
Tensor
<T> Slice(params ReadOnlySpan<nint> startIndexes)
230
public
Tensor
<T> Slice(params ReadOnlySpan<NIndex> startIndexes)
245
public
Tensor
<T> Slice(params ReadOnlySpan<NRange> ranges)
260
public
Tensor
<T> ToDenseTensor()
262
Tensor
<T> result = this;
321
ref readonly T IReadOnlyTensor<
Tensor
<T>, T>.this[params ReadOnlySpan<nint> indexes] => ref this[indexes];
323
ref readonly T IReadOnlyTensor<
Tensor
<T>, T>.this[params ReadOnlySpan<NIndex> indexes] => ref this[indexes];
325
ReadOnlyTensorDimensionSpan<T> IReadOnlyTensor<
Tensor
<T>, T>.GetDimensionSpan(int dimension) => AsReadOnlyTensorSpan().GetDimensionSpan(dimension);
327
ref readonly T IReadOnlyTensor<
Tensor
<T>, T>.GetPinnableReference() => ref GetPinnableReference();
329
ReadOnlySpan<T> IReadOnlyTensor<
Tensor
<T>, T>.GetSpan(scoped ReadOnlySpan<nint> startIndexes, int length) => AsReadOnlyTensorSpan().GetSpan(startIndexes, length);
331
ReadOnlySpan<T> IReadOnlyTensor<
Tensor
<T>, T>.GetSpan(scoped ReadOnlySpan<NIndex> startIndexes, int length) => AsReadOnlyTensorSpan().GetSpan(startIndexes, length);
365
static
Tensor
<T> ITensor<
Tensor
<T>, T>.CreateFromShape(scoped ReadOnlySpan<nint> lengths, bool pinned) => Tensor.CreateFromShape<T>(lengths, pinned);
367
static
Tensor
<T> ITensor<
Tensor
<T>, T>.CreateFromShape(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned) => Tensor.CreateFromShape<T>(lengths, strides, pinned);
369
static
Tensor
<T> ITensor<
Tensor
<T>, T>.CreateFromShapeUninitialized(scoped ReadOnlySpan<nint> lengths, bool pinned) => Tensor.CreateFromShapeUninitialized<T>(lengths, pinned);
371
static
Tensor
<T> ITensor<
Tensor
<T>, T>.CreateFromShapeUninitialized(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned) => Tensor.CreateFromShapeUninitialized<T>(lengths, strides, pinned);
376
private readonly
Tensor
<T> _tensor;
381
internal Enumerator(
Tensor
<T> tensor)
System\Numerics\Tensors\netcore\TensorOperation.cs (1)
359
public static void ValidateCompatibility<TArg, TResult>(in ReadOnlyTensorSpan<TArg> x, in ReadOnlyTensorSpan<TArg> y, out
Tensor
<TResult> destination)
System\Runtime\InteropServices\TensorMarshal.cs (1)
9
/// <summary>Provides methods to interoperate with <see cref="
Tensor
{T}" />, <see cref="TensorSpan{T}" />, and <see cref="ReadOnlyTensorSpan{T}" />.</summary>