18 instantiations of Tensor
System.Numerics.Tensors (18)
System\Numerics\Tensors\netcore\Tensor.cs (14)
318=> new Tensor<T>(lengths, strides: [], pinned); 323=> new Tensor<T>(lengths, strides, pinned); 328=> new Tensor<T>(array); 333=> new Tensor<T>(array, lengths); 338=> new Tensor<T>(array, lengths, strides); 343=> new Tensor<T>(array, start, lengths, strides); 439return new Tensor<T>(array, in shape, pinned); 447return new Tensor<T>(values, in shape, pinned); 1419outTensor = new Tensor<T>(tensor._values, tensor._start, newLengths, newStrides, newLinearOrder); 1501return new Tensor<T>(tensor._values, tensor._start, lengths, strides); 1888outputs[i] = new Tensor<T>(values, 0, newShape, [], tensor._shape.LinearRankOrder); 1973Tensor<T> output = new Tensor<T>(tensor._values, tensor._start, lengths[..newRank], strides[..newRank], strideOrder[..newRank]); 2377Tensor<T> output = new Tensor<T>(tensor._values, tensor._start, lengths, strides, strideOrder); 2459Tensor<T> output = new Tensor<T>(tensor._values, tensor._start, newLengths, newStrides);
System\Numerics\Tensors\netcore\Tensor_1.cs (4)
23public static Tensor<T> Empty { get; } = new(); 257return new Tensor<T>( 273return new Tensor<T>( 289return new Tensor<T>(
482 references to Tensor
System.Numerics.Tensors (482)
System\Numerics\Tensors\netcore\Tensor.cs (456)
55/// 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. 57/// <param name="source">Input <see cref="Tensor{T}"/>.</param> 58/// <param name="lengthsSource">Other <see cref="Tensor{T}"/> to make shapes broadcastable.</param> 59public static Tensor<T> Broadcast<T>(scoped in ReadOnlyTensorSpan<T> source, scoped in ReadOnlyTensorSpan<T> lengthsSource) 65/// 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. 68/// <param name="source">Input <see cref="Tensor{T}"/>.</param> 71public static Tensor<T> Broadcast<T>(scoped in ReadOnlyTensorSpan<T> source, scoped ReadOnlySpan<nint> lengths) 74Tensor<T> destination = Tensor.CreateUninitialized<T>(lengths); 86public static void BroadcastTo<T>(this Tensor<T> source, in TensorSpan<T> destination) 120public static Tensor<T> Concatenate<T>(params scoped ReadOnlySpan<Tensor<T>> tensors) 130public static Tensor<T> ConcatenateOnDimension<T>(int dimension, params scoped ReadOnlySpan<Tensor<T>> tensors) 138Tensor<T> tensor; 191public static ref readonly TensorSpan<T> Concatenate<T>(scoped ReadOnlySpan<Tensor<T>> tensors, in TensorSpan<T> destination) 203public static ref readonly TensorSpan<T> ConcatenateOnDimension<T>(int dimension, scoped ReadOnlySpan<Tensor<T>> tensors, in TensorSpan<T> destination) 271Tensor<T> slice = tensors[i].Slice(ranges); 317public static Tensor<T> Create<T>(scoped ReadOnlySpan<nint> lengths, bool pinned = false) 322public static Tensor<T> Create<T>(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned = false) 327public static Tensor<T> Create<T>(T[] array) 332public static Tensor<T> Create<T>(T[] array, scoped ReadOnlySpan<nint> lengths) 337public static Tensor<T> Create<T>(T[] array, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides) 342public static Tensor<T> Create<T>(T[] array, int start, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides) 346public static Tensor<T> Create<T>(IEnumerable<T> enumerable, bool pinned = false) 352Tensor<T> tensor = CreateUninitialized<T>([array.Length], pinned); 365public static Tensor<T> Create<T>(IEnumerable<T> enumerable, scoped ReadOnlySpan<nint> lengths, bool pinned = false) 370public static Tensor<T> Create<T>(IEnumerable<T> enumerable, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned = false) 376Tensor<T> tensor = CreateUninitialized<T>(lengths, strides, pinned); 388/// Creates a <see cref="Tensor{T}"/> and initializes it with random data in a gaussian normal distribution. 391public static Tensor<T> CreateAndFillGaussianNormalDistribution<T>(scoped ReadOnlySpan<nint> lengths) 398/// Creates a <see cref="Tensor{T}"/> and initializes it with random data in a gaussian normal distribution. 402public static Tensor<T> CreateAndFillGaussianNormalDistribution<T>(Random random, scoped ReadOnlySpan<nint> lengths) 405Tensor<T> tensor = CreateUninitialized<T>(lengths); 412/// Creates a <see cref="Tensor{T}"/> and initializes it with random data uniformly distributed. 415public static Tensor<T> CreateAndFillUniformDistribution<T>(scoped ReadOnlySpan<nint> lengths) 422/// Creates a <see cref="Tensor{T}"/> and initializes it with random data uniformly distributed. 426public static Tensor<T> CreateAndFillUniformDistribution<T>(Random random, scoped ReadOnlySpan<nint> lengths) 429Tensor<T> tensor = CreateUninitialized<T>(lengths); 435public static Tensor<T> CreateUninitialized<T>(scoped ReadOnlySpan<nint> lengths, bool pinned = false) 443public static Tensor<T> CreateUninitialized<T>(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned = false) 502public static Tensor<bool> Equals<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 505TensorOperation.ValidateCompatibility(x, y, out Tensor<bool> destination); 533public static Tensor<bool> Equals<T>(in ReadOnlyTensorSpan<T> x, T y) 536Tensor<bool> destination = CreateUninitialized<bool>(x.Lengths); 622/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 636/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 651/// 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"/> 656/// <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 658public static Tensor<bool> GreaterThan<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 661TensorOperation.ValidateCompatibility(x, y, out Tensor<bool> destination); 669/// 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"/> 675/// <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 687/// 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"/> 692/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 694public static Tensor<bool> GreaterThan<T>(in ReadOnlyTensorSpan<T> x, T y) 697Tensor<bool> destination = Tensor.Create<bool>(x.Lengths, false); 704/// 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"/> 710/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 722/// 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"/> 727/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 729public static Tensor<bool> GreaterThan<T>(T x, in ReadOnlyTensorSpan<T> y) 734/// 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"/> 740/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 832/// 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"/> 837/// <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 839public static Tensor<bool> GreaterThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 842TensorOperation.ValidateCompatibility(x, y, out Tensor<bool> destination); 850/// 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"/> 856/// <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 868/// 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"/> 873/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 875public static Tensor<bool> GreaterThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, T y) 878Tensor<bool> destination = Tensor.Create<bool>(x.Lengths, false); 885/// 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"/> 891/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 903/// 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"/> 908/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 910public static Tensor<bool> GreaterThanOrEqual<T>(T x, in ReadOnlyTensorSpan<T> y) 915/// 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"/> 921/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 1013/// 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"/> 1018/// <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 1020public static Tensor<bool> LessThan<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 1023TensorOperation.ValidateCompatibility(x, y, out Tensor<bool> destination); 1031/// 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"/> 1037/// <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 1048/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1049/// 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"/> 1052/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 1054/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1056public static Tensor<bool> LessThan<T>(in ReadOnlyTensorSpan<T> x, T y) 1059Tensor<bool> destination = Tensor.Create<bool>(x.Lengths, false); 1065/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1066/// 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"/> 1069/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 1072/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1083/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1084/// 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/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 1089/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1091public static Tensor<bool> LessThan<T>(T x, in ReadOnlyTensorSpan<T> y) 1095/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1096/// 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"/> 1099/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 1102/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1194/// 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"/> 1199/// <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 1201public static Tensor<bool> LessThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 1204TensorOperation.ValidateCompatibility(x, y, out Tensor<bool> destination); 1212/// 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"/> 1218/// <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 1229/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1230/// 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"/> 1233/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 1235/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1237public static Tensor<bool> LessThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, T y) 1240Tensor<bool> destination = Tensor.Create<bool>(x.Lengths, false); 1246/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1247/// 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"/> 1250/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 1253/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1264/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1265/// 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"/> 1268/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 1270/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1272public static Tensor<bool> LessThanOrEqual<T>(T x, in ReadOnlyTensorSpan<T> y) 1276/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1277/// 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"/> 1280/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 1283/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1375/// If <paramref name="tensor"/> is a 1D tensor, it will return <paramref name="tensor"/>. Otherwise it creates a new <see cref="Tensor{T}"/> 1378/// <param name="tensor">Input <see cref="Tensor{T}"/></param> 1380public static Tensor<T> PermuteDimensions<T>(this Tensor<T> tensor, ReadOnlySpan<int> dimensions) 1395Tensor<T> outTensor; 1436/// <param name="tensor"><see cref="Tensor{T}"/> you want to reshape.</param> 1438public static Tensor<T> Reshape<T>(this Tensor<T> tensor, ReadOnlySpan<nint> lengths) 1658/// 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 1661/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1663public static Tensor<T> Resize<T>(Tensor<T> tensor, ReadOnlySpan<nint> lengths) 1667Tensor<T> output = Tensor.Create(values, 0, lengths, []); 1682/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1684public static void ResizeTo<T>(scoped in Tensor<T> tensor, in TensorSpan<T> destination) 1721/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1722public static Tensor<T> Reverse<T>(in ReadOnlyTensorSpan<T> tensor) 1724Tensor<T> output = Tensor.Create<T>(tensor.Lengths); 1734/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1736public static Tensor<T> ReverseDimension<T>(in ReadOnlyTensorSpan<T> tensor, int dimension) 1738Tensor<T> output = Tensor.Create<T>(tensor.Lengths); 1826/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1829public 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> 1863public static Tensor<T>[] Split<T>(scoped in ReadOnlyTensorSpan<T> tensor, int splitCount, nint dimension) 1870Tensor<T>[] outputs = new Tensor<T>[splitCount]; 1903/// <param name="tensor">The <see cref="Tensor{T}"/> to remove all dimensions of length 1.</param> 1904public 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> 1915public static Tensor<T> SqueezeDimension<T>(this Tensor<T> tensor, int dimension) 1973Tensor<T> output = new Tensor<T>(tensor._values, tensor._start, lengths[..newRank], strides[..newRank], strideOrder[..newRank]); 2174/// Join multiple <see cref="Tensor{T}"/> along a new dimension that is added at position 0. All tensors must have the same shape. 2176/// <param name="tensors">Input <see cref="Tensor{T}"/>.</param> 2177public static Tensor<T> Stack<T>(params ReadOnlySpan<Tensor<T>> tensors) 2183/// 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. 2185/// <param name="tensors">Input <see cref="Tensor{T}"/>.</param> 2187public static Tensor<T> StackAlongDimension<T>(int dimension, params ReadOnlySpan<Tensor<T>> tensors) 2203Tensor<T>[] outputs = new Tensor<T>[tensors.Length]; 2212/// Join multiple <see cref="Tensor{T}"/> along a new dimension that is added at position 0. All tensors must have the same shape. 2214/// <param name="tensors">Input <see cref="Tensor{T}"/>.</param> 2216public static ref readonly TensorSpan<T> Stack<T>(scoped in ReadOnlySpan<Tensor<T>> tensors, in TensorSpan<T> destination) 2222/// 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. 2224/// <param name="tensors">Input <see cref="Tensor{T}"/>.</param> 2227public static ref readonly TensorSpan<T> StackAlongDimension<T>(scoped ReadOnlySpan<Tensor<T>> tensors, in TensorSpan<T> destination, int dimension) 2243Tensor<T>[] outputs = new Tensor<T>[tensors.Length]; 2337/// Creates a <see cref="string"/> representation of the <see cref="Tensor{T}"/>."/> 2342public static string ToString<T>(this Tensor<T> tensor, ReadOnlySpan<nint> maximumLengths) 2351/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 2352public static Tensor<T> Transpose<T>(Tensor<T> tensor) 2377Tensor<T> output = new Tensor<T>(tensor._values, tensor._start, lengths, strides, strideOrder); 2392/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 2394public static bool TryBroadcastTo<T>(this Tensor<T> tensor, in TensorSpan<T> destination) 2431/// <param name="tensor">The <see cref="Tensor{T}"/> to add a dimension of length 1.</param> 2433public static Tensor<T> Unsqueeze<T>(this Tensor<T> tensor, int dimension) 2459Tensor<T> output = new Tensor<T>(tensor._values, tensor._start, newLengths, newStrides); 2543/// Takes the absolute value of each element of the <see cref="Tensor{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2546public static Tensor<T> Abs<T>(in ReadOnlyTensorSpan<T> x) 2549Tensor<T> destination = CreateUninitialized<T>(x.Lengths); 2570/// Takes the inverse cosine of each element of the <see cref="Tensor{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2573public static Tensor<T> Acos<T>(in ReadOnlyTensorSpan<T> x) 2576Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2582/// Takes the inverse cosine of each element of the <see cref="Tensor{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2597/// 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. 2600public static Tensor<T> Acosh<T>(in ReadOnlyTensorSpan<T> x) 2603Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2624/// 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. 2627public static Tensor<T> AcosPi<T>(in ReadOnlyTensorSpan<T> x) 2630Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2651/// Adds each element of <paramref name="x"/> to each element of <paramref name="y"/> and returns a new <see cref="Tensor{T}"/> with the result. 2655public static Tensor<T> Add<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 2658TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 2664/// Adds <paramref name="y"/> to each element of <paramref name="x"/> and returns a new <see cref="Tensor{T}"/> with the result. 2668public static Tensor<T> Add<T>(in ReadOnlyTensorSpan<T> x, T y) 2671Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2707/// Takes the inverse sin of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2710public static Tensor<T> Asin<T>(in ReadOnlyTensorSpan<T> x) 2713Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2734/// 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. 2737public static Tensor<T> Asinh<T>(in ReadOnlyTensorSpan<T> x) 2740Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2761/// 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. 2764public static Tensor<T> AsinPi<T>(in ReadOnlyTensorSpan<T> x) 2767Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2788/// Takes the arc tangent of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2791public static Tensor<T> Atan<T>(in ReadOnlyTensorSpan<T> x) 2794Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2815/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2819public static Tensor<T> Atan2<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 2822Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2842/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2846public static Tensor<T> Atan2<T>(in ReadOnlyTensorSpan<T> x, T y) 2849Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2869/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2873public static Tensor<T> Atan2<T>(T x, in ReadOnlyTensorSpan<T> y) 2876Tensor<T> destination = Tensor.CreateUninitialized<T>(y.Lengths); 2898/// 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. 2902public static Tensor<T> Atan2Pi<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 2905Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2929public static Tensor<T> Atan2Pi<T>(in ReadOnlyTensorSpan<T> x, T y) 2932Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2956public static Tensor<T> Atan2Pi<T>(T x, in ReadOnlyTensorSpan<T> y) 2959Tensor<T> destination = Tensor.CreateUninitialized<T>(y.Lengths); 2981/// 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. 2984public static Tensor<T> Atanh<T>(in ReadOnlyTensorSpan<T> x) 2987Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3008/// 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. 3011public static Tensor<T> AtanPi<T>(in ReadOnlyTensorSpan<T> x) 3014Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3052/// Computes the element-wise bitwise and of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3056public static Tensor<T> BitwiseAnd<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 3059Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3079/// Computes the element-wise bitwise and of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3083public static Tensor<T> BitwiseAnd<T>(in ReadOnlyTensorSpan<T> x, T y) 3086Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3108/// Computes the element-wise bitwise of of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3112public static Tensor<T> BitwiseOr<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 3115Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3135/// Computes the element-wise bitwise or of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3139public static Tensor<T> BitwiseOr<T>(in ReadOnlyTensorSpan<T> x, T y) 3142Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3164/// Computes the element-wise cube root of the input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3167public static Tensor<T> Cbrt<T>(in ReadOnlyTensorSpan<T> x) 3170Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3191/// Computes the element-wise ceiling of the input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3194public static Tensor<T> Ceiling<T>(in ReadOnlyTensorSpan<T> x) 3197Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3222public static Tensor<TTo> ConvertChecked<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source) 3226Tensor<TTo> destination = Tensor.CreateUninitialized<TTo>(source.Lengths); 3253public static Tensor<TTo> ConvertSaturating<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source) 3257Tensor<TTo> destination = Tensor.CreateUninitialized<TTo>(source.Lengths); 3284public static Tensor<TTo> ConvertTruncating<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source) 3288Tensor<TTo> destination = Tensor.CreateUninitialized<TTo>(source.Lengths); 3315public static Tensor<T> CopySign<T>(in ReadOnlyTensorSpan<T> x, T sign) 3318Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3324/// 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. 3328public static Tensor<T> CopySign<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> sign) 3331Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3367/// Takes the cosine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3370public static Tensor<T> Cos<T>(in ReadOnlyTensorSpan<T> x) 3373Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3394/// Takes the hyperbolic cosine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3397public static Tensor<T> Cosh<T>(in ReadOnlyTensorSpan<T> x) 3400Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3436/// <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> 3450public static Tensor<T> CosPi<T>(in ReadOnlyTensorSpan<T> x) 3453Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3487public static Tensor<T> DegreesToRadians<T>(in ReadOnlyTensorSpan<T> x) 3490Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3527/// Divides each element of <paramref name="x"/> by <paramref name="y"/> and returns a new <see cref="Tensor{T}"/> with the result. 3531public static Tensor<T> Divide<T>(in ReadOnlyTensorSpan<T> x, T y) 3534Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3540/// Divides <paramref name="x"/> by each element of <paramref name="y"/> and returns a new <see cref="Tensor{T}"/> with the result."/> 3544public static Tensor<T> Divide<T>(T x, in ReadOnlyTensorSpan<T> y) 3547Tensor<T> destination = Tensor.CreateUninitialized<T>(y.Lengths); 3558public static Tensor<T> Divide<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 3561TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 3631public static Tensor<T> Exp<T>(in ReadOnlyTensorSpan<T> x) 3634Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3658public static Tensor<T> Exp10<T>(in ReadOnlyTensorSpan<T> x) 3661Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3683public static Tensor<T> Exp10M1<T>(in ReadOnlyTensorSpan<T> x) 3686Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3706public static Tensor<T> Exp2<T>(in ReadOnlyTensorSpan<T> x) 3709Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3729public static Tensor<T> Exp2M1<T>(in ReadOnlyTensorSpan<T> x) 3732Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3752public static Tensor<T> ExpM1<T>(in ReadOnlyTensorSpan<T> x) 3755Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3775public static Tensor<T> Floor<T>(in ReadOnlyTensorSpan<T> x) 3778Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3802public static Tensor<T> Hypot<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 3805TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 3831public static Tensor<T> Ieee754Remainder<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 3834TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 3855public static Tensor<T> Ieee754Remainder<T>(in ReadOnlyTensorSpan<T> x, T y) 3858Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3878public static Tensor<T> Ieee754Remainder<T>(T x, in ReadOnlyTensorSpan<T> y) 3881Tensor<T> destination = Tensor.CreateUninitialized<T>(y.Lengths); 3902public static Tensor<int> ILogB<T>(in ReadOnlyTensorSpan<T> x) 3905Tensor<int> destination = Tensor.CreateUninitialized<int>(x.Lengths); 3974public static Tensor<T> LeadingZeroCount<T>(in ReadOnlyTensorSpan<T> x) 3977Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3998/// Takes the natural logarithm of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 4001public static Tensor<T> Log<T>(in ReadOnlyTensorSpan<T> x) 4004Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4025public static Tensor<T> Log<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4028TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 4048public static Tensor<T> Log<T>(in ReadOnlyTensorSpan<T> x, T y) 4051Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4071/// 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. 4074public static Tensor<T> Log10<T>(in ReadOnlyTensorSpan<T> x) 4077Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4098/// 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. 4101public static Tensor<T> Log10P1<T>(in ReadOnlyTensorSpan<T> x) 4104Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4125/// 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. 4128public static Tensor<T> Log2<T>(in ReadOnlyTensorSpan<T> x) 4131Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4152/// 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. 4155public static Tensor<T> Log2P1<T>(in ReadOnlyTensorSpan<T> x) 4158Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4179/// 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. 4182public static Tensor<T> LogP1<T>(in ReadOnlyTensorSpan<T> x) 4185Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4223public static Tensor<T> Max<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4226TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> output); 4246public static Tensor<T> Max<T>(in ReadOnlyTensorSpan<T> x, T y) 4249Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4286public static Tensor<T> MaxMagnitude<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4289TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4309public static Tensor<T> MaxMagnitude<T>(in ReadOnlyTensorSpan<T> x, T y) 4312Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4349public static Tensor<T> MaxMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4352TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4372public static Tensor<T> MaxMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, T y) 4375Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4412public static Tensor<T> MaxNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4415TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4435public static Tensor<T> MaxNumber<T>(in ReadOnlyTensorSpan<T> x, T y) 4438Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4475public static Tensor<T> Min<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4478TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> output); 4498public static Tensor<T> Min<T>(in ReadOnlyTensorSpan<T> x, T y) 4501Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4538public static Tensor<T> MinMagnitude<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4541TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4561public static Tensor<T> MinMagnitude<T>(in ReadOnlyTensorSpan<T> x, T y) 4564Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4601public static Tensor<T> MinMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4604TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4624public static Tensor<T> MinMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, T y) 4627Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4664public static Tensor<T> MinNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4667TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4687public static Tensor<T> MinNumber<T>(in ReadOnlyTensorSpan<T> x, T y) 4690Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4710/// Multiplies each element of <paramref name="x"/> with <paramref name="y"/> and returns a new <see cref="Tensor{T}"/> with the result. 4714public static Tensor<T> Multiply<T>(in ReadOnlyTensorSpan<T> x, T y) 4717Tensor<T> destination = Tensor.Create<T>(x.Lengths); 4723/// Multiplies each element of <paramref name="x"/> with <paramref name="y"/> and returns a new <see cref="Tensor{T}"/> with the result. 4728public static Tensor<T> Multiply<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4731TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 4769public static Tensor<T> Negate<T>(in ReadOnlyTensorSpan<T> x) 4772Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4806public static Tensor<T> OnesComplement<T>(in ReadOnlyTensorSpan<T> x) 4809Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4829public static Tensor<T> PopCount<T>(in ReadOnlyTensorSpan<T> x) 4832Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4853public static Tensor<T> Pow<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4856TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 4876public static Tensor<T> Pow<T>(in ReadOnlyTensorSpan<T> x, T y) 4879Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4899public static Tensor<T> Pow<T>(T x, in ReadOnlyTensorSpan<T> y) 4902Tensor<T> destination = Tensor.CreateUninitialized<T>(y.Lengths); 4935public static Tensor<T> RadiansToDegrees<T>(in ReadOnlyTensorSpan<T> x) 4938Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4958public static Tensor<T> Reciprocal<T>(in ReadOnlyTensorSpan<T> x) 4961Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4982public static Tensor<T> RootN<T>(in ReadOnlyTensorSpan<T> x, int n) 4985Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5008public static Tensor<T> RotateLeft<T>(in ReadOnlyTensorSpan<T> x, int rotateAmount) 5011Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5035public static Tensor<T> RotateRight<T>(in ReadOnlyTensorSpan<T> x, int rotateAmount) 5038Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5060public static Tensor<T> Round<T>(in ReadOnlyTensorSpan<T> x) 5063Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5083public static Tensor<T> Round<T>(in ReadOnlyTensorSpan<T> x, int digits, MidpointRounding mode) 5086Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5107public static Tensor<T> Round<T>(in ReadOnlyTensorSpan<T> x, int digits) 5110Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5130public static Tensor<T> Round<T>(in ReadOnlyTensorSpan<T> x, MidpointRounding mode) 5133Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5154public static Tensor<T> Sigmoid<T>(in ReadOnlyTensorSpan<T> x) 5157Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5176/// Takes the sin of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 5179public static Tensor<T> Sin<T>(in ReadOnlyTensorSpan<T> x) 5182Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5204public static Tensor<T> Sinh<T>(in ReadOnlyTensorSpan<T> x) 5207Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5227public static Tensor<T> SinPi<T>(in ReadOnlyTensorSpan<T> x) 5230Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5250public static Tensor<T> SoftMax<T>(in ReadOnlyTensorSpan<T> x) 5256Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5278/// Takes the square root of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 5281public static Tensor<T> Sqrt<T>(in ReadOnlyTensorSpan<T> x) 5284Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5323/// Subtracts <paramref name="y"/> from each element of <paramref name="x"/> and returns a new <see cref="Tensor{T}"/> with the result. 5327public static Tensor<T> Subtract<T>(in ReadOnlyTensorSpan<T> x, T y) 5330Tensor<T> destination = CreateUninitialized<T>(x.Lengths); 5336/// Subtracts each element of <paramref name="y"/> from <paramref name="x"/> and returns a new <see cref="Tensor{T}"/> with the result. 5340public static Tensor<T> Subtract<T>(T x, in ReadOnlyTensorSpan<T> y) 5343Tensor<T> destination = CreateUninitialized<T>(y.Lengths); 5349/// Subtracts each element of <paramref name="x"/> from <paramref name="y"/> and returns a new <see cref="Tensor{T}"/> with the result. 5353public static Tensor<T> Subtract<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 5356TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 5437public static Tensor<T> Tan<T>(in ReadOnlyTensorSpan<T> x) 5440Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5460public static Tensor<T> Tanh<T>(in ReadOnlyTensorSpan<T> x) 5463Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5483public static Tensor<T> TanPi<T>(in ReadOnlyTensorSpan<T> x) 5486Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5506public static Tensor<T> TrailingZeroCount<T>(in ReadOnlyTensorSpan<T> x) 5509Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5529public static Tensor<T> Truncate<T>(in ReadOnlyTensorSpan<T> x) 5532Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5553public static Tensor<T> Xor<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 5556TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 5574/// Computes the element-wise Xor of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 5578public static Tensor<T> Xor<T>(in ReadOnlyTensorSpan<T> x, T y) 5581Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths);
System\Numerics\Tensors\netcore\Tensor_1.cs (25)
20public sealed class Tensor<T> : ITensor<Tensor<T>, T> 23public static Tensor<T> Empty { get; } = new(); 138public Tensor<T> this[params ReadOnlySpan<NRange> ranges] 171public static implicit operator Tensor<T>(T[] array) => Tensor.Create(array); 176public static implicit operator TensorSpan<T>(Tensor<T> tensor) => tensor.AsTensorSpan(); 179public static implicit operator ReadOnlyTensorSpan<T>(Tensor<T> tensor) => tensor.AsReadOnlyTensorSpan(); 250public Tensor<T> Slice(params ReadOnlySpan<nint> startIndexes) 266public Tensor<T> Slice(params ReadOnlySpan<NIndex> startIndexes) 282public Tensor<T> Slice(params ReadOnlySpan<NRange> ranges) 298public Tensor<T> ToDenseTensor() 300Tensor<T> result = this; 321/// <returns>A <see cref="string"/> representation of the <see cref="Tensor{T}"/></returns> 357ref readonly T IReadOnlyTensor<Tensor<T>, T>.this[params ReadOnlySpan<nint> indexes] => ref this[indexes]; 359ref readonly T IReadOnlyTensor<Tensor<T>, T>.this[params ReadOnlySpan<NIndex> indexes] => ref this[indexes]; 362ref readonly T IReadOnlyTensor<Tensor<T>, T>.GetPinnableReference() => ref GetPinnableReference(); 396static Tensor<T> ITensor<Tensor<T>, T>.Create(scoped ReadOnlySpan<nint> lengths, bool pinned) => Tensor.Create<T>(lengths, pinned); 398static Tensor<T> ITensor<Tensor<T>, T>.Create(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned) => Tensor.Create<T>(lengths, strides, pinned); 400static Tensor<T> ITensor<Tensor<T>, T>.CreateUninitialized(scoped ReadOnlySpan<nint> lengths, bool pinned) => Tensor.Create<T>(lengths, pinned); 402static Tensor<T> ITensor<Tensor<T>, T>.CreateUninitialized(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned) => Tensor.Create<T>(lengths, strides, pinned); 407private readonly Tensor<T> _tensor; 412internal Enumerator(Tensor<T> tensor)
System\Numerics\Tensors\netcore\TensorOperation.cs (1)
359public static void ValidateCompatibility<TArg, TResult>(in ReadOnlyTensorSpan<TArg> x, in ReadOnlyTensorSpan<TArg> y, out Tensor<TResult> destination)