Supports SIMD / Vector API #455
Replies: 1 comment 1 reply
-
Interesting idea, supporting the new Vector API. The extension would provide new functions and operators, that override the standard functions and operators and support vectors. The only thing needed to change in EvalEx hopefully would be a new data type, e.g. The new methods and operators should also check the data type and delegate to the original implementations for the 'scalar' types, e.g.:
this would allow to move the extension to the main implementation, once EvalEx is using the required Java version. There is also be a clear separation of the already supported arrays and the new vector support. |
Beta Was this translation helpful? Give feedback.
-
In our use cases, we generally need to apply the same formula multiple times to a list of values and one way to efficiently perform such calculation is through SIMD. In Java, there is Vector API.
There are several challenges though:
One way to implement this on top of what we currently have is perhaps to override all operators / functions so that if the operands are lists, we convert them using Vector APIs, perform the computation and return the result as a list.
Any other ideas how this could possible be done? Perhaps the library can automatically detect the availability of the Vector API and switch between different implementation? Or perhaps it's not a good idea to do things like that in Java at all?
Beta Was this translation helpful? Give feedback.
All reactions