< prev index next >

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

Print this page

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






276     @Override
277     @ForceInline
278     public Int512Vector lanewise(Binary op, Vector<Integer> v) {
279         return (Int512Vector) super.lanewiseTemplate(op, v);  // specialize
280     }
281 






282     /*package-private*/
283     @Override
284     @ForceInline Int512Vector
285     lanewiseShift(VectorOperators.Binary op, int e) {
286         return (Int512Vector) super.lanewiseShiftTemplate(op, e);  // specialize
287     }
288 







289     /*package-private*/
290     @Override
291     @ForceInline
292     public final
293     Int512Vector
294     lanewise(VectorOperators.Ternary op, Vector<Integer> v1, Vector<Integer> v2) {
295         return (Int512Vector) super.lanewiseTemplate(op, v1, v2);  // specialize
296     }
297 








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







366     @Override
367     @ForceInline
368     public Int512Vector blend(Vector<Integer> v, VectorMask<Integer> m) {
369         return (Int512Vector)
370             super.blendTemplate(Int512Mask.class,
371                                 (Int512Vector) v,
372                                 (Int512Mask) m);  // specialize
373     }
374 
375     @Override
376     @ForceInline
377     public Int512Vector slice(int origin, Vector<Integer> v) {
378         return (Int512Vector) super.sliceTemplate(origin, v);  // specialize
379     }
380 
381     @Override
382     @ForceInline
383     public Int512Vector slice(int origin) {
384         return (Int512Vector) super.sliceTemplate(origin);  // specialize
385     }

402     @Override
403     @ForceInline
404     public Int512Vector unslice(int origin) {
405         return (Int512Vector) super.unsliceTemplate(origin);  // specialize
406     }
407 
408     @Override
409     @ForceInline
410     public Int512Vector rearrange(VectorShuffle<Integer> s) {
411         return (Int512Vector)
412             super.rearrangeTemplate(Int512Shuffle.class,
413                                     (Int512Shuffle) s);  // specialize
414     }
415 
416     @Override
417     @ForceInline
418     public Int512Vector rearrange(VectorShuffle<Integer> shuffle,
419                                   VectorMask<Integer> m) {
420         return (Int512Vector)
421             super.rearrangeTemplate(Int512Shuffle.class,

422                                     (Int512Shuffle) shuffle,
423                                     (Int512Mask) m);  // specialize
424     }
425 
426     @Override
427     @ForceInline
428     public Int512Vector rearrange(VectorShuffle<Integer> s,
429                                   Vector<Integer> v) {
430         return (Int512Vector)
431             super.rearrangeTemplate(Int512Shuffle.class,
432                                     (Int512Shuffle) s,
433                                     (Int512Vector) v);  // specialize
434     }
435 
436     @Override
437     @ForceInline
438     public Int512Vector selectFrom(Vector<Integer> v) {
439         return (Int512Vector)
440             super.selectFromTemplate((Int512Vector) v);  // specialize
441     }

595 
596         /**
597          * Helper function for lane-wise mask conversions.
598          * This function kicks in after intrinsic failure.
599          */
600         @ForceInline
601         private final <E>
602         VectorMask<E> defaultMaskCast(AbstractSpecies<E> dsp) {
603             if (length() != dsp.laneCount())
604                 throw new IllegalArgumentException("VectorMask length and species length differ");
605             boolean[] maskArray = toArray();
606             return  dsp.maskFactory(maskArray).check(dsp);
607         }
608 
609         @Override
610         @ForceInline
611         public <E> VectorMask<E> cast(VectorSpecies<E> dsp) {
612             AbstractSpecies<E> species = (AbstractSpecies<E>) dsp;
613             if (length() != species.laneCount())
614                 throw new IllegalArgumentException("VectorMask length and species length differ");
615             if (VSIZE == species.vectorBitSize()) {
616                 Class<?> dtype = species.elementType();
617                 Class<?> dmtype = species.maskType();
618                 return VectorSupport.convert(VectorSupport.VECTOR_OP_REINTERPRET,
619                     this.getClass(), ETYPE, VLENGTH,
620                     dmtype, dtype, VLENGTH,
621                     this, species,
622                     Int512Mask::defaultMaskCast);
623             }
624             return this.defaultMaskCast(species);
625         }
626 
627         @Override
628         @ForceInline
629         public Int512Mask eq(VectorMask<Integer> mask) {
630             Objects.requireNonNull(mask);
631             Int512Mask m = (Int512Mask)mask;
632             return xor(m.not());
633         }
634 
635         // Unary operations
636 
637         @Override
638         @ForceInline
639         public Int512Mask not() {
640             return xor(maskAll(true));
641         }
642 
643         // Binary operations
644 
645         @Override
646         @ForceInline
647         public Int512Mask and(VectorMask<Integer> mask) {
648             Objects.requireNonNull(mask);
649             Int512Mask m = (Int512Mask)mask;
650             return VectorSupport.binaryOp(VECTOR_OP_AND, Int512Mask.class, int.class, VLENGTH,
651                                              this, m,
652                                              (m1, m2) -> m1.bOp(m2, (i, a, b) -> a & b));
653         }
654 
655         @Override
656         @ForceInline
657         public Int512Mask or(VectorMask<Integer> mask) {
658             Objects.requireNonNull(mask);
659             Int512Mask m = (Int512Mask)mask;
660             return VectorSupport.binaryOp(VECTOR_OP_OR, Int512Mask.class, int.class, VLENGTH,
661                                              this, m,
662                                              (m1, m2) -> m1.bOp(m2, (i, a, b) -> a | b));
663         }
664 
665         @ForceInline
666         /* package-private */
667         Int512Mask xor(VectorMask<Integer> mask) {
668             Objects.requireNonNull(mask);
669             Int512Mask m = (Int512Mask)mask;
670             return VectorSupport.binaryOp(VECTOR_OP_XOR, Int512Mask.class, int.class, VLENGTH,
671                                           this, m,
672                                           (m1, m2) -> m1.bOp(m2, (i, a, b) -> a ^ b));
673         }
674 
675         // Mask Query operations
676 
677         @Override
678         @ForceInline
679         public int trueCount() {
680             return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Int512Mask.class, int.class, VLENGTH, this,
681                                                       (m) -> trueCountHelper(((Int512Mask)m).getBits()));
682         }
683 
684         @Override
685         @ForceInline
686         public int firstTrue() {
687             return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Int512Mask.class, int.class, VLENGTH, this,
688                                                       (m) -> firstTrueHelper(((Int512Mask)m).getBits()));
689         }
690 
691         @Override
692         @ForceInline
693         public int lastTrue() {
694             return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Int512Mask.class, int.class, VLENGTH, this,
695                                                       (m) -> lastTrueHelper(((Int512Mask)m).getBits()));










696         }
697 
698         // Reductions
699 
700         @Override
701         @ForceInline
702         public boolean anyTrue() {
703             return VectorSupport.test(BT_ne, Int512Mask.class, int.class, VLENGTH,
704                                          this, vspecies().maskAll(true),
705                                          (m, __) -> anyTrueHelper(((Int512Mask)m).getBits()));
706         }
707 
708         @Override
709         @ForceInline
710         public boolean allTrue() {
711             return VectorSupport.test(BT_overflow, Int512Mask.class, int.class, VLENGTH,
712                                          this, vspecies().maskAll(true),
713                                          (m, __) -> allTrueHelper(((Int512Mask)m).getBits()));
714         }
715 

786             byte[] r = new byte[reorder1.length];
787             for (int i = 0; i < reorder1.length; i++) {
788                 int ssi = reorder2[i];
789                 r[i] = reorder1[ssi];  // throws on exceptional index
790             }
791             return new Int512Shuffle(r);
792         }
793     }
794 
795     // ================================================
796 
797     // Specialized low-level memory operations.
798 
799     @ForceInline
800     @Override
801     final
802     IntVector fromArray0(int[] a, int offset) {
803         return super.fromArray0Template(a, offset);  // specialize
804     }
805 














806 
807 
808     @ForceInline
809     @Override
810     final
811     IntVector fromByteArray0(byte[] a, int offset) {
812         return super.fromByteArray0Template(a, offset);  // specialize
813     }
814 







815     @ForceInline
816     @Override
817     final
818     IntVector fromByteBuffer0(ByteBuffer bb, int offset) {
819         return super.fromByteBuffer0Template(bb, offset);  // specialize
820     }
821 







822     @ForceInline
823     @Override
824     final
825     void intoArray0(int[] a, int offset) {
826         super.intoArray0Template(a, offset);  // specialize
827     }
828 















829     @ForceInline
830     @Override
831     final
832     void intoByteArray0(byte[] a, int offset) {
833         super.intoByteArray0Template(a, offset);  // specialize
834     }
835 















836     // End of specialized low-level memory operations.
837 
838     // ================================================
839 
840 }

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

436     @Override
437     @ForceInline
438     public Int512Vector unslice(int origin) {
439         return (Int512Vector) super.unsliceTemplate(origin);  // specialize
440     }
441 
442     @Override
443     @ForceInline
444     public Int512Vector rearrange(VectorShuffle<Integer> s) {
445         return (Int512Vector)
446             super.rearrangeTemplate(Int512Shuffle.class,
447                                     (Int512Shuffle) s);  // specialize
448     }
449 
450     @Override
451     @ForceInline
452     public Int512Vector rearrange(VectorShuffle<Integer> shuffle,
453                                   VectorMask<Integer> m) {
454         return (Int512Vector)
455             super.rearrangeTemplate(Int512Shuffle.class,
456                                     Int512Mask.class,
457                                     (Int512Shuffle) shuffle,
458                                     (Int512Mask) m);  // specialize
459     }
460 
461     @Override
462     @ForceInline
463     public Int512Vector rearrange(VectorShuffle<Integer> s,
464                                   Vector<Integer> v) {
465         return (Int512Vector)
466             super.rearrangeTemplate(Int512Shuffle.class,
467                                     (Int512Shuffle) s,
468                                     (Int512Vector) v);  // specialize
469     }
470 
471     @Override
472     @ForceInline
473     public Int512Vector selectFrom(Vector<Integer> v) {
474         return (Int512Vector)
475             super.selectFromTemplate((Int512Vector) v);  // specialize
476     }

630 
631         /**
632          * Helper function for lane-wise mask conversions.
633          * This function kicks in after intrinsic failure.
634          */
635         @ForceInline
636         private final <E>
637         VectorMask<E> defaultMaskCast(AbstractSpecies<E> dsp) {
638             if (length() != dsp.laneCount())
639                 throw new IllegalArgumentException("VectorMask length and species length differ");
640             boolean[] maskArray = toArray();
641             return  dsp.maskFactory(maskArray).check(dsp);
642         }
643 
644         @Override
645         @ForceInline
646         public <E> VectorMask<E> cast(VectorSpecies<E> dsp) {
647             AbstractSpecies<E> species = (AbstractSpecies<E>) dsp;
648             if (length() != species.laneCount())
649                 throw new IllegalArgumentException("VectorMask length and species length differ");
650 
651             return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
652                 this.getClass(), ETYPE, VLENGTH,
653                 species.maskType(), species.elementType(), VLENGTH,
654                 this, species,
655                 (m, s) -> s.maskFactory(m.toArray()).check(s));




656         }
657 
658         @Override
659         @ForceInline
660         public Int512Mask eq(VectorMask<Integer> mask) {
661             Objects.requireNonNull(mask);
662             Int512Mask m = (Int512Mask)mask;
663             return xor(m.not());
664         }
665 
666         // Unary operations
667 
668         @Override
669         @ForceInline
670         public Int512Mask not() {
671             return xor(maskAll(true));
672         }
673 
674         // Binary operations
675 
676         @Override
677         @ForceInline
678         public Int512Mask and(VectorMask<Integer> mask) {
679             Objects.requireNonNull(mask);
680             Int512Mask m = (Int512Mask)mask;
681             return VectorSupport.binaryOp(VECTOR_OP_AND, Int512Mask.class, null, int.class, VLENGTH,
682                                           this, m, null,
683                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a & b));
684         }
685 
686         @Override
687         @ForceInline
688         public Int512Mask or(VectorMask<Integer> mask) {
689             Objects.requireNonNull(mask);
690             Int512Mask m = (Int512Mask)mask;
691             return VectorSupport.binaryOp(VECTOR_OP_OR, Int512Mask.class, null, int.class, VLENGTH,
692                                           this, m, null,
693                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a | b));
694         }
695 
696         @ForceInline
697         /* package-private */
698         Int512Mask xor(VectorMask<Integer> mask) {
699             Objects.requireNonNull(mask);
700             Int512Mask m = (Int512Mask)mask;
701             return VectorSupport.binaryOp(VECTOR_OP_XOR, Int512Mask.class, null, int.class, VLENGTH,
702                                           this, m, null,
703                                           (m1, m2, vm) -> m1.bOp(m2, (i, a, b) -> a ^ b));
704         }
705 
706         // Mask Query operations
707 
708         @Override
709         @ForceInline
710         public int trueCount() {
711             return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TRUECOUNT, Int512Mask.class, int.class, VLENGTH, this,
712                                                       (m) -> trueCountHelper(m.getBits()));
713         }
714 
715         @Override
716         @ForceInline
717         public int firstTrue() {
718             return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_FIRSTTRUE, Int512Mask.class, int.class, VLENGTH, this,
719                                                       (m) -> firstTrueHelper(m.getBits()));
720         }
721 
722         @Override
723         @ForceInline
724         public int lastTrue() {
725             return (int) VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_LASTTRUE, Int512Mask.class, int.class, VLENGTH, this,
726                                                       (m) -> lastTrueHelper(m.getBits()));
727         }
728 
729         @Override
730         @ForceInline
731         public long toLong() {
732             if (length() > Long.SIZE) {
733                 throw new UnsupportedOperationException("too many lanes for one long");
734             }
735             return VectorSupport.maskReductionCoerced(VECTOR_OP_MASK_TOLONG, Int512Mask.class, int.class, VLENGTH, this,
736                                                       (m) -> toLongHelper(m.getBits()));
737         }
738 
739         // Reductions
740 
741         @Override
742         @ForceInline
743         public boolean anyTrue() {
744             return VectorSupport.test(BT_ne, Int512Mask.class, int.class, VLENGTH,
745                                          this, vspecies().maskAll(true),
746                                          (m, __) -> anyTrueHelper(((Int512Mask)m).getBits()));
747         }
748 
749         @Override
750         @ForceInline
751         public boolean allTrue() {
752             return VectorSupport.test(BT_overflow, Int512Mask.class, int.class, VLENGTH,
753                                          this, vspecies().maskAll(true),
754                                          (m, __) -> allTrueHelper(((Int512Mask)m).getBits()));
755         }
756 

827             byte[] r = new byte[reorder1.length];
828             for (int i = 0; i < reorder1.length; i++) {
829                 int ssi = reorder2[i];
830                 r[i] = reorder1[ssi];  // throws on exceptional index
831             }
832             return new Int512Shuffle(r);
833         }
834     }
835 
836     // ================================================
837 
838     // Specialized low-level memory operations.
839 
840     @ForceInline
841     @Override
842     final
843     IntVector fromArray0(int[] a, int offset) {
844         return super.fromArray0Template(a, offset);  // specialize
845     }
846 
847     @ForceInline
848     @Override
849     final
850     IntVector fromArray0(int[] a, int offset, VectorMask<Integer> m) {
851         return super.fromArray0Template(Int512Mask.class, a, offset, (Int512Mask) m);  // specialize
852     }
853 
854     @ForceInline
855     @Override
856     final
857     IntVector fromArray0(int[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Integer> m) {
858         return super.fromArray0Template(Int512Mask.class, a, offset, indexMap, mapOffset, (Int512Mask) m);
859     }
860 
861 
862 
863     @ForceInline
864     @Override
865     final
866     IntVector fromByteArray0(byte[] a, int offset) {
867         return super.fromByteArray0Template(a, offset);  // specialize
868     }
869 
870     @ForceInline
871     @Override
872     final
873     IntVector fromByteArray0(byte[] a, int offset, VectorMask<Integer> m) {
874         return super.fromByteArray0Template(Int512Mask.class, a, offset, (Int512Mask) m);  // specialize
875     }
876 
877     @ForceInline
878     @Override
879     final
880     IntVector fromByteBuffer0(ByteBuffer bb, int offset) {
881         return super.fromByteBuffer0Template(bb, offset);  // specialize
882     }
883 
884     @ForceInline
885     @Override
886     final
887     IntVector fromByteBuffer0(ByteBuffer bb, int offset, VectorMask<Integer> m) {
888         return super.fromByteBuffer0Template(Int512Mask.class, bb, offset, (Int512Mask) m);  // specialize
889     }
890 
891     @ForceInline
892     @Override
893     final
894     void intoArray0(int[] a, int offset) {
895         super.intoArray0Template(a, offset);  // specialize
896     }
897 
898     @ForceInline
899     @Override
900     final
901     void intoArray0(int[] a, int offset, VectorMask<Integer> m) {
902         super.intoArray0Template(Int512Mask.class, a, offset, (Int512Mask) m);
903     }
904 
905     @ForceInline
906     @Override
907     final
908     void intoArray0(int[] a, int offset, int[] indexMap, int mapOffset, VectorMask<Integer> m) {
909         super.intoArray0Template(Int512Mask.class, a, offset, indexMap, mapOffset, (Int512Mask) m);
910     }
911 
912 
913     @ForceInline
914     @Override
915     final
916     void intoByteArray0(byte[] a, int offset) {
917         super.intoByteArray0Template(a, offset);  // specialize
918     }
919 
920     @ForceInline
921     @Override
922     final
923     void intoByteArray0(byte[] a, int offset, VectorMask<Integer> m) {
924         super.intoByteArray0Template(Int512Mask.class, a, offset, (Int512Mask) m);  // specialize
925     }
926 
927     @ForceInline
928     @Override
929     final
930     void intoByteBuffer0(ByteBuffer bb, int offset, VectorMask<Integer> m) {
931         super.intoByteBuffer0Template(Int512Mask.class, bb, offset, (Int512Mask) m);
932     }
933 
934 
935     // End of specialized low-level memory operations.
936 
937     // ================================================
938 
939 }
< prev index next >