18 instantiations of Tensor
System.Numerics.Tensors (18)
System\Numerics\Tensors\netcore\Tensor.cs (14)
301=> new Tensor<T>(lengths, strides: [], pinned); 306=> new Tensor<T>(lengths, strides, pinned); 311=> new Tensor<T>(array); 316=> new Tensor<T>(array, lengths); 321=> new Tensor<T>(array, lengths, strides); 326=> new Tensor<T>(array, start, lengths, strides); 422return new Tensor<T>(array, in shape, pinned); 430return new Tensor<T>(values, in shape, pinned); 1402outTensor = new Tensor<T>(tensor._values, tensor._start, newLengths, newStrides, newLinearOrder); 1484return new Tensor<T>(tensor._values, tensor._start, lengths, strides); 1871outputs[i] = new Tensor<T>(values, 0, newShape, [], tensor._shape.LinearRankOrder); 1956Tensor<T> output = new Tensor<T>(tensor._values, tensor._start, lengths[..newRank], strides[..newRank], strideOrder[..newRank]); 2360Tensor<T> output = new Tensor<T>(tensor._values, tensor._start, lengths, strides, strideOrder); 2442Tensor<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(); 260return new Tensor<T>( 276return new Tensor<T>( 292return new Tensor<T>(
483 references to Tensor
System.Numerics.Tensors (483)
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); 300public static Tensor<T> Create<T>(scoped ReadOnlySpan<nint> lengths, bool pinned = false) 305public static Tensor<T> Create<T>(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned = false) 310public static Tensor<T> Create<T>(T[] array) 315public static Tensor<T> Create<T>(T[] array, scoped ReadOnlySpan<nint> lengths) 320public static Tensor<T> Create<T>(T[] array, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides) 325public static Tensor<T> Create<T>(T[] array, int start, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides) 329public static Tensor<T> Create<T>(IEnumerable<T> enumerable, bool pinned = false) 335Tensor<T> tensor = CreateUninitialized<T>([array.Length], pinned); 348public static Tensor<T> Create<T>(IEnumerable<T> enumerable, scoped ReadOnlySpan<nint> lengths, bool pinned = false) 353public static Tensor<T> Create<T>(IEnumerable<T> enumerable, scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned = false) 359Tensor<T> tensor = CreateUninitialized<T>(lengths, strides, pinned); 371/// Creates a <see cref="Tensor{T}"/> and initializes it with random data in a gaussian normal distribution. 374public static Tensor<T> CreateAndFillGaussianNormalDistribution<T>(scoped ReadOnlySpan<nint> lengths) 381/// Creates a <see cref="Tensor{T}"/> and initializes it with random data in a gaussian normal distribution. 385public static Tensor<T> CreateAndFillGaussianNormalDistribution<T>(Random random, scoped ReadOnlySpan<nint> lengths) 388Tensor<T> tensor = CreateUninitialized<T>(lengths); 395/// Creates a <see cref="Tensor{T}"/> and initializes it with random data uniformly distributed. 398public static Tensor<T> CreateAndFillUniformDistribution<T>(scoped ReadOnlySpan<nint> lengths) 405/// Creates a <see cref="Tensor{T}"/> and initializes it with random data uniformly distributed. 409public static Tensor<T> CreateAndFillUniformDistribution<T>(Random random, scoped ReadOnlySpan<nint> lengths) 412Tensor<T> tensor = CreateUninitialized<T>(lengths); 418public static Tensor<T> CreateUninitialized<T>(scoped ReadOnlySpan<nint> lengths, bool pinned = false) 426public static Tensor<T> CreateUninitialized<T>(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned = false) 485public static Tensor<bool> Equals<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 488TensorOperation.ValidateCompatibility(x, y, out Tensor<bool> destination); 516public static Tensor<bool> Equals<T>(in ReadOnlyTensorSpan<T> x, T y) 519Tensor<bool> destination = CreateUninitialized<bool>(x.Lengths); 605/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 619/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 634/// 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"/> 639/// <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 641public static Tensor<bool> GreaterThan<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 644TensorOperation.ValidateCompatibility(x, y, out Tensor<bool> destination); 652/// 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"/> 658/// <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 670/// 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><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 677public static Tensor<bool> GreaterThan<T>(in ReadOnlyTensorSpan<T> x, T y) 680Tensor<bool> destination = Tensor.Create<bool>(x.Lengths, false); 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"/> 693/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 705/// 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"/> 712public static Tensor<bool> GreaterThan<T>(T x, in ReadOnlyTensorSpan<T> y) 717/// 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"/> 723/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 815/// 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"/> 820/// <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 822public static Tensor<bool> GreaterThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 825TensorOperation.ValidateCompatibility(x, y, out Tensor<bool> destination); 833/// 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"/> 839/// <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 851/// 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><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 858public static Tensor<bool> GreaterThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, T y) 861Tensor<bool> destination = Tensor.Create<bool>(x.Lengths, false); 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"/> 874/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 886/// 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"/> 893public static Tensor<bool> GreaterThanOrEqual<T>(T x, in ReadOnlyTensorSpan<T> y) 898/// 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"/> 904/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are greater than <paramref name="y"/> 996/// 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"/> 1001/// <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 1003public static Tensor<bool> LessThan<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 1006TensorOperation.ValidateCompatibility(x, y, out Tensor<bool> destination); 1014/// 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"/> 1020/// <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 1031/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1032/// 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"/> 1035/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 1037/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1039public static Tensor<bool> LessThan<T>(in ReadOnlyTensorSpan<T> x, T y) 1042Tensor<bool> destination = Tensor.Create<bool>(x.Lengths, false); 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> 1055/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1066/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1067/// 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"/> 1070/// <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"/> 1074public static Tensor<bool> LessThan<T>(T x, in ReadOnlyTensorSpan<T> y) 1078/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1079/// 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"/> 1082/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 1085/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1177/// 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"/> 1182/// <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 1184public static Tensor<bool> LessThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 1187TensorOperation.ValidateCompatibility(x, y, out Tensor<bool> destination); 1195/// 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"/> 1201/// <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 1212/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1213/// 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"/> 1216/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 1218/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1220public static Tensor<bool> LessThanOrEqual<T>(in ReadOnlyTensorSpan<T> x, T y) 1223Tensor<bool> destination = Tensor.Create<bool>(x.Lengths, false); 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> 1236/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1247/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1248/// 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"/> 1251/// <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"/> 1255public static Tensor<bool> LessThanOrEqual<T>(T x, in ReadOnlyTensorSpan<T> y) 1259/// Compares the elements of a <see cref="Tensor{T}"/> to see which elements are less than <paramref name="y"/>. 1260/// 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"/> 1263/// <param name="x"><see cref="Tensor{T}"/> to compare.</param> 1266/// <returns><see cref="Tensor{Boolean}"/> where the value is true if the elements in <paramref name="x"/> are less than <paramref name="y"/> 1358/// If <paramref name="tensor"/> is a 1D tensor, it will return <paramref name="tensor"/>. Otherwise it creates a new <see cref="Tensor{T}"/> 1361/// <param name="tensor">Input <see cref="Tensor{T}"/></param> 1363public static Tensor<T> PermuteDimensions<T>(this Tensor<T> tensor, ReadOnlySpan<int> dimensions) 1378Tensor<T> outTensor; 1419/// <param name="tensor"><see cref="Tensor{T}"/> you want to reshape.</param> 1421public static Tensor<T> Reshape<T>(this Tensor<T> tensor, ReadOnlySpan<nint> lengths) 1641/// 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 1644/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1646public static Tensor<T> Resize<T>(Tensor<T> tensor, ReadOnlySpan<nint> lengths) 1650Tensor<T> output = Tensor.Create(values, 0, lengths, []); 1665/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1667public static void ResizeTo<T>(scoped in Tensor<T> tensor, in TensorSpan<T> destination) 1704/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1705public static Tensor<T> Reverse<T>(in ReadOnlyTensorSpan<T> tensor) 1707Tensor<T> output = Tensor.Create<T>(tensor.Lengths); 1717/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1719public static Tensor<T> ReverseDimension<T>(in ReadOnlyTensorSpan<T> tensor, int dimension) 1721Tensor<T> output = Tensor.Create<T>(tensor.Lengths); 1809/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1812public static Tensor<T> SetSlice<T>(this Tensor<T> tensor, in ReadOnlyTensorSpan<T> values, params ReadOnlySpan<NRange> ranges) 1821/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1840/// Split a <see cref="Tensor{T}"/> into <paramref name="splitCount"/> along the given <paramref name="dimension"/>. If the tensor cannot be split 1843/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 1846public static Tensor<T>[] Split<T>(scoped in ReadOnlyTensorSpan<T> tensor, int splitCount, nint dimension) 1853Tensor<T>[] outputs = new Tensor<T>[splitCount]; 1886/// <param name="tensor">The <see cref="Tensor{T}"/> to remove all dimensions of length 1.</param> 1887public static Tensor<T> Squeeze<T>(this Tensor<T> tensor) 1896/// <param name="tensor">The <see cref="Tensor{T}"/> to remove dimension of length 1.</param> 1898public static Tensor<T> SqueezeDimension<T>(this Tensor<T> tensor, int dimension) 1956Tensor<T> output = new Tensor<T>(tensor._values, tensor._start, lengths[..newRank], strides[..newRank], strideOrder[..newRank]); 2157/// Join multiple <see cref="Tensor{T}"/> along a new dimension that is added at position 0. All tensors must have the same shape. 2159/// <param name="tensors">Input <see cref="Tensor{T}"/>.</param> 2160public static Tensor<T> Stack<T>(params ReadOnlySpan<Tensor<T>> tensors) 2166/// 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. 2168/// <param name="tensors">Input <see cref="Tensor{T}"/>.</param> 2170public static Tensor<T> StackAlongDimension<T>(int dimension, params ReadOnlySpan<Tensor<T>> tensors) 2186Tensor<T>[] outputs = new Tensor<T>[tensors.Length]; 2195/// Join multiple <see cref="Tensor{T}"/> along a new dimension that is added at position 0. All tensors must have the same shape. 2197/// <param name="tensors">Input <see cref="Tensor{T}"/>.</param> 2199public static ref readonly TensorSpan<T> Stack<T>(scoped in ReadOnlySpan<Tensor<T>> tensors, in TensorSpan<T> destination) 2205/// 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. 2207/// <param name="tensors">Input <see cref="Tensor{T}"/>.</param> 2210public static ref readonly TensorSpan<T> StackAlongDimension<T>(scoped ReadOnlySpan<Tensor<T>> tensors, in TensorSpan<T> destination, int dimension) 2226Tensor<T>[] outputs = new Tensor<T>[tensors.Length]; 2320/// Creates a <see cref="string"/> representation of the <see cref="Tensor{T}"/>."/> 2325public static string ToString<T>(this Tensor<T> tensor, ReadOnlySpan<nint> maximumLengths) 2334/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 2335public static Tensor<T> Transpose<T>(Tensor<T> tensor) 2360Tensor<T> output = new Tensor<T>(tensor._values, tensor._start, lengths, strides, strideOrder); 2375/// <param name="tensor">Input <see cref="Tensor{T}"/>.</param> 2377public static bool TryBroadcastTo<T>(this Tensor<T> tensor, in TensorSpan<T> destination) 2414/// <param name="tensor">The <see cref="Tensor{T}"/> to add a dimension of length 1.</param> 2416public static Tensor<T> Unsqueeze<T>(this Tensor<T> tensor, int dimension) 2442Tensor<T> output = new Tensor<T>(tensor._values, tensor._start, newLengths, newStrides); 2526/// Takes the absolute value of each element of the <see cref="Tensor{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2529public static Tensor<T> Abs<T>(in ReadOnlyTensorSpan<T> x) 2532Tensor<T> destination = CreateUninitialized<T>(x.Lengths); 2553/// Takes the inverse cosine of each element of the <see cref="Tensor{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2556public static Tensor<T> Acos<T>(in ReadOnlyTensorSpan<T> x) 2559Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2565/// Takes the inverse cosine of each element of the <see cref="Tensor{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2580/// 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. 2583public static Tensor<T> Acosh<T>(in ReadOnlyTensorSpan<T> x) 2586Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2607/// 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. 2610public static Tensor<T> AcosPi<T>(in ReadOnlyTensorSpan<T> x) 2613Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2634/// 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. 2638public static Tensor<T> Add<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 2641TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 2647/// Adds <paramref name="y"/> to each element of <paramref name="x"/> and returns a new <see cref="Tensor{T}"/> with the result. 2651public static Tensor<T> Add<T>(in ReadOnlyTensorSpan<T> x, T y) 2654Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2690/// Takes the inverse sin of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2693public static Tensor<T> Asin<T>(in ReadOnlyTensorSpan<T> x) 2696Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2717/// 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. 2720public static Tensor<T> Asinh<T>(in ReadOnlyTensorSpan<T> x) 2723Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2744/// 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. 2747public static Tensor<T> AsinPi<T>(in ReadOnlyTensorSpan<T> x) 2750Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2771/// Takes the arc tangent of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2774public static Tensor<T> Atan<T>(in ReadOnlyTensorSpan<T> x) 2777Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2798/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2802public static Tensor<T> Atan2<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 2805Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2825/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2829public static Tensor<T> Atan2<T>(in ReadOnlyTensorSpan<T> x, T y) 2832Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2852/// Takes the arc tangent of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 2856public static Tensor<T> Atan2<T>(T x, in ReadOnlyTensorSpan<T> y) 2859Tensor<T> destination = Tensor.CreateUninitialized<T>(y.Lengths); 2881/// 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. 2885public static Tensor<T> Atan2Pi<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 2888Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2912public static Tensor<T> Atan2Pi<T>(in ReadOnlyTensorSpan<T> x, T y) 2915Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2939public static Tensor<T> Atan2Pi<T>(T x, in ReadOnlyTensorSpan<T> y) 2942Tensor<T> destination = Tensor.CreateUninitialized<T>(y.Lengths); 2964/// 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. 2967public static Tensor<T> Atanh<T>(in ReadOnlyTensorSpan<T> x) 2970Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 2991/// 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. 2994public static Tensor<T> AtanPi<T>(in ReadOnlyTensorSpan<T> x) 2997Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3035/// 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. 3039public static Tensor<T> BitwiseAnd<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 3042Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3062/// 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. 3066public static Tensor<T> BitwiseAnd<T>(in ReadOnlyTensorSpan<T> x, T y) 3069Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3091/// 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. 3095public static Tensor<T> BitwiseOr<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 3098Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3118/// 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. 3122public static Tensor<T> BitwiseOr<T>(in ReadOnlyTensorSpan<T> x, T y) 3125Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3147/// Computes the element-wise cube root of the input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3150public static Tensor<T> Cbrt<T>(in ReadOnlyTensorSpan<T> x) 3153Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3174/// Computes the element-wise ceiling of the input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3177public static Tensor<T> Ceiling<T>(in ReadOnlyTensorSpan<T> x) 3180Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3205public static Tensor<TTo> ConvertChecked<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source) 3209Tensor<TTo> destination = Tensor.CreateUninitialized<TTo>(source.Lengths); 3236public static Tensor<TTo> ConvertSaturating<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source) 3240Tensor<TTo> destination = Tensor.CreateUninitialized<TTo>(source.Lengths); 3267public static Tensor<TTo> ConvertTruncating<TFrom, TTo>(in ReadOnlyTensorSpan<TFrom> source) 3271Tensor<TTo> destination = Tensor.CreateUninitialized<TTo>(source.Lengths); 3298public static Tensor<T> CopySign<T>(in ReadOnlyTensorSpan<T> x, T sign) 3301Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3307/// 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. 3311public static Tensor<T> CopySign<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> sign) 3314Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3350/// Takes the cosine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3353public static Tensor<T> Cos<T>(in ReadOnlyTensorSpan<T> x) 3356Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3377/// Takes the hyperbolic cosine of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3380public static Tensor<T> Cosh<T>(in ReadOnlyTensorSpan<T> x) 3383Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3419/// <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> 3433public static Tensor<T> CosPi<T>(in ReadOnlyTensorSpan<T> x) 3436Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3470public static Tensor<T> DegreesToRadians<T>(in ReadOnlyTensorSpan<T> x) 3473Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3510/// Divides each element of <paramref name="x"/> by <paramref name="y"/> and returns a new <see cref="Tensor{T}"/> with the result. 3514public static Tensor<T> Divide<T>(in ReadOnlyTensorSpan<T> x, T y) 3517Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3523/// Divides <paramref name="x"/> by each element of <paramref name="y"/> and returns a new <see cref="Tensor{T}"/> with the result."/> 3527public static Tensor<T> Divide<T>(T x, in ReadOnlyTensorSpan<T> y) 3530Tensor<T> destination = Tensor.CreateUninitialized<T>(y.Lengths); 3541public static Tensor<T> Divide<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 3544TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 3614public static Tensor<T> Exp<T>(in ReadOnlyTensorSpan<T> x) 3617Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3641public static Tensor<T> Exp10<T>(in ReadOnlyTensorSpan<T> x) 3644Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3666public static Tensor<T> Exp10M1<T>(in ReadOnlyTensorSpan<T> x) 3669Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3689public static Tensor<T> Exp2<T>(in ReadOnlyTensorSpan<T> x) 3692Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3712public static Tensor<T> Exp2M1<T>(in ReadOnlyTensorSpan<T> x) 3715Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3735public static Tensor<T> ExpM1<T>(in ReadOnlyTensorSpan<T> x) 3738Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3758public static Tensor<T> Floor<T>(in ReadOnlyTensorSpan<T> x) 3761Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3785public static Tensor<T> Hypot<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 3788TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 3814public static Tensor<T> Ieee754Remainder<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 3817TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 3838public static Tensor<T> Ieee754Remainder<T>(in ReadOnlyTensorSpan<T> x, T y) 3841Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3861public static Tensor<T> Ieee754Remainder<T>(T x, in ReadOnlyTensorSpan<T> y) 3864Tensor<T> destination = Tensor.CreateUninitialized<T>(y.Lengths); 3885public static Tensor<int> ILogB<T>(in ReadOnlyTensorSpan<T> x) 3888Tensor<int> destination = Tensor.CreateUninitialized<int>(x.Lengths); 3957public static Tensor<T> LeadingZeroCount<T>(in ReadOnlyTensorSpan<T> x) 3960Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 3981/// Takes the natural logarithm of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 3984public static Tensor<T> Log<T>(in ReadOnlyTensorSpan<T> x) 3987Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4008public static Tensor<T> Log<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4011TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 4031public static Tensor<T> Log<T>(in ReadOnlyTensorSpan<T> x, T y) 4034Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4054/// 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. 4057public static Tensor<T> Log10<T>(in ReadOnlyTensorSpan<T> x) 4060Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4081/// 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. 4084public static Tensor<T> Log10P1<T>(in ReadOnlyTensorSpan<T> x) 4087Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4108/// 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. 4111public static Tensor<T> Log2<T>(in ReadOnlyTensorSpan<T> x) 4114Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4135/// 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. 4138public static Tensor<T> Log2P1<T>(in ReadOnlyTensorSpan<T> x) 4141Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4162/// 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. 4165public static Tensor<T> LogP1<T>(in ReadOnlyTensorSpan<T> x) 4168Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4206public static Tensor<T> Max<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4209TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> output); 4229public static Tensor<T> Max<T>(in ReadOnlyTensorSpan<T> x, T y) 4232Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4269public static Tensor<T> MaxMagnitude<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4272TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4292public static Tensor<T> MaxMagnitude<T>(in ReadOnlyTensorSpan<T> x, T y) 4295Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4332public static Tensor<T> MaxMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4335TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4355public static Tensor<T> MaxMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, T y) 4358Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4395public static Tensor<T> MaxNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4398TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4418public static Tensor<T> MaxNumber<T>(in ReadOnlyTensorSpan<T> x, T y) 4421Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4458public static Tensor<T> Min<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4461TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> output); 4481public static Tensor<T> Min<T>(in ReadOnlyTensorSpan<T> x, T y) 4484Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4521public static Tensor<T> MinMagnitude<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4524TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4544public static Tensor<T> MinMagnitude<T>(in ReadOnlyTensorSpan<T> x, T y) 4547Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4584public static Tensor<T> MinMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4587TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4607public static Tensor<T> MinMagnitudeNumber<T>(in ReadOnlyTensorSpan<T> x, T y) 4610Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4647public static Tensor<T> MinNumber<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4650TensorOperation.ValidateCompatibility(in x, in y, out Tensor<T> destination); 4670public static Tensor<T> MinNumber<T>(in ReadOnlyTensorSpan<T> x, T y) 4673Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4693/// Multiplies each element of <paramref name="x"/> with <paramref name="y"/> and returns a new <see cref="Tensor{T}"/> with the result. 4697public static Tensor<T> Multiply<T>(in ReadOnlyTensorSpan<T> x, T y) 4700Tensor<T> destination = Tensor.Create<T>(x.Lengths); 4706/// Multiplies each element of <paramref name="x"/> with <paramref name="y"/> and returns a new <see cref="Tensor{T}"/> with the result. 4711public static Tensor<T> Multiply<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4714TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 4752public static Tensor<T> Negate<T>(in ReadOnlyTensorSpan<T> x) 4755Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4789public static Tensor<T> OnesComplement<T>(in ReadOnlyTensorSpan<T> x) 4792Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4812public static Tensor<T> PopCount<T>(in ReadOnlyTensorSpan<T> x) 4815Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4836public static Tensor<T> Pow<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 4839TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 4859public static Tensor<T> Pow<T>(in ReadOnlyTensorSpan<T> x, T y) 4862Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4882public static Tensor<T> Pow<T>(T x, in ReadOnlyTensorSpan<T> y) 4885Tensor<T> destination = Tensor.CreateUninitialized<T>(y.Lengths); 4918public static Tensor<T> RadiansToDegrees<T>(in ReadOnlyTensorSpan<T> x) 4921Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4941public static Tensor<T> Reciprocal<T>(in ReadOnlyTensorSpan<T> x) 4944Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4965public static Tensor<T> RootN<T>(in ReadOnlyTensorSpan<T> x, int n) 4968Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 4991public static Tensor<T> RotateLeft<T>(in ReadOnlyTensorSpan<T> x, int rotateAmount) 4994Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5018public static Tensor<T> RotateRight<T>(in ReadOnlyTensorSpan<T> x, int rotateAmount) 5021Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5043public static Tensor<T> Round<T>(in ReadOnlyTensorSpan<T> x) 5046Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5066public static Tensor<T> Round<T>(in ReadOnlyTensorSpan<T> x, int digits, MidpointRounding mode) 5069Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5090public static Tensor<T> Round<T>(in ReadOnlyTensorSpan<T> x, int digits) 5093Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5113public static Tensor<T> Round<T>(in ReadOnlyTensorSpan<T> x, MidpointRounding mode) 5116Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5137public static Tensor<T> Sigmoid<T>(in ReadOnlyTensorSpan<T> x) 5140Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5159/// Takes the sin of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 5162public static Tensor<T> Sin<T>(in ReadOnlyTensorSpan<T> x) 5165Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5187public static Tensor<T> Sinh<T>(in ReadOnlyTensorSpan<T> x) 5190Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5210public static Tensor<T> SinPi<T>(in ReadOnlyTensorSpan<T> x) 5213Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5233public static Tensor<T> SoftMax<T>(in ReadOnlyTensorSpan<T> x) 5239Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5261/// Takes the square root of each element of the <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 5264public static Tensor<T> Sqrt<T>(in ReadOnlyTensorSpan<T> x) 5267Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5306/// Subtracts <paramref name="y"/> from each element of <paramref name="x"/> and returns a new <see cref="Tensor{T}"/> with the result. 5310public static Tensor<T> Subtract<T>(in ReadOnlyTensorSpan<T> x, T y) 5313Tensor<T> destination = CreateUninitialized<T>(x.Lengths); 5319/// Subtracts each element of <paramref name="y"/> from <paramref name="x"/> and returns a new <see cref="Tensor{T}"/> with the result. 5323public static Tensor<T> Subtract<T>(T x, in ReadOnlyTensorSpan<T> y) 5326Tensor<T> destination = CreateUninitialized<T>(y.Lengths); 5332/// Subtracts each element of <paramref name="x"/> from <paramref name="y"/> and returns a new <see cref="Tensor{T}"/> with the result. 5336public static Tensor<T> Subtract<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 5339TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 5420public static Tensor<T> Tan<T>(in ReadOnlyTensorSpan<T> x) 5423Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5443public static Tensor<T> Tanh<T>(in ReadOnlyTensorSpan<T> x) 5446Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5466public static Tensor<T> TanPi<T>(in ReadOnlyTensorSpan<T> x) 5469Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5489public static Tensor<T> TrailingZeroCount<T>(in ReadOnlyTensorSpan<T> x) 5492Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5512public static Tensor<T> Truncate<T>(in ReadOnlyTensorSpan<T> x) 5515Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths); 5536public static Tensor<T> Xor<T>(in ReadOnlyTensorSpan<T> x, in ReadOnlyTensorSpan<T> y) 5539TensorOperation.ValidateCompatibility(x, y, out Tensor<T> destination); 5557/// Computes the element-wise Xor of the two input <see cref="ReadOnlyTensorSpan{T}"/> and returns a new <see cref="Tensor{T}"/> with the result. 5561public static Tensor<T> Xor<T>(in ReadOnlyTensorSpan<T> x, T y) 5564Tensor<T> destination = Tensor.CreateUninitialized<T>(x.Lengths);
System\Numerics\Tensors\netcore\Tensor_1.cs (26)
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(); 253public Tensor<T> Slice(params ReadOnlySpan<nint> startIndexes) 269public Tensor<T> Slice(params ReadOnlySpan<NIndex> startIndexes) 285public Tensor<T> Slice(params ReadOnlySpan<NRange> ranges) 301public Tensor<T> ToDenseTensor() 303Tensor<T> result = this; 324/// <returns>A <see cref="string"/> representation of the <see cref="Tensor{T}"/></returns> 360ref readonly T IReadOnlyTensor<Tensor<T>, T>.this[params ReadOnlySpan<nint> indexes] => ref this[indexes]; 362ref readonly T IReadOnlyTensor<Tensor<T>, T>.this[params ReadOnlySpan<NIndex> indexes] => ref this[indexes]; 364ReadOnlyTensorDimensionSpan<T> IReadOnlyTensor<Tensor<T>, T>.GetDimensionSpan(int dimension) => AsReadOnlyTensorSpan().GetDimensionSpan(dimension); 366ref readonly T IReadOnlyTensor<Tensor<T>, T>.GetPinnableReference() => ref GetPinnableReference(); 400static Tensor<T> ITensor<Tensor<T>, T>.Create(scoped ReadOnlySpan<nint> lengths, bool pinned) => Tensor.Create<T>(lengths, pinned); 402static Tensor<T> ITensor<Tensor<T>, T>.Create(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned) => Tensor.Create<T>(lengths, strides, pinned); 404static Tensor<T> ITensor<Tensor<T>, T>.CreateUninitialized(scoped ReadOnlySpan<nint> lengths, bool pinned) => Tensor.Create<T>(lengths, pinned); 406static Tensor<T> ITensor<Tensor<T>, T>.CreateUninitialized(scoped ReadOnlySpan<nint> lengths, scoped ReadOnlySpan<nint> strides, bool pinned) => Tensor.Create<T>(lengths, strides, pinned); 411private readonly Tensor<T> _tensor; 416internal 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)