< prev index next >

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

Print this page

214 
215     @ForceInline
216     final @Override
217     LongMaxVector tOp(Vector<Long> v1, Vector<Long> v2, FTriOp f) {
218         return (LongMaxVector)
219             super.tOpTemplate((LongMaxVector)v1, (LongMaxVector)v2,
220                               f);  // specialize
221     }
222 
223     @ForceInline
224     final @Override
225     LongMaxVector tOp(Vector<Long> v1, Vector<Long> v2,
226                      VectorMask<Long> m, FTriOp f) {
227         return (LongMaxVector)
228             super.tOpTemplate((LongMaxVector)v1, (LongMaxVector)v2,
229                               (LongMaxMask)m, f);  // specialize
230     }
231 
232     @ForceInline
233     final @Override
234     long rOp(long v, FBinOp f) {
235         return super.rOpTemplate(v, f);  // specialize
236     }
237 
238     @Override
239     @ForceInline
240     public final <F>
241     Vector<F> convertShape(VectorOperators.Conversion<Long,F> conv,
242                            VectorSpecies<F> rsp, int part) {
243         return super.convertShapeTemplate(conv, rsp, part);  // specialize
244     }
245 
246     @Override
247     @ForceInline
248     public final <F>
249     Vector<F> reinterpretShape(VectorSpecies<F> toSpecies, int part) {
250         return super.reinterpretShapeTemplate(toSpecies, part);  // specialize
251     }
252 
253     // Specialized algebraic operations:
254 
255     // The following definition forces a specialized version of this
256     // crucial method into the v-table of this class.  A call to add()
257     // will inline to a call to lanewise(ADD,), at which point the JIT
258     // intrinsic will have the opcode of ADD, plus all the metadata
259     // for this particular class, enabling it to generate precise
260     // code.
261     //
262     // There is probably no benefit to the JIT to specialize the
263     // masked or broadcast versions of the lanewise method.
264 
265     @Override
266     @ForceInline
267     public LongMaxVector lanewise(Unary op) {
268         return (LongMaxVector) super.lanewiseTemplate(op);  // specialize
269     }
270 






271     @Override
272     @ForceInline
273     public LongMaxVector lanewise(Binary op, Vector<Long> v) {
274         return (LongMaxVector) super.lanewiseTemplate(op, v);  // specialize
275     }
276 






277     /*package-private*/
278     @Override
279     @ForceInline LongMaxVector
280     lanewiseShift(VectorOperators.Binary op, int e) {
281         return (LongMaxVector) super.lanewiseShiftTemplate(op, e);  // specialize
282     }
283 







284     /*package-private*/
285     @Override
286     @ForceInline
287     public final
288     LongMaxVector
289     lanewise(VectorOperators.Ternary op, Vector<Long> v1, Vector<Long> v2) {
290         return (LongMaxVector) super.lanewiseTemplate(op, v1, v2);  // specialize
291     }
292 








293     @Override
294     @ForceInline
295     public final
296     LongMaxVector addIndex(int scale) {
297         return (LongMaxVector) super.addIndexTemplate(scale);  // specialize
298     }
299 
300     // Type specific horizontal reductions
301 
302     @Override
303     @ForceInline
304     public final long reduceLanes(VectorOperators.Associative op) {
305         return super.reduceLanesTemplate(op);  // specialized
306     }
307 
308     @Override
309     @ForceInline
310     public final long reduceLanes(VectorOperators.Associative op,
311                                     VectorMask<Long> m) {
312         return super.reduceLanesTemplate(op, m);  // specialized
313     }
314 
315     @Override
316     @ForceInline
317     public final long reduceLanesToLong(VectorOperators.Associative op) {
318         return (long) super.reduceLanesTemplate(op);  // specialized
319     }
320 
321     @Override
322     @ForceInline
323     public final long reduceLanesToLong(VectorOperators.Associative op,
324                                         VectorMask<Long> m) {
325         return (long) super.reduceLanesTemplate(op, m);  // specialized
326     }
327 
328     @ForceInline
329     public VectorShuffle<Long> toShuffle() {
330         return super.toShuffleTemplate(LongMaxShuffle.class); // specialize
331     }
332 
333     // Specialized unary testing
334 
335     @Override
336     @ForceInline
337     public final LongMaxMask test(Test op) {
338         return super.testTemplate(LongMaxMask.class, op);  // specialize
339     }
340 
341     // Specialized comparisons
342 
343     @Override
344     @ForceInline
345     public final LongMaxMask compare(Comparison op, Vector<Long> v) {
346         return super.compareTemplate(LongMaxMask.class, op, v);  // specialize
347     }
348 
349     @Override
350     @ForceInline
351     public final LongMaxMask compare(Comparison op, long s) {
352         return super.compareTemplate(LongMaxMask.class, op, s);  // specialize
353     }
354 
355 







356     @Override
357     @ForceInline
358     public LongMaxVector blend(Vector<Long> v, VectorMask<Long> m) {
359         return (LongMaxVector)
360             super.blendTemplate(LongMaxMask.class,
361                                 (LongMaxVector) v,
362                                 (LongMaxMask) m);  // specialize
363     }
364 
365     @Override
366     @ForceInline
367     public LongMaxVector slice(int origin, Vector<Long> v) {
368         return (LongMaxVector) super.sliceTemplate(origin, v);  // specialize
369     }
370 
371     @Override
372     @ForceInline
373     public LongMaxVector slice(int origin) {
374         return (LongMaxVector) super.sliceTemplate(origin);  // specialize
375     }

392     @Override
393     @ForceInline
394     public LongMaxVector unslice(int origin) {
395         return (LongMaxVector) super.unsliceTemplate(origin);  // specialize
396     }
397 
398     @Override
399     @ForceInline
400     public LongMaxVector rearrange(VectorShuffle<Long> s) {
401         return (LongMaxVector)
402             super.rearrangeTemplate(LongMaxShuffle.class,
403                                     (LongMaxShuffle) s);  // specialize
404     }
405 
406     @Override
407     @ForceInline
408     public LongMaxVector rearrange(VectorShuffle<Long> shuffle,
409                                   VectorMask<Long> m) {
410         return (LongMaxVector)
411             super.rearrangeTemplate(LongMaxShuffle.class,

412                                     (LongMaxShuffle) shuffle,
413                                     (LongMaxMask) m);  // specialize
414     }
415 
416     @Override
417     @ForceInline
418     public LongMaxVector rearrange(VectorShuffle<Long> s,
419                                   Vector<Long> v) {
420         return (LongMaxVector)
421             super.rearrangeTemplate(LongMaxShuffle.class,
422                                     (LongMaxShuffle) s,
423                                     (LongMaxVector) v);  // specialize
424     }
425 
426     @Override
427     @ForceInline
428     public LongMaxVector selectFrom(Vector<Long> v) {
429         return (LongMaxVector)
430             super.selectFromTemplate((LongMaxVector) v);  // specialize
431     }

555 
556         /**
557          * Helper function for lane-wise mask conversions.
558          * This function kicks in after intrinsic failure.
559          */
560         @ForceInline
561         private final <E>
562         VectorMask<E> defaultMaskCast(AbstractSpecies<E> dsp) {
563             if (length() != dsp.laneCount())
564                 throw new IllegalArgumentException("VectorMask length and species length differ");
565             boolean[] maskArray = toArray();
566             return  dsp.maskFactory(maskArray).check(dsp);
567         }
568 
569         @Override
570         @ForceInline
571         public <E> VectorMask<E> cast(VectorSpecies<E> dsp) {
572             AbstractSpecies<E> species = (AbstractSpecies<E>) dsp;
573             if (length() != species.laneCount())
574                 throw new IllegalArgumentException("VectorMask length and species length differ");
575             if (VSIZE == species.vectorBitSize()) {
576                 Class<?> dtype = species.elementType();
577                 Class<?> dmtype = species.maskType();
578                 return VectorSupport.convert(VectorSupport.VECTOR_OP_REINTERPRET,
579                     this.getClass(), ETYPE, VLENGTH,
580                     dmtype, dtype, VLENGTH,
581                     this, species,
582                     LongMaxMask::defaultMaskCast);
583             }
584             return this.defaultMaskCast(species);
585         }
586 
587         @Override
588         @ForceInline
589         public LongMaxMask eq(VectorMask<Long> mask) {
590             Objects.requireNonNull(mask);
591             LongMaxMask m = (LongMaxMask)mask;
592             return xor(m.not());
593         }
594 
595         // Unary operations
596 
597         @Override
598         @ForceInline
599         public LongMaxMask not() {
600             return xor(maskAll(true));
601         }
602 
603         // Binary operations
604 
605         @Override
606         @ForceInline
607         public LongMaxMask and(VectorMask<Long> mask) {
608             Objects.requireNonNull(mask);
609             LongMaxMask m = (LongMaxMask)mask;
610             return VectorSupport.binaryOp(VECTOR_OP_AND, LongMaxMask.class, long.class, VLENGTH,
611                                              this, m,
612                                              (m1, m2) -> m1.bOp(m2, (i, a, b) -> a & b));
613         }
614 
615         @Override
616         @ForceInline
617         public LongMaxMask or(VectorMask<Long> mask) {
618             Objects.requireNonNull(mask);
619             LongMaxMask m = (LongMaxMask)mask;
620             return VectorSupport.binaryOp(VECTOR_OP_OR, LongMaxMask.class, long.class, VLENGTH,
621                                              this, m,
622                                              (m1, m2) -> m1.bOp(m2, (i, a, b) -> a | b));
623         }
624 
625         @ForceInline
626         /* package-private */
627         LongMaxMask xor(VectorMask<Long> mask) {
628             Objects.requireNonNull(mask);
629             LongMaxMask m = (LongMaxMask)mask;
630             return VectorSupport.binaryOp(VECTOR_OP_XOR, LongMaxMask.class, long.class, VLENGTH,
631                                           this, m,
632                                           (m1, m2) -> m1.bOp(m2, (i, a, b) -> a ^ b));
633         }
634 
635         // Mask Query operations
636 
637         @Override
638         @ForceInline
639         public int trueCount() {
640             return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMaxMask.class, long.class, VLENGTH, this,
641                                                       (m) -> trueCountHelper(((LongMaxMask)m).getBits()));
642         }
643 
644         @Override
645         @ForceInline
646         public int firstTrue() {
647             return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMaxMask.class, long.class, VLENGTH, this,
648                                                       (m) -> firstTrueHelper(((LongMaxMask)m).getBits()));
649         }
650 
651         @Override
652         @ForceInline
653         public int lastTrue() {
654             return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMaxMask.class, long.class, VLENGTH, this,
655                                                       (m) -> lastTrueHelper(((LongMaxMask)m).getBits()));










656         }
657 
658         // Reductions
659 
660         @Override
661         @ForceInline
662         public boolean anyTrue() {
663             return VectorSupport.test(BT_ne, LongMaxMask.class, long.class, VLENGTH,
664                                          this, vspecies().maskAll(true),
665                                          (m, __) -> anyTrueHelper(((LongMaxMask)m).getBits()));
666         }
667 
668         @Override
669         @ForceInline
670         public boolean allTrue() {
671             return VectorSupport.test(BT_overflow, LongMaxMask.class, long.class, VLENGTH,
672                                          this, vspecies().maskAll(true),
673                                          (m, __) -> allTrueHelper(((LongMaxMask)m).getBits()));
674         }
675 

746             byte[] r = new byte[reorder1.length];
747             for (int i = 0; i < reorder1.length; i++) {
748                 int ssi = reorder2[i];
749                 r[i] = reorder1[ssi];  // throws on exceptional index
750             }
751             return new LongMaxShuffle(r);
752         }
753     }
754 
755     // ================================================
756 
757     // Specialized low-level memory operations.
758 
759     @ForceInline
760     @Override
761     final
762     LongVector fromArray0(long[] a, int offset) {
763         return super.fromArray0Template(a, offset);  // specialize
764     }
765 














766 
767 
768     @ForceInline
769     @Override
770     final
771     LongVector fromByteArray0(byte[] a, int offset) {
772         return super.fromByteArray0Template(a, offset);  // specialize
773     }
774 







775     @ForceInline
776     @Override
777     final
778     LongVector fromByteBuffer0(ByteBuffer bb, int offset) {
779         return super.fromByteBuffer0Template(bb, offset);  // specialize
780     }
781 







782     @ForceInline
783     @Override
784     final
785     void intoArray0(long[] a, int offset) {
786         super.intoArray0Template(a, offset);  // specialize
787     }
788 















789     @ForceInline
790     @Override
791     final
792     void intoByteArray0(byte[] a, int offset) {
793         super.intoByteArray0Template(a, offset);  // specialize
794     }
795 















796     // End of specialized low-level memory operations.
797 
798     // ================================================
799 
800 }

214 
215     @ForceInline
216     final @Override
217     LongMaxVector tOp(Vector<Long> v1, Vector<Long> v2, FTriOp f) {
218         return (LongMaxVector)
219             super.tOpTemplate((LongMaxVector)v1, (LongMaxVector)v2,
220                               f);  // specialize
221     }
222 
223     @ForceInline
224     final @Override
225     LongMaxVector tOp(Vector<Long> v1, Vector<Long> v2,
226                      VectorMask<Long> m, FTriOp f) {
227         return (LongMaxVector)
228             super.tOpTemplate((LongMaxVector)v1, (LongMaxVector)v2,
229                               (LongMaxMask)m, f);  // specialize
230     }
231 
232     @ForceInline
233     final @Override
234     long rOp(long v, VectorMask<Long> m, FBinOp f) {
235         return super.rOpTemplate(v, m, f);  // specialize
236     }
237 
238     @Override
239     @ForceInline
240     public final <F>
241     Vector<F> convertShape(VectorOperators.Conversion<Long,F> conv,
242                            VectorSpecies<F> rsp, int part) {
243         return super.convertShapeTemplate(conv, rsp, part);  // specialize
244     }
245 
246     @Override
247     @ForceInline
248     public final <F>
249     Vector<F> reinterpretShape(VectorSpecies<F> toSpecies, int part) {
250         return super.reinterpretShapeTemplate(toSpecies, part);  // specialize
251     }
252 
253     // Specialized algebraic operations:
254 
255     // The following definition forces a specialized version of this
256     // crucial method into the v-table of this class.  A call to add()
257     // will inline to a call to lanewise(ADD,), at which point the JIT
258     // intrinsic will have the opcode of ADD, plus all the metadata
259     // for this particular class, enabling it to generate precise
260     // code.
261     //
262     // There is probably no benefit to the JIT to specialize the
263     // masked or broadcast versions of the lanewise method.
264 
265     @Override
266     @ForceInline
267     public LongMaxVector lanewise(Unary op) {
268         return (LongMaxVector) super.lanewiseTemplate(op);  // specialize
269     }
270 
271     @Override
272     @ForceInline
273     public LongMaxVector lanewise(Unary op, VectorMask<Long> m) {
274         return (LongMaxVector) super.lanewiseTemplate(op, LongMaxMask.class, (LongMaxMask) m);  // specialize
275     }
276 
277     @Override
278     @ForceInline
279     public LongMaxVector lanewise(Binary op, Vector<Long> v) {
280         return (LongMaxVector) super.lanewiseTemplate(op, v);  // specialize
281     }
282 
283     @Override
284     @ForceInline
285     public LongMaxVector lanewise(Binary op, Vector<Long> v, VectorMask<Long> m) {
286         return (LongMaxVector) super.lanewiseTemplate(op, LongMaxMask.class, v, (LongMaxMask) m);  // specialize
287     }
288 
289     /*package-private*/
290     @Override
291     @ForceInline LongMaxVector
292     lanewiseShift(VectorOperators.Binary op, int e) {
293         return (LongMaxVector) super.lanewiseShiftTemplate(op, e);  // specialize
294     }
295 
296     /*package-private*/
297     @Override
298     @ForceInline LongMaxVector
299     lanewiseShift(VectorOperators.Binary op, int e, VectorMask<Long> m) {
300         return (LongMaxVector) super.lanewiseShiftTemplate(op, LongMaxMask.class, e, (LongMaxMask) m);  // specialize
301     }
302 
303     /*package-private*/
304     @Override
305     @ForceInline
306     public final
307     LongMaxVector
308     lanewise(Ternary op, Vector<Long> v1, Vector<Long> v2) {
309         return (LongMaxVector) super.lanewiseTemplate(op, v1, v2);  // specialize
310     }
311 
312     @Override
313     @ForceInline
314     public final
315     LongMaxVector
316     lanewise(Ternary op, Vector<Long> v1, Vector<Long> v2, VectorMask<Long> m) {
317         return (LongMaxVector) super.lanewiseTemplate(op, LongMaxMask.class, v1, v2, (LongMaxMask) m);  // specialize
318     }
319 
320     @Override
321     @ForceInline
322     public final
323     LongMaxVector addIndex(int scale) {
324         return (LongMaxVector) super.addIndexTemplate(scale);  // specialize
325     }
326 
327     // Type specific horizontal reductions
328 
329     @Override
330     @ForceInline
331     public final long reduceLanes(VectorOperators.Associative op) {
332         return super.reduceLanesTemplate(op);  // specialized
333     }
334 
335     @Override
336     @ForceInline
337     public final long reduceLanes(VectorOperators.Associative op,
338                                     VectorMask<Long> m) {
339         return super.reduceLanesTemplate(op, LongMaxMask.class, (LongMaxMask) m);  // specialized
340     }
341 
342     @Override
343     @ForceInline
344     public final long reduceLanesToLong(VectorOperators.Associative op) {
345         return (long) super.reduceLanesTemplate(op);  // specialized
346     }
347 
348     @Override
349     @ForceInline
350     public final long reduceLanesToLong(VectorOperators.Associative op,
351                                         VectorMask<Long> m) {
352         return (long) super.reduceLanesTemplate(op, LongMaxMask.class, (LongMaxMask) m);  // specialized
353     }
354 
355     @ForceInline
356     public VectorShuffle<Long> toShuffle() {
357         return super.toShuffleTemplate(LongMaxShuffle.class); // specialize
358     }
359 
360     // Specialized unary testing
361 
362     @Override
363     @ForceInline
364     public final LongMaxMask test(Test op) {
365         return super.testTemplate(LongMaxMask.class, op);  // specialize
366     }
367 
368     // Specialized comparisons
369 
370     @Override
371     @ForceInline
372     public final LongMaxMask compare(Comparison op, Vector<Long> v) {
373         return super.compareTemplate(LongMaxMask.class, op, v);  // specialize
374     }
375 
376     @Override
377     @ForceInline
378     public final LongMaxMask compare(Comparison op, long s) {
379         return super.compareTemplate(LongMaxMask.class, op, s);  // specialize
380     }
381 
382 
383     @Override
384     @ForceInline
385     public final LongMaxMask compare(Comparison op, Vector<Long> v, VectorMask<Long> m) {
386         return super.compareTemplate(LongMaxMask.class, op, v, (LongMaxMask) m);
387     }
388 
389 
390     @Override
391     @ForceInline
392     public LongMaxVector blend(Vector<Long> v, VectorMask<Long> m) {
393         return (LongMaxVector)
394             super.blendTemplate(LongMaxMask.class,
395                                 (LongMaxVector) v,
396                                 (LongMaxMask) m);  // specialize
397     }
398 
399     @Override
400     @ForceInline
401     public LongMaxVector slice(int origin, Vector<Long> v) {
402         return (LongMaxVector) super.sliceTemplate(origin, v);  // specialize
403     }
404 
405     @Override
406     @ForceInline
407     public LongMaxVector slice(int origin) {
408         return (LongMaxVector) super.sliceTemplate(origin);  // specialize
409     }

426     @Override
427     @ForceInline
428     public LongMaxVector unslice(int origin) {
429         return (LongMaxVector) super.unsliceTemplate(origin);  // specialize
430     }
431 
432     @Override
433     @ForceInline
434     public LongMaxVector rearrange(VectorShuffle<Long> s) {
435         return (LongMaxVector)
436             super.rearrangeTemplate(LongMaxShuffle.class,
437                                     (LongMaxShuffle) s);  // specialize
438     }
439 
440     @Override
441     @ForceInline
442     public LongMaxVector rearrange(VectorShuffle<Long> shuffle,
443                                   VectorMask<Long> m) {
444         return (LongMaxVector)
445             super.rearrangeTemplate(LongMaxShuffle.class,
446                                     LongMaxMask.class,
447                                     (LongMaxShuffle) shuffle,
448                                     (LongMaxMask) m);  // specialize
449     }
450 
451     @Override
452     @ForceInline
453     public LongMaxVector rearrange(VectorShuffle<Long> s,
454                                   Vector<Long> v) {
455         return (LongMaxVector)
456             super.rearrangeTemplate(LongMaxShuffle.class,
457                                     (LongMaxShuffle) s,
458                                     (LongMaxVector) v);  // specialize
459     }
460 
461     @Override
462     @ForceInline
463     public LongMaxVector selectFrom(Vector<Long> v) {
464         return (LongMaxVector)
465             super.selectFromTemplate((LongMaxVector) v);  // specialize
466     }

590 
591         /**
592          * Helper function for lane-wise mask conversions.
593          * This function kicks in after intrinsic failure.
594          */
595         @ForceInline
596         private final <E>
597         VectorMask<E> defaultMaskCast(AbstractSpecies<E> dsp) {
598             if (length() != dsp.laneCount())
599                 throw new IllegalArgumentException("VectorMask length and species length differ");
600             boolean[] maskArray = toArray();
601             return  dsp.maskFactory(maskArray).check(dsp);
602         }
603 
604         @Override
605         @ForceInline
606         public <E> VectorMask<E> cast(VectorSpecies<E> dsp) {
607             AbstractSpecies<E> species = (AbstractSpecies<E>) dsp;
608             if (length() != species.laneCount())
609                 throw new IllegalArgumentException("VectorMask length and species length differ");
610 
611             return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
612                 this.getClass(), ETYPE, VLENGTH,
613                 species.maskType(), species.elementType(), VLENGTH,
614                 this, species,
615                 (m, s) -> s.maskFactory(m.toArray()).check(s));




616         }
617 
618         @Override
619         @ForceInline
620         public LongMaxMask eq(VectorMask<Long> mask) {
621             Objects.requireNonNull(mask);
622             LongMaxMask m = (LongMaxMask)mask;
623             return xor(m.not());
624         }
625 
626         // Unary operations
627 
628         @Override
629         @ForceInline
630         public LongMaxMask not() {
631             return xor(maskAll(true));
632         }
633 
634         // Binary operations
635 
636         @Override
637         @ForceInline
638         public LongMaxMask and(VectorMask<Long> mask) {
639             Objects.requireNonNull(mask);
640             LongMaxMask m = (LongMaxMask)mask;
641             return VectorSupport.binaryOp(VECTOR_OP_AND, LongMaxMask.class, null, long.class, VLENGTH,
642                                           this, m, null,
643                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
644         }
645 
646         @Override
647         @ForceInline
648         public LongMaxMask or(VectorMask<Long> mask) {
649             Objects.requireNonNull(mask);
650             LongMaxMask m = (LongMaxMask)mask;
651             return VectorSupport.binaryOp(VECTOR_OP_OR, LongMaxMask.class, null, long.class, VLENGTH,
652                                           this, m, null,
653                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
654         }
655 
656         @ForceInline
657         /* package-private */
658         LongMaxMask xor(VectorMask<Long> mask) {
659             Objects.requireNonNull(mask);
660             LongMaxMask m = (LongMaxMask)mask;
661             return VectorSupport.binaryOp(VECTOR_OP_XOR, LongMaxMask.class, null, long.class, VLENGTH,
662                                           this, m, null,
663                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
664         }
665 
666         // Mask Query operations
667 
668         @Override
669         @ForceInline
670         public int trueCount() {
671             return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, LongMaxMask.class, long.class, VLENGTH, this,
672                                                       (m) -> trueCountHelper(m.getBits()));
673         }
674 
675         @Override
676         @ForceInline
677         public int firstTrue() {
678             return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, LongMaxMask.class, long.class, VLENGTH, this,
679                                                       (m) -> firstTrueHelper(m.getBits()));
680         }
681 
682         @Override
683         @ForceInline
684         public int lastTrue() {
685             return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, LongMaxMask.class, long.class, VLENGTH, this,
686                                                       (m) -> lastTrueHelper(m.getBits()));
687         }
688 
689         @Override
690         @ForceInline
691         public long toLong() {
692             if (length() > Long.SIZE) {
693                 throw new UnsupportedOperationException("too many lanes for one long");
694             }
695             return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, LongMaxMask.class, long.class, VLENGTH, this,
696                                                       (m) -> toLongHelper(m.getBits()));
697         }
698 
699         // Reductions
700 
701         @Override
702         @ForceInline
703         public boolean anyTrue() {
704             return VectorSupport.test(BT_ne, LongMaxMask.class, long.class, VLENGTH,
705                                          this, vspecies().maskAll(true),
706                                          (m, __) -> anyTrueHelper(((LongMaxMask)m).getBits()));
707         }
708 
709         @Override
710         @ForceInline
711         public boolean allTrue() {
712             return VectorSupport.test(BT_overflow, LongMaxMask.class, long.class, VLENGTH,
713                                          this, vspecies().maskAll(true),
714                                          (m, __) -> allTrueHelper(((LongMaxMask)m).getBits()));
715         }
716 

787             byte[] r = new byte[reorder1.length];
788             for (int i = 0; i < reorder1.length; i++) {
789                 int ssi = reorder2[i];
790                 r[i] = reorder1[ssi];  // throws on exceptional index
791             }
792             return new LongMaxShuffle(r);
793         }
794     }
795 
796     // ================================================
797 
798     // Specialized low-level memory operations.
799 
800     @ForceInline
801     @Override
802     final
803     LongVector fromArray0(long[] a, int offset) {
804         return super.fromArray0Template(a, offset);  // specialize
805     }
806 
807     @ForceInline
808     @Override
809     final
810     LongVector fromArray0(long[] a, int offset, VectorMask<Long> m) {
811         return super.fromArray0Template(LongMaxMask.class, a, offset, (LongMaxMask) m);  // specialize
812     }
813 
814     @ForceInline
815     @Override
816     final
817     LongVector fromArray0(long[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Long> m) {
818         return super.fromArray0Template(LongMaxMask.class, a, offset, indexMap, mapOffset, (LongMaxMask) m);
819     }
820 
821 
822 
823     @ForceInline
824     @Override
825     final
826     LongVector fromByteArray0(byte[] a, int offset) {
827         return super.fromByteArray0Template(a, offset);  // specialize
828     }
829 
830     @ForceInline
831     @Override
832     final
833     LongVector fromByteArray0(byte[] a, int offset, VectorMask<Long> m) {
834         return super.fromByteArray0Template(LongMaxMask.class, a, offset, (LongMaxMask) m);  // specialize
835     }
836 
837     @ForceInline
838     @Override
839     final
840     LongVector fromByteBuffer0(ByteBuffer bb, int offset) {
841         return super.fromByteBuffer0Template(bb, offset);  // specialize
842     }
843 
844     @ForceInline
845     @Override
846     final
847     LongVector fromByteBuffer0(ByteBuffer bb, int offset, VectorMask<Long> m) {
848         return super.fromByteBuffer0Template(LongMaxMask.class, bb, offset, (LongMaxMask) m);  // specialize
849     }
850 
851     @ForceInline
852     @Override
853     final
854     void intoArray0(long[] a, int offset) {
855         super.intoArray0Template(a, offset);  // specialize
856     }
857 
858     @ForceInline
859     @Override
860     final
861     void intoArray0(long[] a, int offset, VectorMask<Long> m) {
862         super.intoArray0Template(LongMaxMask.class, a, offset, (LongMaxMask) m);
863     }
864 
865     @ForceInline
866     @Override
867     final
868     void intoArray0(long[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Long> m) {
869         super.intoArray0Template(LongMaxMask.class, a, offset, indexMap, mapOffset, (LongMaxMask) m);
870     }
871 
872 
873     @ForceInline
874     @Override
875     final
876     void intoByteArray0(byte[] a, int offset) {
877         super.intoByteArray0Template(a, offset);  // specialize
878     }
879 
880     @ForceInline
881     @Override
882     final
883     void intoByteArray0(byte[] a, int offset, VectorMask<Long> m) {
884         super.intoByteArray0Template(LongMaxMask.class, a, offset, (LongMaxMask) m);  // specialize
885     }
886 
887     @ForceInline
888     @Override
889     final
890     void intoByteBuffer0(ByteBuffer bb, int offset, VectorMask<Long> m) {
891         super.intoByteBuffer0Template(LongMaxMask.class, bb, offset, (LongMaxMask) m);
892     }
893 
894 
895     // End of specialized low-level memory operations.
896 
897     // ================================================
898 
899 }
< prev index next >