< prev index next >

test/jdk/jdk/incubator/vector/templates/Perf-Reduction-op.template

Print this page
rev 55606 : 8221812: Fine-tune jmh test for vector api
Summary: To compare performance of vector api and auto vectorization, vector
api and scalar test cases are updated to keep aligned.
Reviewed-by: duke
   1 
   2     @Benchmark
   3     public void [[TEST]][[TEST_TYPE]][[OP_NAME]](Blackhole bh) {
   4 [[KERNEL]]









   5         bh.consume(ra);
   6         bh.consume(r);
   7     }
   1 
   2     @Benchmark
   3     public void [[TEST]][[TEST_TYPE]][[OP_NAME]](Blackhole bh) {
   4         $type$[] a = fa.apply(SPECIES.length());
   5         $type$ ra = [[TEST_INIT]];
   6 
   7         for (int ic = 0; ic < INVOC_COUNT; ic++) {
   8             ra = [[TEST_INIT]];
   9             for (int i = 0; i < a.length; i += SPECIES.length()) {
  10                 $abstractvectortype$ av = $abstractvectortype$.fromArray(SPECIES, a, i);
  11                 ra [[TEST_OP]]= av.[[TEST]]();
  12             }
  13         }
  14         bh.consume(ra);

  15     }
< prev index next >