156 }
157
158 /* ============================================================================ */
159
160 @HotSpotIntrinsicCandidate
161 static
162 <VM>
163 VM binaryOp(int oprId, Class<? extends VM> vmClass, Class<?> elementType, int length,
164 VM vm1, VM vm2, /*Vector.Mask<E,S> m,*/
165 BiFunction<VM, VM, VM> defaultImpl) {
166 assert isNonCapturingLambda(defaultImpl) : defaultImpl;
167 return defaultImpl.apply(vm1, vm2);
168 }
169
170 /* ============================================================================ */
171
172 interface TernaryOperation<V> {
173 V apply(V v1, V v2, V v3);
174 }
175
176 @SuppressWarnings("unchecked")
177 @HotSpotIntrinsicCandidate
178 static
179 <VM>
180 VM ternaryOp(int oprId, Class<VM> vmClass, Class<?> elementType, int length,
181 VM vm1, VM vm2, VM vm3, /*Vector.Mask<E,S> m,*/
182 TernaryOperation<VM> defaultImpl) {
183 assert isNonCapturingLambda(defaultImpl) : defaultImpl;
184 return defaultImpl.apply(vm1, vm2, vm3);
185 }
186
187 /* ============================================================================ */
188
189 // Memory operations
190
191 interface LoadOperation<C, V, E> {
192 V load(C container, int index, Vector.Species<E> s);
193 }
194
195 @HotSpotIntrinsicCandidate
196 static
|
156 }
157
158 /* ============================================================================ */
159
160 @HotSpotIntrinsicCandidate
161 static
162 <VM>
163 VM binaryOp(int oprId, Class<? extends VM> vmClass, Class<?> elementType, int length,
164 VM vm1, VM vm2, /*Vector.Mask<E,S> m,*/
165 BiFunction<VM, VM, VM> defaultImpl) {
166 assert isNonCapturingLambda(defaultImpl) : defaultImpl;
167 return defaultImpl.apply(vm1, vm2);
168 }
169
170 /* ============================================================================ */
171
172 interface TernaryOperation<V> {
173 V apply(V v1, V v2, V v3);
174 }
175
176 @HotSpotIntrinsicCandidate
177 static
178 <VM>
179 VM ternaryOp(int oprId, Class<VM> vmClass, Class<?> elementType, int length,
180 VM vm1, VM vm2, VM vm3, /*Vector.Mask<E,S> m,*/
181 TernaryOperation<VM> defaultImpl) {
182 assert isNonCapturingLambda(defaultImpl) : defaultImpl;
183 return defaultImpl.apply(vm1, vm2, vm3);
184 }
185
186 /* ============================================================================ */
187
188 // Memory operations
189
190 interface LoadOperation<C, V, E> {
191 V load(C container, int index, Vector.Species<E> s);
192 }
193
194 @HotSpotIntrinsicCandidate
195 static
|