System.Numerics.Tensors Performs primitive tensor operations over spans of memory. Performs primitive tensor operations over spans of memory. Computes the element-wise absolute value of each single-precision floating-point number in the specified tensor. The tensor, represented as a span. The destination tensor, represented as a span. Destination is too short. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = MathF.Abs([i]). The absolute value of a is its numeric value without its sign. For example, the absolute value of both 1.2e-03 and -1.2e03 is 1.2e03. If a value is equal to or , the result stored into the corresponding destination location is set to . If a value is equal to , the result stored into the corresponding destination location is the original NaN value with the sign bit removed. Computes the element-wise addition of single-precision floating-point numbers in the specified tensors. The first tensor, represented as a span. The second tensor, represented as a span. The destination tensor, represented as a span. Length of must be same as length of . Destination is too short. and reference overlapping memory locations and do not begin at the same location. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = [i] + [i]. If either of the element-wise input values is equal to , the resulting element-wise value is also NaN. Computes the element-wise addition of single-precision floating-point numbers in the specified tensors. The first tensor, represented as a span. The second tensor, represented as a scalar. The destination tensor, represented as a span. Destination is too short. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = [i] + . If either of the element-wise input values is equal to , the resulting element-wise value is also NaN. Computes the element-wise result of ( + ) * for the specified tensors. The first tensor, represented as a span. The second tensor, represented as a span. The third tensor, represented as a span. The destination tensor, represented as a span. Length of must be same as length of and the length of . Destination is too short. and reference overlapping memory locations and do not begin at the same location. and reference overlapping memory locations and do not begin at the same location. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = ([i] + [i]) * [i]. If any of the element-wise input values is equal to , the resulting element-wise value is also NaN. Computes the element-wise result of ( + ) * for the specified tensors. The first tensor, represented as a span. The second tensor, represented as a span. The third tensor, represented as a scalar. The destination tensor, represented as a span. Length of must be same as length of . Destination is too short. and reference overlapping memory locations and do not begin at the same location. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = ([i] + [i]) * . If any of the element-wise input values is equal to , the resulting element-wise value is also NaN. Computes the element-wise result of ( + ) * for the specified tensors. The first tensor, represented as a span. The second tensor, represented as a scalar. The third tensor, represented as a span. The destination tensor, represented as a span. Length of must be same as length of . Destination is too short. and reference overlapping memory locations and do not begin at the same location. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = ([i] + ) * [i]. If any of the element-wise input values is equal to , the resulting element-wise value is also NaN. Computes the element-wise hyperbolic cosine of each single-precision floating-point radian angle in the specified tensor. The tensor, represented as a span. The destination tensor, represented as a span. Destination is too short. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = .Cosh([i]). If a value is equal to or , the result stored into the corresponding destination location is set to . If a value is equal to , the result stored into the corresponding destination location is also NaN. The angles in x must be in radians. Use or multiply by /180 to convert degrees to radians. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the cosine similarity between the two specified non-empty, equal-length tensors of single-precision floating-point numbers. The first tensor, represented as a span. The second tensor, represented as a span. The cosine similarity of the two tensors. Length of must be same as length of . and must not be empty. This method effectively computes TensorPrimitives.Dot(x, y) / (MathF.Sqrt(TensorPrimitives.SumOfSquares(x)) * MathF.Sqrt(TensorPrimitives.SumOfSquares(y)). If any element in either input tensor is equal to , , or , NaN is returned. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the distance between two points, specified as non-empty, equal-length tensors of single-precision floating-point numbers, in Euclidean space. The first tensor, represented as a span. The second tensor, represented as a span. The Euclidean distance. Length of must be same as length of . and must not be empty. This method effectively computes the equivalent of: Span<float> difference = ...; TensorPrimitives.Subtract(x, y, difference); float result = MathF.Sqrt(TensorPrimitives.SumOfSquares(difference)); but without requiring additional temporary storage for the intermediate differences. If any element in either input tensor is equal to , NaN is returned. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the element-wise division of single-precision floating-point numbers in the specified tensors. The first tensor, represented as a span. The second tensor, represented as a span. The destination tensor, represented as a span. Length of must be same as length of . Destination is too short. and reference overlapping memory locations and do not begin at the same location. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = [i] / [i]. If either of the element-wise input values is equal to , the resulting element-wise value is also NaN. Computes the element-wise division of single-precision floating-point numbers in the specified tensors. The first tensor, represented as a span. The second tensor, represented as a scalar. The destination tensor, represented as a span. Destination is too short. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = [i] / . If either of the element-wise input values is equal to , the resulting element-wise value is also NaN. Computes the dot product of two tensors containing single-precision floating-point numbers. The first tensor, represented as a span. The second tensor, represented as a span. The dot product. Length of must be same as length of . This method effectively computes the equivalent of: Span<float> products = ...; TensorPrimitives.Multiply(x, y, products); float result = TensorPrimitives.Sum(products); but without requiring additional temporary storage for the intermediate products. It corresponds to the dot method defined by BLAS1. If any of the input elements is equal to , the resulting value is also NaN. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the element-wise result of raising e to the single-precision floating-point number powers in the specified tensor. The tensor, represented as a span. The destination tensor, represented as a span. Destination is too short. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = .Exp([i]). If a value equals or , the result stored into the corresponding destination location is set to NaN. If a value equals , the result stored into the corresponding destination location is set to 0. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Searches for the index of the largest single-precision floating-point number in the specified tensor. The tensor, represented as a span. The index of the maximum element in , or -1 if is empty. The determination of the maximum element matches the IEEE 754:2019 `maximum` function. If any value equal to is present, the index of the first is returned. Positive 0 is considered greater than negative 0. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Searches for the index of the single-precision floating-point number with the largest magnitude in the specified tensor. The tensor, represented as a span. The index of the element in with the largest magnitude (absolute value), or -1 if is empty. The determination of the maximum magnitude matches the IEEE 754:2019 `maximumMagnitude` function. If any value equal to is present, the index of the first is returned. If two values have the same magnitude and one is positive and the other is negative, the positive value is considered to have the larger magnitude. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Searches for the index of the smallest single-precision floating-point number in the specified tensor. The tensor, represented as a span. The index of the minimum element in , or -1 if is empty. The determination of the minimum element matches the IEEE 754:2019 `minimum` function. If any value equal to is present, the index of the first is returned. Negative 0 is considered smaller than positive 0. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Searches for the index of the single-precision floating-point number with the smallest magnitude in the specified tensor. The tensor, represented as a span. The index of the element in with the smallest magnitude (absolute value), or -1 if is empty. The determination of the minimum magnitude matches the IEEE 754:2019 `minimumMagnitude` function. If any value equal to is present, the index of the first is returned. If two values have the same magnitude and one is positive and the other is negative, the negative value is considered to have the smaller magnitude. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the element-wise natural (base e) logarithm of single-precision floating-point numbers in the specified tensor. The tensor, represented as a span. The destination tensor, represented as a span. Destination is too short. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = .Log([i]). If a value equals 0, the result stored into the corresponding destination location is set to . If a value is negative or equal to , the result stored into the corresponding destination location is set to NaN. If a value is positive infinity, the result stored into the corresponding destination location is set to . Otherwise, if a value is positive, its natural logarithm is stored into the corresponding destination location. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the element-wise base 2 logarithm of single-precision floating-point numbers in the specified tensor. The tensor, represented as a span. The destination tensor, represented as a span. Destination is too short. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = .Log2([i]). If a value equals 0, the result stored into the corresponding destination location is set to . If a value is negative or equal to , the result stored into the corresponding destination location is set to NaN. If a value is positive infinity, the result stored into the corresponding destination location is set to . Otherwise, if a value is positive, its natural logarithm is stored into the corresponding destination location. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Searches for the largest single-precision floating-point number in the specified tensor. The tensor, represented as a span. The maximum element in . Length of must be greater than zero. The determination of the maximum element matches the IEEE 754:2019 `maximum` function. If any value equal to is present, the first is returned. Positive 0 is considered greater than negative 0. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the element-wise maximum of the single-precision floating-point numbers in the specified tensors. The first tensor, represented as a span. The second tensor, represented as a span. The destination tensor, represented as a span. Length of must be same as length of . Destination is too short. and reference overlapping memory locations and do not begin at the same location. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = MathF.Max([i], [i]). The determination of the maximum element matches the IEEE 754:2019 `maximum` function. If either value is equal to , that value is stored as the result. Positive 0 is considered greater than negative 0. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Searches for the single-precision floating-point number with the largest magnitude in the specified tensor. The tensor, represented as a span. The element in with the largest magnitude (absolute value). Length of must be greater than zero. The determination of the maximum magnitude matches the IEEE 754:2019 `maximumMagnitude` function. If any value equal to is present, the first is returned. If two values have the same magnitude and one is positive and the other is negative, the positive value is considered to have the larger magnitude. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the element-wise single-precision floating-point number with the largest magnitude in the specified tensors. The first tensor, represented as a span. The second tensor, represented as a span. The destination tensor, represented as a span. Length of must be same as length of . Destination is too short. and reference overlapping memory locations and do not begin at the same location. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = MathF.MaxMagnitude([i], [i]). This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Searches for the smallest single-precision floating-point number in the specified tensor. The tensor, represented as a span. The minimum element in . Length of must be greater than zero. The determination of the minimum element matches the IEEE 754:2019 `minimum` function. If any value is equal to is present, the first is returned. Negative 0 is considered smaller than positive 0. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the element-wise minimum of the single-precision floating-point numbers in the specified tensors. The first tensor, represented as a span. The second tensor, represented as a span. The destination tensor, represented as a span. Length of must be same as length of . Destination is too short. and reference overlapping memory locations and do not begin at the same location. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = MathF.Max([i], [i]). The determination of the maximum element matches the IEEE 754:2019 `maximum` function. If either value is equal to , that value is stored as the result. Positive 0 is considered greater than negative 0. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Searches for the single-precision floating-point number with the smallest magnitude in the specified tensor. The tensor, represented as a span. The element in with the smallest magnitude (absolute value). Length of must be greater than zero. The determination of the minimum magnitude matches the IEEE 754:2019 `minimumMagnitude` function. If any value equal to is present, the first is returned. If two values have the same magnitude and one is positive and the other is negative, the negative value is considered to have the smaller magnitude. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the element-wise single-precision floating-point number with the smallest magnitude in the specified tensors. The first tensor, represented as a span. The second tensor, represented as a span. The destination tensor, represented as a span. Length of must be same as length of . Destination is too short. and reference overlapping memory locations and do not begin at the same location. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = MathF.MinMagnitude([i], [i]). The determination of the maximum magnitude matches the IEEE 754:2019 `minimumMagnitude` function. If either value is equal to , that value is stored as the result. If the two values have the same magnitude and one is positive and the other is negative, the negative value is considered to have the smaller magnitude. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the element-wise product of single-precision floating-point numbers in the specified tensors. The first tensor, represented as a span. The second tensor, represented as a span. The destination tensor, represented as a span. Length of must be same as length of . Destination is too short. and reference overlapping memory locations and do not begin at the same location. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = [i] * [i]. If either of the element-wise input values is equal to , the resulting element-wise value is also NaN. Computes the element-wise product of single-precision floating-point numbers in the specified tensors. The first tensor, represented as a span. The second tensor, represented as a scalar. The destination tensor, represented as a span. Destination is too short. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = [i] * . It corresponds to the scal method defined by BLAS1. If either of the element-wise input values is equal to , the resulting element-wise value is also NaN. Computes the element-wise result of ( * ) + for the specified tensors of single-precision floating-point numbers. The first tensor, represented as a span. The second tensor, represented as a span. The third tensor, represented as a span. The destination tensor, represented as a span. Length of must be same as length of and length of . Destination is too short. and reference overlapping memory locations and do not begin at the same location. and reference overlapping memory locations and do not begin at the same location. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = ([i] * [i]) + [i]. If either of the element-wise input values is equal to , the resulting element-wise value is also NaN. Computes the element-wise result of ( * ) + for the specified tensors of single-precision floating-point numbers. The first tensor, represented as a span. The second tensor, represented as a span. The third tensor, represented as a scalar. The destination tensor, represented as a span. Length of must be same as length of . Destination is too short. and reference overlapping memory locations and do not begin at the same location. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = ([i] * [i]) + . It corresponds to the axpy method defined by BLAS1. If either of the element-wise input values is equal to , the resulting element-wise value is also NaN. Computes the element-wise result of ( * ) + for the specified tensors of single-precision floating-point numbers. The first tensor, represented as a span. The second tensor, represented as a scalar. The third tensor, represented as a span. The destination tensor, represented as a span. Length of must be same as length of . Destination is too short. and reference overlapping memory locations and do not begin at the same location. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = ([i] * ) + [i]. If either of the element-wise input values is equal to , the resulting element-wise value is also NaN. Computes the element-wise negation of each single-precision floating-point number in the specified tensor. The tensor, represented as a span. The destination tensor, represented as a span. Destination is too short. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = -[i]. If any of the element-wise input values is equal to , the resulting element-wise value is also NaN. Computes the Euclidean norm of the specified tensor of single-precision floating-point numbers. The first tensor, represented as a span. The norm. This method effectively computes MathF.Sqrt(TensorPrimitives.SumOfSquares(x)). This is often referred to as the Euclidean norm or L2 norm. It corresponds to the nrm2 method defined by BLAS1. If any of the input values is equal to , the result value is also NaN. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the product of all elements in the specified non-empty tensor of single-precision floating-point numbers. The tensor, represented as a span. The result of multiplying all elements in . Length of must be greater than zero. If any of the input values is equal to , the result value is also NaN. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the product of the element-wise differences of the single-precision floating-point numbers in the specified non-empty tensors. The first tensor, represented as a span. The second tensor, represented as a span. The result of multiplying the element-wise subtraction of the elements in the second tensor from the first tensor. Length of both input spans must be greater than zero. and must have the same length. This method effectively computes: Span<float> differences = ...; TensorPrimitives.Subtract(x, y, differences); float result = TensorPrimitives.Product(differences); but without requiring additional temporary storage for the intermediate differences. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the product of the element-wise sums of the single-precision floating-point numbers in the specified non-empty tensors. The first tensor, represented as a span. The second tensor, represented as a span. The result of multiplying the element-wise additions of the elements in each tensor. Length of both input spans must be greater than zero. and must have the same length. This method effectively computes: Span<float> sums = ...; TensorPrimitives.Add(x, y, sums); float result = TensorPrimitives.Product(sums); but without requiring additional temporary storage for the intermediate sums. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the element-wise sigmoid function on the specified non-empty tensor of single-precision floating-point numbers. The tensor, represented as a span. The destination tensor. Destination is too short. must not be empty. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = 1f / (1f + .Exp(-[i])). This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the element-wise hyperbolic sine of each single-precision floating-point radian angle in the specified tensor. The tensor, represented as a span. The destination tensor, represented as a span. Destination is too short. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = .Sinh([i]). If a value is equal to , , or , the corresponding destination location is set to that value. The angles in x must be in radians. Use or multiply by /180 to convert degrees to radians. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the softmax function over the specified non-empty tensor of single-precision floating-point numbers. The tensor, represented as a span. The destination tensor. Destination is too short. must not be empty. and reference overlapping memory locations and do not begin at the same location. This method effectively computes a sum of MathF.Exp(x[i]) for all elements in . It then effectively computes [i] = MathF.Exp([i]) / sum. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the element-wise difference between single-precision floating-point numbers in the specified tensors. The first tensor, represented as a span. The second tensor, represented as a scalar. The destination tensor, represented as a span. Length of must be same as length of . Destination is too short. and reference overlapping memory locations and do not begin at the same location. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = [i] - [i]. If either of the element-wise input values is equal to , the resulting element-wise value is also NaN. Computes the element-wise difference between single-precision floating-point numbers in the specified tensors. The first tensor, represented as a span. The second tensor, represented as a scalar. The destination tensor, represented as a span. Destination is too short. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = [i] - . If either of the element-wise input values is equal to , the resulting element-wise value is also NaN. Computes the sum of all elements in the specified tensor of single-precision floating-point numbers. The tensor, represented as a span. The result of adding all elements in , or zero if is empty. If any of the values in the input is equal to , the result is also NaN. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the sum of the absolute values of every element in the specified tensor of single-precision floating-point numbers. The tensor, represented as a span. The result of adding the absolute value of every element in , or zero if is empty. This method effectively computes: Span<float> absoluteValues = ...; TensorPrimitives.Abs(x, absoluteValues); float result = TensorPrimitives.Sum(absoluteValues); but without requiring intermediate storage for the absolute values. It corresponds to the asum method defined by BLAS1. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the sum of the square of every element in the specified tensor of single-precision floating-point numbers. The tensor, represented as a span. The result of adding the square of every element in , or zero if is empty. This method effectively computes: Span<float> squaredValues = ...; TensorPrimitives.Multiply(x, x, squaredValues); float result = TensorPrimitives.Sum(squaredValues); but without requiring intermediate storage for the squared values. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Computes the element-wise hyperbolic tangent of each single-precision floating-point radian angle in the specified tensor. The tensor, represented as a span. The destination tensor, represented as a span. Destination is too short. and reference overlapping memory locations and do not begin at the same location. This method effectively computes [i] = .Tanh([i]). If a value is equal to , the corresponding destination location is set to -1. If a value is equal to , the corresponding destination location is set to 1. If a value is equal to , the corresponding destination location is set to NaN. The angles in x must be in radians. Use or multiply by /180 to convert degrees to radians. This method may call into the underlying C runtime or employ instructions specific to the current architecture. Exact results may differ between different operating systems or architectures. Throws an exception if the and spans overlap and don't begin at the same memory location. Throws an for trying to negate the minimum value of a two-complement value. Creates a span of from a when they're the same type. This is the same as MemoryMarshal.Cast, except only to be used when TFrom and TTo are the same type or effectively the same type (e.g. int and nint in a 32-bit process). MemoryMarshal.Cast can't currently be used as it's TFrom/TTo are constrained to be value types. Creates a span of from a when they're the same type. This is the same as MemoryMarshal.Cast, except only to be used when TFrom and TTo are the same type or effectively the same type (e.g. int and nint in a 32-bit process). MemoryMarshal.Cast can't currently be used as it's TFrom/TTo are constrained to be value types. Mask used to handle alignment elements before vectorized handling of the input. Logically 64 rows of 64 bytes. The Nth row should be used to handle N alignment elements at the beginning of the input, where elements in the vector after that will be zero'd. There actually exists 65 rows in the table with the last row being a repeat of the first. This is done because it allows the main algorithms to use a simplified algorithm when computing the amount of misalignment where we always skip the first 64 elements, even if already aligned, so we don't double process them. This allows us to avoid an additional branch. Mask used to handle alignment elements before vectorized handling of the input. Logically 32 rows of 32 uints. The Nth row should be used to handle N alignment elements at the beginning of the input, where elements in the vector after that will be zero'd. There actually exists 33 rows in the table with the last row being a repeat of the first. This is done because it allows the main algorithms to use a simplified algorithm when computing the amount of misalignment where we always skip the first 32 elements, even if already aligned, so we don't double process them. This allows us to avoid an additional branch. Mask used to handle alignment elements before vectorized handling of the input. Logically 16 rows of 16 uints. The Nth row should be used to handle N alignment elements at the beginning of the input, where elements in the vector after that will be zero'd. There actually exists 17 rows in the table with the last row being a repeat of the first. This is done because it allows the main algorithms to use a simplified algorithm when computing the amount of misalignment where we always skip the first 16 elements, even if already aligned, so we don't double process them. This allows us to avoid an additional branch. Mask used to handle alignment elements before vectorized handling of the input. Logically 8 rows of 8 ulongs. The Nth row should be used to handle N alignment elements at the beginning of the input, where elements in the vector after that will be zero'd. There actually exists 9 rows in the table with the last row being a repeat of the first. This is done because it allows the main algorithms to use a simplified algorithm when computing the amount of misalignment where we always skip the first 8 elements, even if already aligned, so we don't double process them. This allows us to avoid an additional branch. Mask used to handle remaining elements after vectorized handling of the input. Logically 64 rows of 64 ushorts. The Nth row should be used to handle N remaining elements at the end of the input, where elements in the vector prior to that will be zero'd. Much as with the AlignmentMask table, we actually have 65 rows where the last row is a repeat of the first. Doing this allows us to avoid an additional branch and instead to always process the last 16 elements via a conditional select instead. Mask used to handle remaining elements after vectorized handling of the input. Logically 32 rows of 32 ushorts. The Nth row should be used to handle N remaining elements at the end of the input, where elements in the vector prior to that will be zero'd. Much as with the AlignmentMask table, we actually have 33 rows where the last row is a repeat of the first. Doing this allows us to avoid an additional branch and instead to always process the last 16 elements via a conditional select instead. Mask used to handle remaining elements after vectorized handling of the input. Logically 16 rows of 16 uints. The Nth row should be used to handle N remaining elements at the end of the input, where elements in the vector prior to that will be zero'd. Much as with the AlignmentMask table, we actually have 17 rows where the last row is a repeat of the first. Doing this allows us to avoid an additional branch and instead to always process the last 16 elements via a conditional select instead. Mask used to handle remaining elements after vectorized handling of the input. Logically 8 rows of 8 ulongs. The Nth row should be used to handle N remaining elements at the end of the input, where elements in the vector prior to that will be zero'd. Much as with the AlignmentMask table, we actually have 9 rows where the last row is a repeat of the first. Doing this allows us to avoid an additional branch and instead to always process the last 8 elements via a conditional select instead. Computes the cosine similarity between the two specified non-empty, equal-length tensors of single-precision floating-point numbers. Assumes arguments have already been validated to be non-empty and equal length. Performs an aggregation over all elements in to produce a single-precision floating-point value. Specifies the transform operation that should be applied to each element loaded from . Specifies the aggregation binary operation that should be applied to multiple values to aggregate them into a single value. The aggregation is applied after the transform is applied to each element. Performs an aggregation over all pair-wise elements in and to produce a single-precision floating-point value. Specifies the binary operation that should be applied to the pair-wise elements loaded from and . Specifies the aggregation binary operation that should be applied to multiple values to aggregate them into a single value. The aggregation is applied to the results of the binary operations on the pair-wise values. This is the same as with an identity transform, except it early exits on NaN. Performs an element-wise operation on and writes the results to . Specifies the operation to perform on each element loaded from . Performs an element-wise operation on and , and writes the results to . Specifies the operation to perform on the pair-wise elements loaded from and . Performs an element-wise operation on and , and writes the results to . Specifies the operation to perform on each element loaded from with . Performs an element-wise operation on and , and writes the results to . Specifies the operation to perform on each element loaded from . It is not used with . Specifies the operation to perform on the transformed value from with . Performs an element-wise operation on , , and , and writes the results to . Specifies the operation to perform on the pair-wise elements loaded from , , and . Performs an element-wise operation on , , and , and writes the results to . Specifies the operation to perform on the pair-wise elements loaded from and with . Performs an element-wise operation on , , and , and writes the results to . Specifies the operation to perform on the pair-wise element loaded from , with , and the element loaded from . Loads a from . Loads a that begins at the specified from . Loads a that begins at the specified from . Loads a that begins at the specified from . Gets whether the specified is positive. Gets whether each specified is positive. Gets whether the specified is negative. Gets whether each specified is negative. Gets the base 2 logarithm of . Gets a vector mask that will be all-ones-set for the first elements and zero for all other elements. Gets a vector mask that will be all-ones-set for the last elements and zero for all other elements. x + y x - y (x - y) * (x - y) x * y x / y Returns the index of MathF.Max(x, y) MathF.Max(x, y) (but without guaranteed NaN propagation) MathF.Max(x, y) Operator to get x or y based on which has the larger MathF.Abs (but NaNs may not be propagated) Operator to get x or y based on which has the larger MathF.Abs MathF.Min(x, y) (but NaNs may not be propagated) MathF.Min(x, y) Operator to get x or y based on which has the smaller MathF.Abs (but NaNs may not be propagated) Operator to get x or y based on which has the smaller MathF.Abs -x (x + y) * z (x * y) + z x x * x MathF.Abs(x) MathF.Exp(x) MathF.Sinh(x) MathF.Cosh(x) MathF.Tanh(x) MathF.Log(x) MathF.Log2(x) 1f / (1f + MathF.Exp(-x)) Operator that takes one input value and returns a single value. Operator that takes two input values and returns a single value. that specializes horizontal aggregation of all elements in a vector. Operator that takes three input values and returns a single value. Destination is too short. Input span arguments must not be empty. Input span arguments must all have the same length. The destination span may only overlap with an input span if the two spans start at the same memory location. Negating the minimum value of a twos complement number is invalid. The value '{0}' is not valid for this usage of the type {1}. Cannot use type '{0}'. Only value types without pointers or references are supported. Destination is too short. Equals() on TensorSpan and ReadOnlyTensorSpan is not supported. Use operator== instead. GetHashCode() on TensorSpan and ReadOnlyTensorSpan is not supported. Number of Indices must equal the rank of the TensorSpan. The total length specified by the lengths must equal the length of the array. Must be a 1d tensor Cannot select an axis greater than the current Rank Must provide at least 2 tensors to Concatenate Number of dimensions to slice does not equal the number of dimensions in the span The total length of the filter tensor must equal the length of the tensor to be filtered. Number of elements provided does not match the number of filters. In place operations require the same shape for both tensors Invalid axis provided. Must be greater then or equal to 0 and less than the tensor rank. The tensors must have the same shape, except in the dimension corresponding to axis. Provided dimensions are not valid for reshaping Cannot select an axis to squeeze which has size not equal to one Provided dimensions can only include 1 wildcard. Must provide an axis order for each axis Provided values must have the same shape as the input tensor. When no ranges are specified the values tensor must be equal in size as the input tensor. Lengths are not broadcast compatible. The number of splits must perfectly divide the dimension. Must provide at least 2 tensors to Stack. Must provide a tensor with at least 2 dimensions to transpose it. The provided value must be non-negative. The provided lengths and strides would allow you to access elements outside the provided memory. Strides cannot be less than 0. Must be a 2d Tensor. Incompatible dimensions for provided tensors. left.Lengths[1] == {0} while right.Lengths[1] == {1}. All tensors must have the same shape. The Tensor provided is either non-contiguous or non-dense. Reshape only works with contigous and dense memory. You may need to Broadcast or Copy the data to be contigous. Attribute used to indicate a source generator should create a function for marshalling arguments instead of relying on the runtime to generate an equivalent marshalling function at run-time. This attribute is meaningless if the source generator associated with it is not enabled. The current built-in source generator only supports C# and only supplies an implementation when applied to static, partial, non-generic methods. Initializes a new instance of the . Name of the library containing the import. Gets the name of the library containing the import. Gets or sets the name of the entry point to be called. Gets or sets how to marshal string arguments to the method. If this field is set to a value other than , must not be specified. Gets or sets the used to control how string arguments to the method are marshalled. If this field is specified, must not be specified or must be set to . Gets or sets whether the callee sets an error (SetLastError on Windows or errno on other platforms) before returning from the attributed method. Specifies how strings should be marshalled for generated p/invokes Indicates the user is supplying a specific marshaller in . Use the platform-provided UTF-8 marshaller. Use the platform-provided UTF-16 marshaller. Specifies that null is allowed as an input even if the corresponding type disallows it. Specifies that null is disallowed as an input even if the corresponding type allows it. Specifies that an output may be null even if the corresponding type disallows it. Specifies that an output will not be null even if the corresponding type allows it. Specifies that an input argument was not null when the call returns. Specifies that when a method returns , the parameter may be null even if the corresponding type disallows it. Initializes the attribute with the specified return value condition. The return value condition. If the method returns this value, the associated parameter may be null. Gets the return value condition. Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it. Initializes the attribute with the specified return value condition. The return value condition. If the method returns this value, the associated parameter will not be null. Gets the return value condition. Specifies that the output will be non-null if the named parameter is non-null. Initializes the attribute with the associated parameter name. The associated parameter name. The output will be non-null if the argument to the parameter specified is non-null. Gets the associated parameter name. Applied to a method that will never return under any circumstance. Specifies that the method will not return if the associated Boolean parameter is passed the specified value. Initializes the attribute with the specified parameter value. The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to the associated parameter matches this value. Gets the condition parameter value. Specifies that the method or property will ensure that the listed field and property members have not-null values. Initializes the attribute with a field or property member. The field or property member that is promised to be not-null. Initializes the attribute with the list of field and property members. The list of field and property members that are promised to be not-null. Gets field or property member names. Specifies that the method or property will ensure that the listed field and property members have not-null values when returning with the specified return value condition. Initializes the attribute with the specified return value condition and a field or property member. The return value condition. If the method returns this value, the associated field or property member will not be null. The field or property member that is promised to be not-null. Initializes the attribute with the specified return value condition and list of field and property members. The return value condition. If the method returns this value, the associated field and property members will not be null. The list of field and property members that are promised to be not-null. Gets the return value condition. Gets field or property member names.