8338023: Support two vector selectFrom API

Reviewed-by: psandoz, epeter, sviswanathan
This commit is contained in:
Jatin Bhateja 2024-10-16 16:08:02 +00:00
parent c34fb2c989
commit 709914fc92
89 changed files with 2788 additions and 20 deletions

View file

@ -395,6 +395,24 @@ public class VectorSupport {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
return defaultImpl.apply(v1, v2, m);
}
/* ============================================================================ */
public interface SelectFromTwoVector<V extends Vector<?>> {
V apply(V v1, V v2, V v3);
}
@IntrinsicCandidate
public static
<V extends Vector<E>,
E>
V selectFromTwoVectorOp(Class<? extends V> vClass, Class<E> eClass, int length,
V v1, V v2, V v3,
SelectFromTwoVector<V> defaultImpl) {
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
return defaultImpl.apply(v1, v2, v3);
}
/* ============================================================================ */
/* ============================================================================ */