< prev index next >

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

Print this page

214 
215     @ForceInline
216     final @Override
217     Long256Vector tOp(Vector<Long> v1, Vector<Long> v2, FTriOp f) {
218         return (Long256Vector)
219             super.tOpTemplate((Long256Vector)v1, (Long256Vector)v2,
220                               f);  // specialize
221     }
222 
223     @ForceInline
224     final @Override
225     Long256Vector tOp(Vector<Long> v1, Vector<Long> v2,
226                      VectorMask<Long> m, FTriOp f) {
227         return (Long256Vector)
228             super.tOpTemplate((Long256Vector)v1, (Long256Vector)v2,
229                               (Long256Mask)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 Long256Vector lanewise(Unary op) {
268         return (Long256Vector) super.lanewiseTemplate(op);  // specialize
269     }
270 






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






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







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








293     @Override
294     @ForceInline
295     public final
296     Long256Vector addIndex(int scale) {
297         return (Long256Vector) 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(Long256Shuffle.class); // specialize
331     }
332 
333     // Specialized unary testing
334 
335     @Override
336     @ForceInline
337     public final Long256Mask test(Test op) {
338         return super.testTemplate(Long256Mask.class, op);  // specialize
339     }
340 
341     // Specialized comparisons
342 
343     @Override
344     @ForceInline
345     public final Long256Mask compare(Comparison op, Vector<Long> v) {
346         return super.compareTemplate(Long256Mask.class, op, v);  // specialize
347     }
348 
349     @Override
350     @ForceInline
351     public final Long256Mask compare(Comparison op, long s) {
352         return super.compareTemplate(Long256Mask.class, op, s);  // specialize
353     }
354 
355 







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

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

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

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










662         }
663 
664         // Reductions
665 
666         @Override
667         @ForceInline
668         public boolean anyTrue() {
669             return VectorSupport.test(BT_ne, Long256Mask.class, long.class, VLENGTH,
670                                          this, vspecies().maskAll(true),
671                                          (m, __) -> anyTrueHelper(((Long256Mask)m).getBits()));
672         }
673 
674         @Override
675         @ForceInline
676         public boolean allTrue() {
677             return VectorSupport.test(BT_overflow, Long256Mask.class, long.class, VLENGTH,
678                                          this, vspecies().maskAll(true),
679                                          (m, __) -> allTrueHelper(((Long256Mask)m).getBits()));
680         }
681 

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














772 
773 
774     @ForceInline
775     @Override
776     final
777     LongVector fromByteArray0(byte[] a, int offset) {
778         return super.fromByteArray0Template(a, offset);  // specialize
779     }
780 







781     @ForceInline
782     @Override
783     final
784     LongVector fromByteBuffer0(ByteBuffer bb, int offset) {
785         return super.fromByteBuffer0Template(bb, offset);  // specialize
786     }
787 







788     @ForceInline
789     @Override
790     final
791     void intoArray0(long[] a, int offset) {
792         super.intoArray0Template(a, offset);  // specialize
793     }
794 















795     @ForceInline
796     @Override
797     final
798     void intoByteArray0(byte[] a, int offset) {
799         super.intoByteArray0Template(a, offset);  // specialize
800     }
801 















802     // End of specialized low-level memory operations.
803 
804     // ================================================
805 
806 }

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

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

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




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

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