Usage of the Vector API in java.base

Paul Sandoz paul.sandoz at oracle.com
Fri Oct 2 19:03:20 UTC 2020


Hi Ludovic,

Unfortunately this is not currently possible. To be reusable from java.base the Vector API needs to exit incubation and merge into java.base. It’s likely to stay incubating for some time until parts of Project Valhalla are delivered.

If the value of leveraging the Vector API functionality from within java.base is considered large enough, there is another option we could consider at a future point. The Vector API intrinsics are within java.base and we could build a minimal raw (perhaps unsafe) internal API around those that could be used during incubation. I think that approach requires careful assessment and I would prefer not to get into that right now. Instead, I would prefer to focus on improving the Vector API and its implementation.

In that spirit, I think what is valuable right now is identifying the use-cases in java.base and writing stand alone examples, which could be contributed to https://github.com/openjdk/panama-vector/tree/vectorIntrinsics. That will help us evaluate. Is that something you are interested in pursuing?

Paul.

> On Oct 1, 2020, at 1:51 PM, Ludovic Henry <luhenry at microsoft.com> wrote:
> 
> Hello,
> 
> As I'm looking at accelerating some operations in the core lib with the soon to be available Vector API, I'm running into a trivial hurdle: how to make the `jdk.incubator.vector` module available in the `java.base` module. Being relatively new to the world of Java, I've not mastered yet the whole module thing, especially in the context of the OpenJDK build system.
> 
> So is it something that would even be possible, or would it introduce circular dependencies which would be impossible to work with? And if it is possible, do you know of where it would have been tried and documented?
> 
> Thank you very much,
> Ludovic
> 



More information about the panama-dev mailing list