17 instantiations of Tensor
System.Numerics.Tensors (17)
System\Numerics\Tensors\netcore\Tensor.cs (13)
322
=> new
Tensor
<T>(array);
327
=> new
Tensor
<T>(array, lengths, strides: []);
332
=> new
Tensor
<T>(array, lengths, strides);
337
=> new
Tensor
<T>(array, start, lengths, strides);
344
=> new
Tensor
<T>(lengths, strides: [], pinned);
349
=> new
Tensor
<T>(lengths, strides, pinned);
360
return new
Tensor
<T>(values, in shape);
1359
outTensor = new
Tensor
<T>(tensor._values, tensor._start, newLengths, newStrides);
1440
return new
Tensor
<T>(tensor._values, tensor._start, newLengths, strides);
1888
outputs[i] = new
Tensor
<T>(values, newLengths, strides: []);
1959
Tensor<T> output = new
Tensor
<T>(tensor._values, tensor._start, lengths[..rank], strides[..rank]);
2350
Tensor<T> output = new
Tensor
<T>(tensor._values, tensor._start, lengths, strides);
2431
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);
321
public static
Tensor
<T> Create<T>(T[] array)
326
public static
Tensor
<T> Create<T>(T[] array, scoped ReadOnlySpan<nint> lengths)
331
public static
Tensor
<T> Create<T>(T[] array, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
336
public static
Tensor
<T> Create<T>(T[] array, int start, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
343
public static
Tensor
<T> CreateFromShape<T>(scoped ReadOnlySpan<nint> lengths, bool pinned = false)
348
public static
Tensor
<T> CreateFromShape<T>(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned = false)
352
public static
Tensor
<T> CreateFromShapeUninitialized<T>(scoped ReadOnlySpan<nint> lengths, bool pinned = false)
356
public static
Tensor
<T> CreateFromShapeUninitialized<T>(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned = false)
445
public static
Tensor
<bool> Equals<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
448
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<bool> destination);
476
public static
Tensor
<bool> Equals<T>(in ReadOnlyTensorSpan<T> x, T y)
479
Tensor
<bool> destination = CreateFromShapeUninitialized<bool>(x.Lengths);
565
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
579
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
594
/// 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"/>
599
/// <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
601
public static
Tensor
<bool> GreaterThan<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
604
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<bool> destination);
612
/// 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"/>
618
/// <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
630
/// 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"/>
635
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
637
public static
Tensor
<bool> GreaterThan<T>(in ReadOnlyTensorSpan<T> x, T y)
640
Tensor
<bool> destination = CreateFromShape<bool>(x.Lengths, false);
647
/// 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"/>
653
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
665
/// 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"/>
670
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
672
public static
Tensor
<bool> GreaterThan<T>(T x, in ReadOnlyTensorSpan<T> y)
677
/// 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"/>
775
/// 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"/>
780
/// <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
782
public static
Tensor
<bool> GreaterThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
785
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<bool> destination);
793
/// 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"/>
799
/// <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
811
/// 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"/>
816
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
818
public static
Tensor
<bool> GreaterThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, T y)
821
Tensor
<bool> destination = CreateFromShape<bool>(x.Lengths, false);
828
/// 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"/>
834
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
846
/// 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"/>
851
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
853
public static
Tensor
<bool> GreaterThanOrEqual<T>(T x, in ReadOnlyTensorSpan<T> y)
858
/// 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"/>
956
/// 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"/>
961
/// <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
963
public static
Tensor
<bool> LessThan<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
966
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<bool> destination);
974
/// 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"/>
980
/// <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
991
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
992
/// 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"/>
995
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
997
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
999
public static
Tensor
<bool> LessThan<T>(in ReadOnlyTensorSpan<T> x, T y)
1002
Tensor
<bool> destination = CreateFromShape<bool>(x.Lengths, false);
1008
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1009
/// 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"/>
1012
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
1015
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1026
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1027
/// 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"/>
1030
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
1032
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1034
public static
Tensor
<bool> LessThan<T>(T x, in ReadOnlyTensorSpan<T> y)
1038
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1039
/// 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"/>
1042
/// <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"/>
1137
/// 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"/>
1142
/// <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
1144
public static
Tensor
<bool> LessThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
1147
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<bool> destination);
1155
/// 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"/>
1161
/// <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
1172
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1173
/// 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"/>
1176
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
1178
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1180
public static
Tensor
<bool> LessThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, T y)
1183
Tensor
<bool> destination = CreateFromShape<bool>(x.Lengths, false);
1189
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1190
/// 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"/>
1193
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
1196
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1207
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1208
/// 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"/>
1211
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
1213
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1215
public static
Tensor
<bool> LessThanOrEqual<T>(T x, in ReadOnlyTensorSpan<T> y)
1219
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1220
/// 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"/>
1223
/// <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"/>
1318
/// If <paramref name="tensor"/> is a 1D tensor, it will return <paramref name="tensor"/>. Otherwise it creates a new <see cref="
Tensor
{T}"/>
1321
/// <param name="tensor">Input <see cref="
Tensor
{T}"/></param>
1323
public static
Tensor
<T> PermuteDimensions<T>(this
Tensor
<T> tensor, ReadOnlySpan<int> dimensions)
1337
Tensor
<T> outTensor;
1375
/// <param name="tensor"><see cref="
Tensor
{T}"/> you want to reshape.</param>
1377
public static
Tensor
<T> Reshape<T>(this
Tensor
<T> tensor, ReadOnlySpan<nint> lengths)
1597
/// 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
1600
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1602
public static
Tensor
<T> Resize<T>(
Tensor
<T> tensor, ReadOnlySpan<nint> lengths)
1606
Tensor
<T> output = Create(values, lengths, []);
1642
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1644
public static void ResizeTo<T>(scoped in
Tensor
<T> tensor, in TensorSpan<T> destination)
1702
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1703
public static
Tensor
<T> Reverse<T>(in ReadOnlyTensorSpan<T> tensor)
1705
Tensor
<T> output = CreateFromShape<T>(tensor.Lengths);
1715
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1717
public static
Tensor
<T> ReverseDimension<T>(in ReadOnlyTensorSpan<T> tensor, int dimension)
1719
Tensor
<T> output = CreateFromShape<T>(tensor.Lengths);
1826
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1829
public static
Tensor
<T> SetSlice<T>(this
Tensor
<T> tensor, in ReadOnlyTensorSpan<T> values, params ReadOnlySpan<NRange> ranges)
1838
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1857
/// Split a <see cref="
Tensor
{T}"/> into <paramref name="splitCount"/> along the given <paramref name="dimension"/>. If the tensor cannot be split
1860
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1863
public static
Tensor
<T>[] Split<T>(scoped in ReadOnlyTensorSpan<T> tensor, int splitCount, nint dimension)
1870
Tensor
<T>[] outputs = new
Tensor
<T>[splitCount];
1903
/// <param name="tensor">The <see cref="
Tensor
{T}"/> to remove all dimensions of length 1.</param>
1904
public static
Tensor
<T> Squeeze<T>(this
Tensor
<T> tensor)
1913
/// <param name="tensor">The <see cref="
Tensor
{T}"/> to remove dimension of length 1.</param>
1915
public static
Tensor
<T> SqueezeDimension<T>(this
Tensor
<T> tensor, int dimension)
1959
Tensor
<T> output = new Tensor<T>(tensor._values, tensor._start, lengths[..rank], strides[..rank]);
2104
/// Join multiple <see cref="
Tensor
{T}"/> along a new dimension that is added at position 0. All tensors must have the same shape.
2106
/// <param name="tensors">Input <see cref="
Tensor
{T}"/>.</param>
2107
public static
Tensor
<T> Stack<T>(params ReadOnlySpan<
Tensor
<T>> tensors)
2113
/// 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.
2115
/// <param name="tensors">Input <see cref="
Tensor
{T}"/>.</param>
2117
public static
Tensor
<T> StackAlongDimension<T>(int dimension, params ReadOnlySpan<
Tensor
<T>> tensors)
2133
Tensor
<T>[] outputs = new
Tensor
<T>[tensors.Length];
2142
/// Join multiple <see cref="
Tensor
{T}"/> along a new dimension that is added at position 0. All tensors must have the same shape.
2144
/// <param name="tensors">Input <see cref="
Tensor
{T}"/>.</param>
2146
public static ref readonly TensorSpan<T> Stack<T>(scoped in ReadOnlySpan<
Tensor
<T>> tensors, in TensorSpan<T> destination)
2152
/// 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.
2154
/// <param name="tensors">Input <see cref="
Tensor
{T}"/>.</param>
2157
public static ref readonly TensorSpan<T> StackAlongDimension<T>(scoped ReadOnlySpan<
Tensor
<T>> tensors, in TensorSpan<T> destination, int dimension)
2173
Tensor
<T>[] outputs = new
Tensor
<T>[tensors.Length];
2330
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
2331
public static
Tensor
<T> Transpose<T>(
Tensor
<T> tensor)
2350
Tensor
<T> output = new Tensor<T>(tensor._values, tensor._start, lengths, strides);
2364
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
2366
public static bool TryBroadcastTo<T>(this
Tensor
<T> tensor, in TensorSpan<T> destination)
2403
/// <param name="tensor">The <see cref="
Tensor
{T}"/> to add a dimension of length 1.</param>
2405
public static
Tensor
<T> Unsqueeze<T>(this
Tensor
<T> tensor, int dimension)
2431
Tensor
<T> output = new Tensor<T>(tensor._values, tensor._start, newLengths, newStrides);
2515
/// Takes the absolute value of each element of the <see cref="
Tensor
{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2518
public static
Tensor
<T> Abs<T>(in ReadOnlyTensorSpan<T> x)
2521
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2542
/// Takes the inverse cosine of each element of the <see cref="
Tensor
{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2545
public static
Tensor
<T> Acos<T>(in ReadOnlyTensorSpan<T> x)
2548
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2554
/// Takes the inverse cosine of each element of the <see cref="
Tensor
{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2569
/// 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.
2572
public static
Tensor
<T> Acosh<T>(in ReadOnlyTensorSpan<T> x)
2575
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2596
/// 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.
2599
public static
Tensor
<T> AcosPi<T>(in ReadOnlyTensorSpan<T> x)
2602
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2623
/// Takes the inverse sin of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2626
public static
Tensor
<T> Asin<T>(in ReadOnlyTensorSpan<T> x)
2629
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2650
/// 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.
2653
public static
Tensor
<T> Asinh<T>(in ReadOnlyTensorSpan<T> x)
2656
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2677
/// 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.
2680
public static
Tensor
<T> AsinPi<T>(in ReadOnlyTensorSpan<T> x)
2683
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2704
/// Takes the arc tangent of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2707
public static
Tensor
<T> Atan<T>(in ReadOnlyTensorSpan<T> x)
2710
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2731
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2735
public static
Tensor
<T> Atan2<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
2738
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2758
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2762
public static
Tensor
<T> Atan2<T>(in ReadOnlyTensorSpan<T> x, T y)
2765
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2785
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2789
public static
Tensor
<T> Atan2<T>(T x, in ReadOnlyTensorSpan<T> y)
2792
Tensor
<T> destination = CreateFromShapeUninitialized<T>(y.Lengths);
2814
/// 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.
2818
public static
Tensor
<T> Atan2Pi<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
2821
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2845
public static
Tensor
<T> Atan2Pi<T>(in ReadOnlyTensorSpan<T> x, T y)
2848
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2872
public static
Tensor
<T> Atan2Pi<T>(T x, in ReadOnlyTensorSpan<T> y)
2875
Tensor
<T> destination = CreateFromShapeUninitialized<T>(y.Lengths);
2897
/// 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.
2900
public static
Tensor
<T> Atanh<T>(in ReadOnlyTensorSpan<T> x)
2903
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2924
/// 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.
2927
public static
Tensor
<T> AtanPi<T>(in ReadOnlyTensorSpan<T> x)
2930
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2968
/// Computes the element-wise cube root of the input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2971
public static
Tensor
<T> Cbrt<T>(in ReadOnlyTensorSpan<T> x)
2974
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2995
/// Computes the element-wise ceiling of the input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2998
public static
Tensor
<T> Ceiling<T>(in ReadOnlyTensorSpan<T> x)
3001
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3026
public static
Tensor
<TTo> ConvertChecked<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source)
3030
Tensor
<TTo> destination = CreateFromShapeUninitialized<TTo>(source.Lengths);
3057
public static
Tensor
<TTo> ConvertSaturating<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source)
3061
Tensor
<TTo> destination = CreateFromShapeUninitialized<TTo>(source.Lengths);
3088
public static
Tensor
<TTo> ConvertTruncating<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source)
3092
Tensor
<TTo> destination = CreateFromShapeUninitialized<TTo>(source.Lengths);
3119
public static
Tensor
<T> CopySign<T>(in ReadOnlyTensorSpan<T> x, T sign)
3122
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3128
/// 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.
3132
public static
Tensor
<T> CopySign<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> sign)
3135
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3171
/// Takes the cosine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
3174
public static
Tensor
<T> Cos<T>(in ReadOnlyTensorSpan<T> x)
3177
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3198
/// Takes the hyperbolic cosine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
3201
public static
Tensor
<T> Cosh<T>(in ReadOnlyTensorSpan<T> x)
3204
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3240
/// <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>
3254
public static
Tensor
<T> CosPi<T>(in ReadOnlyTensorSpan<T> x)
3257
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3291
public static
Tensor
<T> DegreesToRadians<T>(in ReadOnlyTensorSpan<T> x)
3294
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3350
public static
Tensor
<T> Exp<T>(in ReadOnlyTensorSpan<T> x)
3353
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3377
public static
Tensor
<T> Exp10<T>(in ReadOnlyTensorSpan<T> x)
3380
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3402
public static
Tensor
<T> Exp10M1<T>(in ReadOnlyTensorSpan<T> x)
3405
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3425
public static
Tensor
<T> Exp2<T>(in ReadOnlyTensorSpan<T> x)
3428
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3448
public static
Tensor
<T> Exp2M1<T>(in ReadOnlyTensorSpan<T> x)
3451
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3471
public static
Tensor
<T> ExpM1<T>(in ReadOnlyTensorSpan<T> x)
3474
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3494
public static
Tensor
<T> Floor<T>(in ReadOnlyTensorSpan<T> x)
3497
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3521
public static
Tensor
<T> Hypot<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
3524
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<T> destination);
3550
public static
Tensor
<T> Ieee754Remainder<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
3553
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<T> destination);
3574
public static
Tensor
<T> Ieee754Remainder<T>(in ReadOnlyTensorSpan<T> x, T y)
3577
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3597
public static
Tensor
<T> Ieee754Remainder<T>(T x, in ReadOnlyTensorSpan<T> y)
3600
Tensor
<T> destination = CreateFromShapeUninitialized<T>(y.Lengths);
3621
public static
Tensor
<int> ILogB<T>(in ReadOnlyTensorSpan<T> x)
3624
Tensor
<int> destination = CreateFromShapeUninitialized<int>(x.Lengths);
3773
public static
Tensor
<T> LeadingZeroCount<T>(in ReadOnlyTensorSpan<T> x)
3776
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3797
/// Takes the natural logarithm of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
3800
public static
Tensor
<T> Log<T>(in ReadOnlyTensorSpan<T> x)
3803
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3824
public static
Tensor
<T> Log<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
3827
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<T> destination);
3847
public static
Tensor
<T> Log<T>(in ReadOnlyTensorSpan<T> x, T y)
3850
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3870
/// 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.
3873
public static
Tensor
<T> Log10<T>(in ReadOnlyTensorSpan<T> x)
3876
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3897
/// 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.
3900
public static
Tensor
<T> Log10P1<T>(in ReadOnlyTensorSpan<T> x)
3903
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3924
/// 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.
3927
public static
Tensor
<T> Log2<T>(in ReadOnlyTensorSpan<T> x)
3930
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3951
/// 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.
3954
public static
Tensor
<T> Log2P1<T>(in ReadOnlyTensorSpan<T> x)
3957
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3978
/// 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.
3981
public static
Tensor
<T> LogP1<T>(in ReadOnlyTensorSpan<T> x)
3984
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4022
public static
Tensor
<T> Max<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4025
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> output);
4045
public static
Tensor
<T> Max<T>(in ReadOnlyTensorSpan<T> x, T y)
4048
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4085
public static
Tensor
<T> MaxMagnitude<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4088
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
4108
public static
Tensor
<T> MaxMagnitude<T>(in ReadOnlyTensorSpan<T> x, T y)
4111
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4148
public static
Tensor
<T> MaxMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4151
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
4171
public static
Tensor
<T> MaxMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, T y)
4174
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4211
public static
Tensor
<T> MaxNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4214
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
4234
public static
Tensor
<T> MaxNumber<T>(in ReadOnlyTensorSpan<T> x, T y)
4237
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4274
public static
Tensor
<T> Min<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4277
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> output);
4297
public static
Tensor
<T> Min<T>(in ReadOnlyTensorSpan<T> x, T y)
4300
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4337
public static
Tensor
<T> MinMagnitude<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4340
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
4360
public static
Tensor
<T> MinMagnitude<T>(in ReadOnlyTensorSpan<T> x, T y)
4363
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4400
public static
Tensor
<T> MinMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4403
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
4423
public static
Tensor
<T> MinMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, T y)
4426
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4463
public static
Tensor
<T> MinNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4466
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
4486
public static
Tensor
<T> MinNumber<T>(in ReadOnlyTensorSpan<T> x, T y)
4489
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4524
public static
Tensor
<T> PopCount<T>(in ReadOnlyTensorSpan<T> x)
4527
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4548
public static
Tensor
<T> Pow<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4551
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<T> destination);
4571
public static
Tensor
<T> Pow<T>(in ReadOnlyTensorSpan<T> x, T y)
4574
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4594
public static
Tensor
<T> Pow<T>(T x, in ReadOnlyTensorSpan<T> y)
4597
Tensor
<T> destination = CreateFromShapeUninitialized<T>(y.Lengths);
4630
public static
Tensor
<T> RadiansToDegrees<T>(in ReadOnlyTensorSpan<T> x)
4633
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4653
public static
Tensor
<T> Reciprocal<T>(in ReadOnlyTensorSpan<T> x)
4656
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4677
public static
Tensor
<T> RootN<T>(in ReadOnlyTensorSpan<T> x, int n)
4680
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4703
public static
Tensor
<T> RotateLeft<T>(in ReadOnlyTensorSpan<T> x, int rotateAmount)
4706
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4730
public static
Tensor
<T> RotateRight<T>(in ReadOnlyTensorSpan<T> x, int rotateAmount)
4733
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4755
public static
Tensor
<T> Round<T>(in ReadOnlyTensorSpan<T> x)
4758
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4778
public static
Tensor
<T> Round<T>(in ReadOnlyTensorSpan<T> x, int digits, MidpointRounding mode)
4781
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4802
public static
Tensor
<T> Round<T>(in ReadOnlyTensorSpan<T> x, int digits)
4805
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4825
public static
Tensor
<T> Round<T>(in ReadOnlyTensorSpan<T> x, MidpointRounding mode)
4828
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4849
public static
Tensor
<T> Sigmoid<T>(in ReadOnlyTensorSpan<T> x)
4852
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4871
/// Takes the sin of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
4874
public static
Tensor
<T> Sin<T>(in ReadOnlyTensorSpan<T> x)
4877
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4899
public static
Tensor
<T> Sinh<T>(in ReadOnlyTensorSpan<T> x)
4902
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4922
public static
Tensor
<T> SinPi<T>(in ReadOnlyTensorSpan<T> x)
4925
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4945
public static
Tensor
<T> SoftMax<T>(in ReadOnlyTensorSpan<T> x)
4951
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4973
/// Takes the square root of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
4976
public static
Tensor
<T> Sqrt<T>(in ReadOnlyTensorSpan<T> x)
4979
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
5048
public static
Tensor
<T> Tan<T>(in ReadOnlyTensorSpan<T> x)
5051
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
5071
public static
Tensor
<T> Tanh<T>(in ReadOnlyTensorSpan<T> x)
5074
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
5094
public static
Tensor
<T> TanPi<T>(in ReadOnlyTensorSpan<T> x)
5097
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
5117
public static
Tensor
<T> TrailingZeroCount<T>(in ReadOnlyTensorSpan<T> x)
5120
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
5140
public static
Tensor
<T> Truncate<T>(in ReadOnlyTensorSpan<T> x)
5143
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>