[vectorIntrinsics] RFR: 8287289: Gather/Scatter with Index Vector
    Joshua Zhu 
    jzhu at openjdk.java.net
       
    Wed May 25 10:01:24 UTC 2022
    
    
  
On Wed, 25 May 2022 08:35:53 GMT, Joshua Zhu <jzhu at openjdk.org> wrote:
> When I assist engineers to apply VectorAPI in real business scenarios, I realize that Gather/Scatter APIs depend on indexMap residing in memory.
> 
> When an index map is acquired by vector operations, it is represented by IntVector. To do Gather/Scatter operations, an extra integer array must be introduced and an explicit vector store is also required ahead of each Gather/Scatter. Furthermore, the redundant memory store may cause a performance penalty.
> 
> Hence I submit this change for discussion. I propose to provide Gather/Scatter API supporting index vector. This patch only includes the change for Gather API.
> It passed the jtreg tests for VectorAPI.
Current Gather/Scatter APIs accept int array as index map. It hides the internal details of how the int array gets involved in vectorization, making users no need to pay attention to the underlying index vector's length.
But in some scenarios, the index map has to participate in the vector computation and then be obtained from the previous iteration. In this kind of scenario, Gather/Scatter with index vector will be much more helpful.
-------------
PR: https://git.openjdk.java.net/panama-vector/pull/201
    
    
More information about the panama-dev
mailing list