< prev index next >

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

Print this page

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






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






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







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








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







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

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

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

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










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

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














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







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







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















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















810     // End of specialized low-level memory operations.
811 
812     // ================================================
813 
814 }

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

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

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




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

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