17 instantiations of Tensor
System.Numerics.Tensors (17)
System\Numerics\Tensors\netcore\Tensor.cs (13)
297
=> new
Tensor
<T>(array);
302
=> new
Tensor
<T>(array, lengths, strides: []);
307
=> new
Tensor
<T>(array, lengths, strides);
312
=> new
Tensor
<T>(array, start, lengths, strides);
319
=> new
Tensor
<T>(lengths, strides: [], pinned);
324
=> new
Tensor
<T>(lengths, strides, pinned);
335
return new
Tensor
<T>(values, in shape);
1304
outTensor = new
Tensor
<T>(tensor._values, tensor._start, newLengths, newStrides);
1385
return new
Tensor
<T>(tensor._values, tensor._start, lengths, strides);
1772
outputs[i] = new
Tensor
<T>(values, newLengths, strides: []);
1843
Tensor<T> output = new
Tensor
<T>(tensor._values, tensor._start, lengths[..rank], strides[..rank]);
2234
Tensor<T> output = new
Tensor
<T>(tensor._values, tensor._start, lengths, strides);
2315
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>(
436 references to Tensor
System.Numerics.Tensors (436)
System\Numerics\Tensors\netcore\ReadOnlyTensorSpan_1.cs (1)
531
Tensor
<T> tmp = Tensor.CreateFromShape<T>(Lengths, IsPinned);
System\Numerics\Tensors\netcore\Tensor.cs (389)
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)
267
Tensor
<T> slice = tensors[i].Slice(ranges);
296
public static
Tensor
<T> Create<T>(T[] array)
301
public static
Tensor
<T> Create<T>(T[] array, scoped ReadOnlySpan<nint> lengths)
306
public static
Tensor
<T> Create<T>(T[] array, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
311
public static
Tensor
<T> Create<T>(T[] array, int start, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides)
318
public static
Tensor
<T> CreateFromShape<T>(scoped ReadOnlySpan<nint> lengths, bool pinned = false)
323
public static
Tensor
<T> CreateFromShape<T>(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned = false)
327
public static
Tensor
<T> CreateFromShapeUninitialized<T>(scoped ReadOnlySpan<nint> lengths, bool pinned = false)
331
public static
Tensor
<T> CreateFromShapeUninitialized<T>(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned = false)
390
public static
Tensor
<bool> Equals<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
393
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<bool> destination);
421
public static
Tensor
<bool> Equals<T>(in ReadOnlyTensorSpan<T> x, T y)
424
Tensor
<bool> destination = CreateFromShapeUninitialized<bool>(x.Lengths);
510
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
524
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
539
/// 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"/>
544
/// <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
546
public static
Tensor
<bool> GreaterThan<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
549
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<bool> destination);
557
/// 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"/>
563
/// <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
575
/// 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"/>
580
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
582
public static
Tensor
<bool> GreaterThan<T>(in ReadOnlyTensorSpan<T> x, T y)
585
Tensor
<bool> destination = CreateFromShape<bool>(x.Lengths, false);
592
/// 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"/>
598
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
610
/// 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"/>
615
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
617
public static
Tensor
<bool> GreaterThan<T>(T x, in ReadOnlyTensorSpan<T> y)
622
/// 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"/>
628
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
720
/// 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"/>
725
/// <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
727
public static
Tensor
<bool> GreaterThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
730
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<bool> destination);
738
/// 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"/>
744
/// <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
756
/// 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"/>
761
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
763
public static
Tensor
<bool> GreaterThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, T y)
766
Tensor
<bool> destination = CreateFromShape<bool>(x.Lengths, false);
773
/// 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"/>
779
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
791
/// 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"/>
796
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
798
public static
Tensor
<bool> GreaterThanOrEqual<T>(T x, in ReadOnlyTensorSpan<T> y)
803
/// 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"/>
809
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/>
901
/// 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"/>
906
/// <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
908
public static
Tensor
<bool> LessThan<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
911
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<bool> destination);
919
/// 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"/>
925
/// <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
936
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
937
/// 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"/>
940
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
942
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
944
public static
Tensor
<bool> LessThan<T>(in ReadOnlyTensorSpan<T> x, T y)
947
Tensor
<bool> destination = CreateFromShape<bool>(x.Lengths, false);
953
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
954
/// 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"/>
957
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
960
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
971
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
972
/// 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"/>
975
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
977
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
979
public static
Tensor
<bool> LessThan<T>(T x, in ReadOnlyTensorSpan<T> y)
983
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
984
/// 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"/>
987
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
990
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1082
/// 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"/>
1087
/// <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
1089
public static
Tensor
<bool> LessThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
1092
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<bool> destination);
1100
/// 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"/>
1106
/// <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
1117
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1118
/// 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"/>
1121
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
1123
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1125
public static
Tensor
<bool> LessThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, T y)
1128
Tensor
<bool> destination = CreateFromShape<bool>(x.Lengths, false);
1134
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1135
/// 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"/>
1138
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
1141
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1152
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1153
/// 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"/>
1156
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
1158
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1160
public static
Tensor
<bool> LessThanOrEqual<T>(T x, in ReadOnlyTensorSpan<T> y)
1164
/// Compares the elements of a <see cref="
Tensor
{T}"/> to see which elements are less than <paramref name="y"/>.
1165
/// 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"/>
1168
/// <param name="x"><see cref="
Tensor
{T}"/> to compare.</param>
1171
/// <returns><see cref="
Tensor
{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/>
1263
/// If <paramref name="tensor"/> is a 1D tensor, it will return <paramref name="tensor"/>. Otherwise it creates a new <see cref="
Tensor
{T}"/>
1266
/// <param name="tensor">Input <see cref="
Tensor
{T}"/></param>
1268
public static
Tensor
<T> PermuteDimensions<T>(this
Tensor
<T> tensor, ReadOnlySpan<int> dimensions)
1282
Tensor
<T> outTensor;
1320
/// <param name="tensor"><see cref="
Tensor
{T}"/> you want to reshape.</param>
1322
public static
Tensor
<T> Reshape<T>(this
Tensor
<T> tensor, ReadOnlySpan<nint> lengths)
1542
/// 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
1545
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1547
public static
Tensor
<T> Resize<T>(
Tensor
<T> tensor, ReadOnlySpan<nint> lengths)
1551
Tensor
<T> output = Create(values, lengths, []);
1566
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1568
public static void ResizeTo<T>(scoped in
Tensor
<T> tensor, in TensorSpan<T> destination)
1605
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1606
public static
Tensor
<T> Reverse<T>(in ReadOnlyTensorSpan<T> tensor)
1608
Tensor
<T> output = CreateFromShape<T>(tensor.Lengths);
1618
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1620
public static
Tensor
<T> ReverseDimension<T>(in ReadOnlyTensorSpan<T> tensor, int dimension)
1622
Tensor
<T> output = CreateFromShape<T>(tensor.Lengths);
1710
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1713
public static
Tensor
<T> SetSlice<T>(this
Tensor
<T> tensor, in ReadOnlyTensorSpan<T> values, params ReadOnlySpan<NRange> ranges)
1722
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1741
/// Split a <see cref="
Tensor
{T}"/> into <paramref name="splitCount"/> along the given <paramref name="dimension"/>. If the tensor cannot be split
1744
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
1747
public static
Tensor
<T>[] Split<T>(scoped in ReadOnlyTensorSpan<T> tensor, int splitCount, nint dimension)
1754
Tensor
<T>[] outputs = new
Tensor
<T>[splitCount];
1787
/// <param name="tensor">The <see cref="
Tensor
{T}"/> to remove all dimensions of length 1.</param>
1788
public static
Tensor
<T> Squeeze<T>(this
Tensor
<T> tensor)
1797
/// <param name="tensor">The <see cref="
Tensor
{T}"/> to remove dimension of length 1.</param>
1799
public static
Tensor
<T> SqueezeDimension<T>(this
Tensor
<T> tensor, int dimension)
1843
Tensor
<T> output = new Tensor<T>(tensor._values, tensor._start, lengths[..rank], strides[..rank]);
1988
/// Join multiple <see cref="
Tensor
{T}"/> along a new dimension that is added at position 0. All tensors must have the same shape.
1990
/// <param name="tensors">Input <see cref="
Tensor
{T}"/>.</param>
1991
public static
Tensor
<T> Stack<T>(params ReadOnlySpan<
Tensor
<T>> tensors)
1997
/// 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.
1999
/// <param name="tensors">Input <see cref="
Tensor
{T}"/>.</param>
2001
public static
Tensor
<T> StackAlongDimension<T>(int dimension, params ReadOnlySpan<
Tensor
<T>> tensors)
2017
Tensor
<T>[] outputs = new
Tensor
<T>[tensors.Length];
2026
/// Join multiple <see cref="
Tensor
{T}"/> along a new dimension that is added at position 0. All tensors must have the same shape.
2028
/// <param name="tensors">Input <see cref="
Tensor
{T}"/>.</param>
2030
public static ref readonly TensorSpan<T> Stack<T>(scoped in ReadOnlySpan<
Tensor
<T>> tensors, in TensorSpan<T> destination)
2036
/// 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.
2038
/// <param name="tensors">Input <see cref="
Tensor
{T}"/>.</param>
2041
public static ref readonly TensorSpan<T> StackAlongDimension<T>(scoped ReadOnlySpan<
Tensor
<T>> tensors, in TensorSpan<T> destination, int dimension)
2057
Tensor
<T>[] outputs = new
Tensor
<T>[tensors.Length];
2214
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
2215
public static
Tensor
<T> Transpose<T>(
Tensor
<T> tensor)
2234
Tensor
<T> output = new Tensor<T>(tensor._values, tensor._start, lengths, strides);
2248
/// <param name="tensor">Input <see cref="
Tensor
{T}"/>.</param>
2250
public static bool TryBroadcastTo<T>(this
Tensor
<T> tensor, in TensorSpan<T> destination)
2287
/// <param name="tensor">The <see cref="
Tensor
{T}"/> to add a dimension of length 1.</param>
2289
public static
Tensor
<T> Unsqueeze<T>(this
Tensor
<T> tensor, int dimension)
2315
Tensor
<T> output = new Tensor<T>(tensor._values, tensor._start, newLengths, newStrides);
2399
/// Takes the absolute value of each element of the <see cref="
Tensor
{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2402
public static
Tensor
<T> Abs<T>(in ReadOnlyTensorSpan<T> x)
2405
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2426
/// Takes the inverse cosine of each element of the <see cref="
Tensor
{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2429
public static
Tensor
<T> Acos<T>(in ReadOnlyTensorSpan<T> x)
2432
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2438
/// Takes the inverse cosine of each element of the <see cref="
Tensor
{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2453
/// Takes the inverse hyperbolic cosine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2456
public static
Tensor
<T> Acosh<T>(in ReadOnlyTensorSpan<T> x)
2459
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2480
/// 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.
2483
public static
Tensor
<T> AcosPi<T>(in ReadOnlyTensorSpan<T> x)
2486
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2507
/// Takes the inverse sin of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2510
public static
Tensor
<T> Asin<T>(in ReadOnlyTensorSpan<T> x)
2513
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2534
/// Takes the inverse hyperbolic sine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2537
public static
Tensor
<T> Asinh<T>(in ReadOnlyTensorSpan<T> x)
2540
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2561
/// Takes the inverse hyperbolic sine divided by pi of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2564
public static
Tensor
<T> AsinPi<T>(in ReadOnlyTensorSpan<T> x)
2567
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2588
/// Takes the arc tangent of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2591
public static
Tensor
<T> Atan<T>(in ReadOnlyTensorSpan<T> x)
2594
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2615
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2619
public static
Tensor
<T> Atan2<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
2622
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2642
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2646
public static
Tensor
<T> Atan2<T>(in ReadOnlyTensorSpan<T> x, T y)
2649
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2669
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2673
public static
Tensor
<T> Atan2<T>(T x, in ReadOnlyTensorSpan<T> y)
2676
Tensor
<T> destination = CreateFromShapeUninitialized<T>(y.Lengths);
2698
/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/>, divides each element by pi, and returns a new <see cref="
Tensor
{T}"/> with the result.
2702
public static
Tensor
<T> Atan2Pi<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
2705
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2729
public static
Tensor
<T> Atan2Pi<T>(in ReadOnlyTensorSpan<T> x, T y)
2732
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2756
public static
Tensor
<T> Atan2Pi<T>(T x, in ReadOnlyTensorSpan<T> y)
2759
Tensor
<T> destination = CreateFromShapeUninitialized<T>(y.Lengths);
2781
/// Takes the inverse hyperbolic tangent of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2784
public static
Tensor
<T> Atanh<T>(in ReadOnlyTensorSpan<T> x)
2787
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2808
/// Takes the inverse hyperbolic tangent divided by pi of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2811
public static
Tensor
<T> AtanPi<T>(in ReadOnlyTensorSpan<T> x)
2814
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2852
/// Computes the element-wise cube root of the input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2855
public static
Tensor
<T> Cbrt<T>(in ReadOnlyTensorSpan<T> x)
2858
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2879
/// Computes the element-wise ceiling of the input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
2882
public static
Tensor
<T> Ceiling<T>(in ReadOnlyTensorSpan<T> x)
2885
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
2910
public static
Tensor
<TTo> ConvertChecked<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source)
2914
Tensor
<TTo> destination = CreateFromShapeUninitialized<TTo>(source.Lengths);
2941
public static
Tensor
<TTo> ConvertSaturating<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source)
2945
Tensor
<TTo> destination = CreateFromShapeUninitialized<TTo>(source.Lengths);
2972
public static
Tensor
<TTo> ConvertTruncating<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source)
2976
Tensor
<TTo> destination = CreateFromShapeUninitialized<TTo>(source.Lengths);
3003
public static
Tensor
<T> CopySign<T>(in ReadOnlyTensorSpan<T> x, T sign)
3006
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3012
/// 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.
3016
public static
Tensor
<T> CopySign<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> sign)
3019
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3055
/// Takes the cosine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
3058
public static
Tensor
<T> Cos<T>(in ReadOnlyTensorSpan<T> x)
3061
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3082
/// Takes the hyperbolic cosine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
3085
public static
Tensor
<T> Cosh<T>(in ReadOnlyTensorSpan<T> x)
3088
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3124
/// <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>
3138
public static
Tensor
<T> CosPi<T>(in ReadOnlyTensorSpan<T> x)
3141
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3175
public static
Tensor
<T> DegreesToRadians<T>(in ReadOnlyTensorSpan<T> x)
3178
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3234
public static
Tensor
<T> Exp<T>(in ReadOnlyTensorSpan<T> x)
3237
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3261
public static
Tensor
<T> Exp10<T>(in ReadOnlyTensorSpan<T> x)
3264
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3286
public static
Tensor
<T> Exp10M1<T>(in ReadOnlyTensorSpan<T> x)
3289
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3309
public static
Tensor
<T> Exp2<T>(in ReadOnlyTensorSpan<T> x)
3312
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3332
public static
Tensor
<T> Exp2M1<T>(in ReadOnlyTensorSpan<T> x)
3335
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3355
public static
Tensor
<T> ExpM1<T>(in ReadOnlyTensorSpan<T> x)
3358
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3378
public static
Tensor
<T> Floor<T>(in ReadOnlyTensorSpan<T> x)
3381
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3405
public static
Tensor
<T> Hypot<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
3408
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<T> destination);
3434
public static
Tensor
<T> Ieee754Remainder<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
3437
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<T> destination);
3458
public static
Tensor
<T> Ieee754Remainder<T>(in ReadOnlyTensorSpan<T> x, T y)
3461
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3481
public static
Tensor
<T> Ieee754Remainder<T>(T x, in ReadOnlyTensorSpan<T> y)
3484
Tensor
<T> destination = CreateFromShapeUninitialized<T>(y.Lengths);
3505
public static
Tensor
<int> ILogB<T>(in ReadOnlyTensorSpan<T> x)
3508
Tensor
<int> destination = CreateFromShapeUninitialized<int>(x.Lengths);
3577
public static
Tensor
<T> LeadingZeroCount<T>(in ReadOnlyTensorSpan<T> x)
3580
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3601
/// Takes the natural logarithm of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
3604
public static
Tensor
<T> Log<T>(in ReadOnlyTensorSpan<T> x)
3607
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3628
public static
Tensor
<T> Log<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
3631
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<T> destination);
3651
public static
Tensor
<T> Log<T>(in ReadOnlyTensorSpan<T> x, T y)
3654
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3674
/// Takes the base 10 logarithm of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
3677
public static
Tensor
<T> Log10<T>(in ReadOnlyTensorSpan<T> x)
3680
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3701
/// Takes the base 10 logarithm plus 1 of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
3704
public static
Tensor
<T> Log10P1<T>(in ReadOnlyTensorSpan<T> x)
3707
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3728
/// Takes the base 2 logarithm of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
3731
public static
Tensor
<T> Log2<T>(in ReadOnlyTensorSpan<T> x)
3734
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3755
/// Takes the base 2 logarithm plus 1 of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
3758
public static
Tensor
<T> Log2P1<T>(in ReadOnlyTensorSpan<T> x)
3761
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3782
/// Takes the natural logarithm plus 1 of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
3785
public static
Tensor
<T> LogP1<T>(in ReadOnlyTensorSpan<T> x)
3788
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3826
public static
Tensor
<T> Max<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
3829
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> output);
3849
public static
Tensor
<T> Max<T>(in ReadOnlyTensorSpan<T> x, T y)
3852
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3889
public static
Tensor
<T> MaxMagnitude<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
3892
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
3912
public static
Tensor
<T> MaxMagnitude<T>(in ReadOnlyTensorSpan<T> x, T y)
3915
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
3952
public static
Tensor
<T> MaxMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
3955
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
3975
public static
Tensor
<T> MaxMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, T y)
3978
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4015
public static
Tensor
<T> MaxNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4018
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
4038
public static
Tensor
<T> MaxNumber<T>(in ReadOnlyTensorSpan<T> x, T y)
4041
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4078
public static
Tensor
<T> Min<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4081
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> output);
4101
public static
Tensor
<T> Min<T>(in ReadOnlyTensorSpan<T> x, T y)
4104
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4141
public static
Tensor
<T> MinMagnitude<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4144
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
4164
public static
Tensor
<T> MinMagnitude<T>(in ReadOnlyTensorSpan<T> x, T y)
4167
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4204
public static
Tensor
<T> MinMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4207
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
4227
public static
Tensor
<T> MinMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, T y)
4230
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4267
public static
Tensor
<T> MinNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4270
TensorOperation.ValidateCompatibility(in x, in y, out
Tensor
<T> destination);
4290
public static
Tensor
<T> MinNumber<T>(in ReadOnlyTensorSpan<T> x, T y)
4293
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4328
public static
Tensor
<T> PopCount<T>(in ReadOnlyTensorSpan<T> x)
4331
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4352
public static
Tensor
<T> Pow<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y)
4355
TensorOperation.ValidateCompatibility(x, y, out
Tensor
<T> destination);
4375
public static
Tensor
<T> Pow<T>(in ReadOnlyTensorSpan<T> x, T y)
4378
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4398
public static
Tensor
<T> Pow<T>(T x, in ReadOnlyTensorSpan<T> y)
4401
Tensor
<T> destination = CreateFromShapeUninitialized<T>(y.Lengths);
4434
public static
Tensor
<T> RadiansToDegrees<T>(in ReadOnlyTensorSpan<T> x)
4437
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4457
public static
Tensor
<T> Reciprocal<T>(in ReadOnlyTensorSpan<T> x)
4460
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4481
public static
Tensor
<T> RootN<T>(in ReadOnlyTensorSpan<T> x, int n)
4484
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4507
public static
Tensor
<T> RotateLeft<T>(in ReadOnlyTensorSpan<T> x, int rotateAmount)
4510
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4534
public static
Tensor
<T> RotateRight<T>(in ReadOnlyTensorSpan<T> x, int rotateAmount)
4537
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4559
public static
Tensor
<T> Round<T>(in ReadOnlyTensorSpan<T> x)
4562
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4582
public static
Tensor
<T> Round<T>(in ReadOnlyTensorSpan<T> x, int digits, MidpointRounding mode)
4585
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4606
public static
Tensor
<T> Round<T>(in ReadOnlyTensorSpan<T> x, int digits)
4609
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4629
public static
Tensor
<T> Round<T>(in ReadOnlyTensorSpan<T> x, MidpointRounding mode)
4632
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4653
public static
Tensor
<T> Sigmoid<T>(in ReadOnlyTensorSpan<T> x)
4656
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4675
/// Takes the sin of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
4678
public static
Tensor
<T> Sin<T>(in ReadOnlyTensorSpan<T> x)
4681
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4703
public static
Tensor
<T> Sinh<T>(in ReadOnlyTensorSpan<T> x)
4706
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4726
public static
Tensor
<T> SinPi<T>(in ReadOnlyTensorSpan<T> x)
4729
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4749
public static
Tensor
<T> SoftMax<T>(in ReadOnlyTensorSpan<T> x)
4755
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4777
/// Takes the square root of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="
Tensor
{T}"/> with the result.
4780
public static
Tensor
<T> Sqrt<T>(in ReadOnlyTensorSpan<T> x)
4783
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4853
public static
Tensor
<T> Tan<T>(in ReadOnlyTensorSpan<T> x)
4856
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4876
public static
Tensor
<T> Tanh<T>(in ReadOnlyTensorSpan<T> x)
4879
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4899
public static
Tensor
<T> TanPi<T>(in ReadOnlyTensorSpan<T> x)
4902
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4922
public static
Tensor
<T> TrailingZeroCount<T>(in ReadOnlyTensorSpan<T> x)
4925
Tensor
<T> destination = CreateFromShapeUninitialized<T>(x.Lengths);
4945
public static
Tensor
<T> Truncate<T>(in ReadOnlyTensorSpan<T> x)
4948
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>