< prev index next >

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

Print this page

219 
220     @ForceInline
221     final @Override
222     Int64Vector tOp(Vector<Integer> v1, Vector<Integer> v2, FTriOp f) {
223         return (Int64Vector)
224             super.tOpTemplate((Int64Vector)v1, (Int64Vector)v2,
225                               f);  // specialize
226     }
227 
228     @ForceInline
229     final @Override
230     Int64Vector tOp(Vector<Integer> v1, Vector<Integer> v2,
231                      VectorMask<Integer> m, FTriOp f) {
232         return (Int64Vector)
233             super.tOpTemplate((Int64Vector)v1, (Int64Vector)v2,
234                               (Int64Mask)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 Int64Vector lanewise(Unary op) {
273         return (Int64Vector) super.lanewiseTemplate(op);  // specialize
274     }
275 






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






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







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








298     @Override
299     @ForceInline
300     public final
301     Int64Vector addIndex(int scale) {
302         return (Int64Vector) 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(Int64Shuffle.class); // specialize
336     }
337 
338     // Specialized unary testing
339 
340     @Override
341     @ForceInline
342     public final Int64Mask test(Test op) {
343         return super.testTemplate(Int64Mask.class, op);  // specialize
344     }
345 
346     // Specialized comparisons
347 
348     @Override
349     @ForceInline
350     public final Int64Mask compare(Comparison op, Vector<Integer> v) {
351         return super.compareTemplate(Int64Mask.class, op, v);  // specialize
352     }
353 
354     @Override
355     @ForceInline
356     public final Int64Mask compare(Comparison op, int s) {
357         return super.compareTemplate(Int64Mask.class, op, s);  // specialize
358     }
359 
360     @Override
361     @ForceInline
362     public final Int64Mask compare(Comparison op, long s) {
363         return super.compareTemplate(Int64Mask.class, op, s);  // specialize
364     }
365 







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

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

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

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










668         }
669 
670         // Reductions
671 
672         @Override
673         @ForceInline
674         public boolean anyTrue() {
675             return VectorSupport.test(BT_ne, Int64Mask.class, int.class, VLENGTH,
676                                          this, vspecies().maskAll(true),
677                                          (m, __) -> anyTrueHelper(((Int64Mask)m).getBits()));
678         }
679 
680         @Override
681         @ForceInline
682         public boolean allTrue() {
683             return VectorSupport.test(BT_overflow, Int64Mask.class, int.class, VLENGTH,
684                                          this, vspecies().maskAll(true),
685                                          (m, __) -> allTrueHelper(((Int64Mask)m).getBits()));
686         }
687 

758             byte[] r = new byte[reorder1.length];
759             for (int i = 0; i < reorder1.length; i++) {
760                 int ssi = reorder2[i];
761                 r[i] = reorder1[ssi];  // throws on exceptional index
762             }
763             return new Int64Shuffle(r);
764         }
765     }
766 
767     // ================================================
768 
769     // Specialized low-level memory operations.
770 
771     @ForceInline
772     @Override
773     final
774     IntVector fromArray0(int[] a, int offset) {
775         return super.fromArray0Template(a, offset);  // specialize
776     }
777 














778 
779 
780     @ForceInline
781     @Override
782     final
783     IntVector fromByteArray0(byte[] a, int offset) {
784         return super.fromByteArray0Template(a, offset);  // specialize
785     }
786 







787     @ForceInline
788     @Override
789     final
790     IntVector fromByteBuffer0(ByteBuffer bb, int offset) {
791         return super.fromByteBuffer0Template(bb, offset);  // specialize
792     }
793 







794     @ForceInline
795     @Override
796     final
797     void intoArray0(int[] a, int offset) {
798         super.intoArray0Template(a, offset);  // specialize
799     }
800 















801     @ForceInline
802     @Override
803     final
804     void intoByteArray0(byte[] a, int offset) {
805         super.intoByteArray0Template(a, offset);  // specialize
806     }
807 















808     // End of specialized low-level memory operations.
809 
810     // ================================================
811 
812 }

219 
220     @ForceInline
221     final @Override
222     Int64Vector tOp(Vector<Integer> v1, Vector<Integer> v2, FTriOp f) {
223         return (Int64Vector)
224             super.tOpTemplate((Int64Vector)v1, (Int64Vector)v2,
225                               f);  // specialize
226     }
227 
228     @ForceInline
229     final @Override
230     Int64Vector tOp(Vector<Integer> v1, Vector<Integer> v2,
231                      VectorMask<Integer> m, FTriOp f) {
232         return (Int64Vector)
233             super.tOpTemplate((Int64Vector)v1, (Int64Vector)v2,
234                               (Int64Mask)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 Int64Vector lanewise(Unary op) {
273         return (Int64Vector) super.lanewiseTemplate(op);  // specialize
274     }
275 
276     @Override
277     @ForceInline
278     public Int64Vector lanewise(Unary op, VectorMask<Integer> m) {
279         return (Int64Vector) super.lanewiseTemplate(op, Int64Mask.class, (Int64Mask) m);  // specialize
280     }
281 
282     @Override
283     @ForceInline
284     public Int64Vector lanewise(Binary op, Vector<Integer> v) {
285         return (Int64Vector) super.lanewiseTemplate(op, v);  // specialize
286     }
287 
288     @Override
289     @ForceInline
290     public Int64Vector lanewise(Binary op, Vector<Integer> v, VectorMask<Integer> m) {
291         return (Int64Vector) super.lanewiseTemplate(op, Int64Mask.class, v, (Int64Mask) m);  // specialize
292     }
293 
294     /*package-private*/
295     @Override
296     @ForceInline Int64Vector
297     lanewiseShift(VectorOperators.Binary op, int e) {
298         return (Int64Vector) super.lanewiseShiftTemplate(op, e);  // specialize
299     }
300 
301     /*package-private*/
302     @Override
303     @ForceInline Int64Vector
304     lanewiseShift(VectorOperators.Binary op, int e, VectorMask<Integer> m) {
305         return (Int64Vector) super.lanewiseShiftTemplate(op, Int64Mask.class, e, (Int64Mask) m);  // specialize
306     }
307 
308     /*package-private*/
309     @Override
310     @ForceInline
311     public final
312     Int64Vector
313     lanewise(Ternary op, Vector<Integer> v1, Vector<Integer> v2) {
314         return (Int64Vector) super.lanewiseTemplate(op, v1, v2);  // specialize
315     }
316 
317     @Override
318     @ForceInline
319     public final
320     Int64Vector
321     lanewise(Ternary op, Vector<Integer> v1, Vector<Integer> v2, VectorMask<Integer> m) {
322         return (Int64Vector) super.lanewiseTemplate(op, Int64Mask.class, v1, v2, (Int64Mask) m);  // specialize
323     }
324 
325     @Override
326     @ForceInline
327     public final
328     Int64Vector addIndex(int scale) {
329         return (Int64Vector) 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, Int64Mask.class, (Int64Mask) 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, Int64Mask.class, (Int64Mask) m);  // specialized
358     }
359 
360     @ForceInline
361     public VectorShuffle<Integer> toShuffle() {
362         return super.toShuffleTemplate(Int64Shuffle.class); // specialize
363     }
364 
365     // Specialized unary testing
366 
367     @Override
368     @ForceInline
369     public final Int64Mask test(Test op) {
370         return super.testTemplate(Int64Mask.class, op);  // specialize
371     }
372 
373     // Specialized comparisons
374 
375     @Override
376     @ForceInline
377     public final Int64Mask compare(Comparison op, Vector<Integer> v) {
378         return super.compareTemplate(Int64Mask.class, op, v);  // specialize
379     }
380 
381     @Override
382     @ForceInline
383     public final Int64Mask compare(Comparison op, int s) {
384         return super.compareTemplate(Int64Mask.class, op, s);  // specialize
385     }
386 
387     @Override
388     @ForceInline
389     public final Int64Mask compare(Comparison op, long s) {
390         return super.compareTemplate(Int64Mask.class, op, s);  // specialize
391     }
392 
393     @Override
394     @ForceInline
395     public final Int64Mask compare(Comparison op, Vector<Integer> v, VectorMask<Integer> m) {
396         return super.compareTemplate(Int64Mask.class, op, v, (Int64Mask) m);
397     }
398 
399 
400     @Override
401     @ForceInline
402     public Int64Vector blend(Vector<Integer> v, VectorMask<Integer> m) {
403         return (Int64Vector)
404             super.blendTemplate(Int64Mask.class,
405                                 (Int64Vector) v,
406                                 (Int64Mask) m);  // specialize
407     }
408 
409     @Override
410     @ForceInline
411     public Int64Vector slice(int origin, Vector<Integer> v) {
412         return (Int64Vector) super.sliceTemplate(origin, v);  // specialize
413     }
414 
415     @Override
416     @ForceInline
417     public Int64Vector slice(int origin) {
418         return (Int64Vector) super.sliceTemplate(origin);  // specialize
419     }

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

602 
603         /**
604          * Helper function for lane-wise mask conversions.
605          * This function kicks in after intrinsic failure.
606          */
607         @ForceInline
608         private final <E>
609         VectorMask<E> defaultMaskCast(AbstractSpecies<E> dsp) {
610             if (length() != dsp.laneCount())
611                 throw new IllegalArgumentException("VectorMask length and species length differ");
612             boolean[] maskArray = toArray();
613             return  dsp.maskFactory(maskArray).check(dsp);
614         }
615 
616         @Override
617         @ForceInline
618         public <E> VectorMask<E> cast(VectorSpecies<E> dsp) {
619             AbstractSpecies<E> species = (AbstractSpecies<E>) dsp;
620             if (length() != species.laneCount())
621                 throw new IllegalArgumentException("VectorMask length and species length differ");
622 
623             return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
624                 this.getClass(), ETYPE, VLENGTH,
625                 species.maskType(), species.elementType(), VLENGTH,
626                 this, species,
627                 (m, s) -> s.maskFactory(m.toArray()).check(s));




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

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