< prev index next >

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

Print this page

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






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






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







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








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







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

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

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

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










680         }
681 
682         // Reductions
683 
684         @Override
685         @ForceInline
686         public boolean anyTrue() {
687             return VectorSupport.test(BT_ne, Int256Mask.class, int.class, VLENGTH,
688                                          this, vspecies().maskAll(true),
689                                          (m, __) -> anyTrueHelper(((Int256Mask)m).getBits()));
690         }
691 
692         @Override
693         @ForceInline
694         public boolean allTrue() {
695             return VectorSupport.test(BT_overflow, Int256Mask.class, int.class, VLENGTH,
696                                          this, vspecies().maskAll(true),
697                                          (m, __) -> allTrueHelper(((Int256Mask)m).getBits()));
698         }
699 

770             byte[] r = new byte[reorder1.length];
771             for (int i = 0; i < reorder1.length; i++) {
772                 int ssi = reorder2[i];
773                 r[i] = reorder1[ssi];  // throws on exceptional index
774             }
775             return new Int256Shuffle(r);
776         }
777     }
778 
779     // ================================================
780 
781     // Specialized low-level memory operations.
782 
783     @ForceInline
784     @Override
785     final
786     IntVector fromArray0(int[] a, int offset) {
787         return super.fromArray0Template(a, offset);  // specialize
788     }
789 














790 
791 
792     @ForceInline
793     @Override
794     final
795     IntVector fromByteArray0(byte[] a, int offset) {
796         return super.fromByteArray0Template(a, offset);  // specialize
797     }
798 







799     @ForceInline
800     @Override
801     final
802     IntVector fromByteBuffer0(ByteBuffer bb, int offset) {
803         return super.fromByteBuffer0Template(bb, offset);  // specialize
804     }
805 







806     @ForceInline
807     @Override
808     final
809     void intoArray0(int[] a, int offset) {
810         super.intoArray0Template(a, offset);  // specialize
811     }
812 















813     @ForceInline
814     @Override
815     final
816     void intoByteArray0(byte[] a, int offset) {
817         super.intoByteArray0Template(a, offset);  // specialize
818     }
819 















820     // End of specialized low-level memory operations.
821 
822     // ================================================
823 
824 }

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

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

614 
615         /**
616          * Helper function for lane-wise mask conversions.
617          * This function kicks in after intrinsic failure.
618          */
619         @ForceInline
620         private final <E>
621         VectorMask<E> defaultMaskCast(AbstractSpecies<E> dsp) {
622             if (length() != dsp.laneCount())
623                 throw new IllegalArgumentException("VectorMask length and species length differ");
624             boolean[] maskArray = toArray();
625             return  dsp.maskFactory(maskArray).check(dsp);
626         }
627 
628         @Override
629         @ForceInline
630         public <E> VectorMask<E> cast(VectorSpecies<E> dsp) {
631             AbstractSpecies<E> species = (AbstractSpecies<E>) dsp;
632             if (length() != species.laneCount())
633                 throw new IllegalArgumentException("VectorMask length and species length differ");
634 
635             return VectorSupport.convert(VectorSupport.VECTOR_OP_CAST,
636                 this.getClass(), ETYPE, VLENGTH,
637                 species.maskType(), species.elementType(), VLENGTH,
638                 this, species,
639                 (m, s) -> s.maskFactory(m.toArray()).check(s));




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

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