mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 06:14:49 +02:00
8310691: [REDO] [vectorapi] Refactor VectorShuffle implementation
Reviewed-by: psandoz, jbhateja, epeter
This commit is contained in:
parent
4da6fd4283
commit
75cfb640a6
64 changed files with 4006 additions and 2423 deletions
|
@ -234,56 +234,6 @@ 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 WrapShuffleIndexesOperation<SH extends VectorShuffle<?>> {
|
||||
SH apply(SH sh);
|
||||
}
|
||||
|
||||
@IntrinsicCandidate
|
||||
public static
|
||||
<E,
|
||||
SH extends VectorShuffle<E>>
|
||||
SH wrapShuffleIndexes(Class<E> eClass, Class<? extends SH> shClass, SH sh, int length,
|
||||
WrapShuffleIndexesOperation<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