< prev index next >

test/jdk/jdk/incubator/vector/templates/Kernel-Ternary-Masked-op.template

Print this page
rev 54658 : refactored mask and shuffle creation methods, moved classes to top-level
   1         $type$[] a = fa.apply(SPECIES.length());
   2         $type$[] b = fb.apply(SPECIES.length());
   3         $type$[] c = fc.apply(SPECIES.length());
   4         $type$[] r = fr.apply(SPECIES.length());
   5         boolean[] mask = fm.apply(SPECIES.length());
   6         Vector.Mask<$Wideboxtype$> vmask = $abstractvectortype$.maskFromValues(SPECIES, mask);
   7 
   8         for (int ic = 0; ic < INVOC_COUNT; ic++) {
   9             for (int i = 0; i < a.length; i += SPECIES.length()) {
  10                 $abstractvectortype$ av = $abstractvectortype$.fromArray(SPECIES, a, i);
  11                 $abstractvectortype$ bv = $abstractvectortype$.fromArray(SPECIES, b, i);
  12                 $abstractvectortype$ cv = $abstractvectortype$.fromArray(SPECIES, c, i);
  13                 av.[[TEST]](bv, cv, vmask).intoArray(r, i);
  14             }
  15         }
  16 
   1         $type$[] a = fa.apply(SPECIES.length());
   2         $type$[] b = fb.apply(SPECIES.length());
   3         $type$[] c = fc.apply(SPECIES.length());
   4         $type$[] r = fr.apply(SPECIES.length());
   5         boolean[] mask = fm.apply(SPECIES.length());
   6         VectorMask<$Wideboxtype$> vmask = VectorMask.fromValues(SPECIES, mask);
   7 
   8         for (int ic = 0; ic < INVOC_COUNT; ic++) {
   9             for (int i = 0; i < a.length; i += SPECIES.length()) {
  10                 $abstractvectortype$ av = $abstractvectortype$.fromArray(SPECIES, a, i);
  11                 $abstractvectortype$ bv = $abstractvectortype$.fromArray(SPECIES, b, i);
  12                 $abstractvectortype$ cv = $abstractvectortype$.fromArray(SPECIES, c, i);
  13                 av.[[TEST]](bv, cv, vmask).intoArray(r, i);
  14             }
  15         }
  16 
< prev index next >