< prev index next >

src/jdk.incubator.vector/share/classes/jdk/incubator/vector/VectorIntrinsics.java

Print this page




  84     static final int BT_gt = 1;
  85     static final int BT_overflow = 2;
  86     static final int BT_no_overflow = 6;
  87 
  88     /* ============================================================================ */
  89     interface BroadcastOperation<V, E> {
  90         V broadcast(long l, VectorSpecies<E> s);
  91     }
  92 
  93     @HotSpotIntrinsicCandidate
  94     static
  95     <VM, E>
  96     VM broadcastCoerced(Class<VM> vmClass, Class<?> E, int length,
  97                                   long bits, VectorSpecies<E> s,
  98                                   BroadcastOperation<VM, E> defaultImpl) {
  99         assert isNonCapturingLambda(defaultImpl) : defaultImpl;
 100         return defaultImpl.broadcast(bits, s);
 101     }
 102 
 103     /* ============================================================================ */



























 104 
 105     @HotSpotIntrinsicCandidate
 106     static
 107     <V extends Vector<?>>
 108     long reductionCoerced(int oprId, Class<?> vectorClass, Class<?> elementType, int length,
 109                           V v,
 110                           Function<V,Long> defaultImpl) {
 111         assert isNonCapturingLambda(defaultImpl) : defaultImpl;
 112         return defaultImpl.apply(v);
 113     }
 114 
 115     /* ============================================================================ */
 116 
 117     interface VecExtractOp<V> {
 118         long apply(V v1, int idx);
 119     }
 120 
 121     @HotSpotIntrinsicCandidate
 122     static
 123     <V extends Vector<?>>




  84     static final int BT_gt = 1;
  85     static final int BT_overflow = 2;
  86     static final int BT_no_overflow = 6;
  87 
  88     /* ============================================================================ */
  89     interface BroadcastOperation<V, E> {
  90         V broadcast(long l, VectorSpecies<E> s);
  91     }
  92 
  93     @HotSpotIntrinsicCandidate
  94     static
  95     <VM, E>
  96     VM broadcastCoerced(Class<VM> vmClass, Class<?> E, int length,
  97                                   long bits, VectorSpecies<E> s,
  98                                   BroadcastOperation<VM, E> defaultImpl) {
  99         assert isNonCapturingLambda(defaultImpl) : defaultImpl;
 100         return defaultImpl.broadcast(bits, s);
 101     }
 102 
 103     /* ============================================================================ */
 104     interface ShuffleIotaOperation<E> {
 105         VectorShuffle<E> apply(int step, int length);
 106     }
 107 
 108     @HotSpotIntrinsicCandidate
 109     static
 110     <E>
 111     VectorShuffle<E> shuffleIota(Class<?> E, Class<?> ShuffleClass, VectorSpecies<E> s, int length,
 112                      int step, ShuffleIotaOperation<E> defaultImpl) {
 113        assert isNonCapturingLambda(defaultImpl) : defaultImpl;
 114        return defaultImpl.apply(step, length);
 115     }
 116 
 117     interface ShuffleToVectorOperation<VM, Sh, E> {
 118        VM apply(Sh s);
 119     }
 120 
 121     @HotSpotIntrinsicCandidate 
 122     static 
 123     <VM ,Sh extends VectorShuffle<E>, E> 
 124     VM shuffleToVector(Class<?> VM, Class<?>E , Class<?> ShuffleClass, Sh s, int length,
 125                        ShuffleToVectorOperation<VM,Sh,E> defaultImpl) {
 126       assert isNonCapturingLambda(defaultImpl) : defaultImpl;
 127       return defaultImpl.apply(s);
 128     }
 129 
 130     /* ============================================================================ */
 131 
 132     @HotSpotIntrinsicCandidate
 133     static
 134     <V extends Vector<?>>
 135     long reductionCoerced(int oprId, Class<?> vectorClass, Class<?> elementType, int length,
 136                           V v,
 137                           Function<V,Long> defaultImpl) {
 138         assert isNonCapturingLambda(defaultImpl) : defaultImpl;
 139         return defaultImpl.apply(v);
 140     }
 141 
 142     /* ============================================================================ */
 143 
 144     interface VecExtractOp<V> {
 145         long apply(V v1, int idx);
 146     }
 147 
 148     @HotSpotIntrinsicCandidate
 149     static
 150     <V extends Vector<?>>


< prev index next >