Object VectorApiSpeedups
-
- All Implemented Interfaces:
public class VectorApiSpeedupsThis class provides optimized implementations of various mathematical operations using the Java Vector API for better performance.
The Vector API allows for SIMD (Single Instruction, Multiple Data) operations, which can significantly improve performance for these types of operations.
- Since:
2.0.0
Oleg Shpynov
-
-
Field Summary
Fields Modifier and Type Field Description public final static VectorApiSpeedupsINSTANCE
-
Method Summary
Modifier and Type Method Description final UnitunsafeExp(DoubleArray dst, Integer dstOffset, DoubleArray src, Integer srcOffset, Integer size)Computes the exponential function (e^x) for each element in the source array. final UnitunsafeExpm1(DoubleArray dst, Integer dstOffset, DoubleArray src, Integer srcOffset, Integer size)Computes e^x - 1 for each element in the source array. final UnitunsafeLog(DoubleArray dst, Integer dstOffset, DoubleArray src, Integer srcOffset, Integer size)Computes the natural logarithm (ln(x)) for each element in the source array. final UnitunsafeLog1p(DoubleArray dst, Integer dstOffset, DoubleArray src, Integer srcOffset, Integer size)Computes ln(1 + x) for each element in the source array. final DoubleunsafeSum(DoubleArray src, Integer srcOffset, Integer size)Computes the sum of all elements in the source array. final DoubleunsafeSD(DoubleArray src, Integer srcOffset, Integer size)Computes the standard deviation of the elements in the source array. final DoubleunsafeDot(DoubleArray src1, Integer src1Offset, DoubleArray src2, Integer src2Offset, Integer size)Computes the dot product of two arrays. final DoubleunsafeLogSumExp(DoubleArray src, Integer srcOffset, Integer size)Computes the log-sum-exp of the elements in the source array. -
-
Method Detail
-
unsafeExp
final Unit unsafeExp(DoubleArray dst, Integer dstOffset, DoubleArray src, Integer srcOffset, Integer size)
Computes the exponential function (e^x) for each element in the source array.
Implemented using Vector API for SIMD operations.
-
unsafeExpm1
final Unit unsafeExpm1(DoubleArray dst, Integer dstOffset, DoubleArray src, Integer srcOffset, Integer size)
Computes e^x - 1 for each element in the source array.
Implemented using Vector API for SIMD operations.
-
unsafeLog
final Unit unsafeLog(DoubleArray dst, Integer dstOffset, DoubleArray src, Integer srcOffset, Integer size)
Computes the natural logarithm (ln(x)) for each element in the source array.
Implemented using Vector API for SIMD operations.
-
unsafeLog1p
final Unit unsafeLog1p(DoubleArray dst, Integer dstOffset, DoubleArray src, Integer srcOffset, Integer size)
Computes ln(1 + x) for each element in the source array.
Implemented using Vector API for SIMD operations.
-
unsafeSum
final Double unsafeSum(DoubleArray src, Integer srcOffset, Integer size)
Computes the sum of all elements in the source array.
Implemented using Vector API for SIMD operations.
-
unsafeSD
final Double unsafeSD(DoubleArray src, Integer srcOffset, Integer size)
Computes the standard deviation of the elements in the source array.
Implemented using Vector API for SIMD operations.
-
unsafeDot
final Double unsafeDot(DoubleArray src1, Integer src1Offset, DoubleArray src2, Integer src2Offset, Integer size)
Computes the dot product of two arrays.
Implemented using Vector API for SIMD operations.
-
unsafeLogSumExp
final Double unsafeLogSumExp(DoubleArray src, Integer srcOffset, Integer size)
Computes the log-sum-exp of the elements in the source array. This is a numerically stable way to compute log(sum(exp(x))).
Implemented using Vector API for SIMD operations.
-
-
-
-