mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8310459: [BACKOUT] 8304450: [vectorapi] Refactor VectorShuffle implementation
Reviewed-by: thartmann, sviswanathan
This commit is contained in:
parent
815ac6eeb3
commit
ff9a754109
64 changed files with 2086 additions and 2736 deletions
|
@ -227,6 +227,42 @@ public class VectorSupport {
|
|||
return defaultImpl.apply(offset, limit);
|
||||
}
|
||||
|
||||
/* ============================================================================ */
|
||||
public interface ShuffleIotaOperation<S extends VectorSpecies<?>,
|
||||
SH extends VectorShuffle<?>> {
|
||||
SH apply(int length, int start, int step, S s);
|
||||
}
|
||||
|
||||
@IntrinsicCandidate
|
||||
public static
|
||||
<E,
|
||||
S extends VectorSpecies<E>,
|
||||
SH extends VectorShuffle<E>>
|
||||
SH shuffleIota(Class<E> eClass, Class<? extends SH> shClass, S s,
|
||||
int length,
|
||||
int start, int step, int wrap,
|
||||
ShuffleIotaOperation<S, SH> defaultImpl) {
|
||||
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
|
||||
return defaultImpl.apply(length, start, step, s);
|
||||
}
|
||||
|
||||
public interface ShuffleToVectorOperation<V extends Vector<?>,
|
||||
SH extends VectorShuffle<?>> {
|
||||
V apply(SH sh);
|
||||
}
|
||||
|
||||
@IntrinsicCandidate
|
||||
public static
|
||||
<V extends Vector<E>,
|
||||
SH extends VectorShuffle<E>,
|
||||
E>
|
||||
V shuffleToVector(Class<? extends Vector<E>> vClass, Class<E> eClass, Class<? extends SH> shClass, SH sh,
|
||||
int length,
|
||||
ShuffleToVectorOperation<V, SH> defaultImpl) {
|
||||
assert isNonCapturingLambda(defaultImpl) : defaultImpl;
|
||||
return defaultImpl.apply(sh);
|
||||
}
|
||||
|
||||
/* ============================================================================ */
|
||||
public interface IndexOperation<V extends Vector<?>,
|
||||
S extends VectorSpecies<?>> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue