< prev index next >
test/jdk/jdk/incubator/vector/templates/Perf-Reduction-Min-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,7 +1,15 @@
@Benchmark
public void [[TEST]][[TEST_TYPE]][[OP_NAME]](Blackhole bh) {
-[[KERNEL]]
+ $type$[] a = fa.apply(SPECIES.length());
+ $type$ ra = [[TEST_INIT]];
+
+ for (int ic = 0; ic < INVOC_COUNT; ic++) {
+ ra = [[TEST_INIT]];
+ for (int i = 0; i < a.length; i += SPECIES.length()) {
+ $abstractvectortype$ av = $abstractvectortype$.fromArray(SPECIES, a, i);
+ ra = ($type$)Math.min(ra, av.[[TEST]]());
+ }
+ }
bh.consume(ra);
- bh.consume(r);
}
< prev index next >