TestShortFloatVect.java revision 3845
0N/A * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 0N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/A * This code is free software; you can redistribute it and/or modify it 0N/A * under the terms of the GNU General Public License version 2 only, as 0N/A * published by the Free Software Foundation. 0N/A * This code is distributed in the hope that it will be useful, but WITHOUT 0N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/A * version 2 for more details (a copy is included in the LICENSE file that 0N/A * accompanied this code). 0N/A * You should have received a copy of the GNU General Public License version 0N/A * 2 along with this work; if not, write to the Free Software Foundation, 0N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 0N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A * or visit www.oracle.com if you need additional information or have any 0N/A * @summary Increase superword's vector size up to 256 bits 0N/A * @run main/othervm/timeout=300 -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:-TieredCompilation -XX:-OptimizeFill TestShortFloatVect for (
int i=
0; i<
ITERS; i++) {
for (
int i=
0; i<
ARRLEN; i++) {
// Test and verify results for (
int i=
0; i<
ARRLEN; i++) {
for (
int i=
0; i<
ARRLEN; i++) {
for (
int i=
0; i<
ARRLEN; i++) {
// Reset for negative stride for (
int i=
0; i<
ARRLEN; i++) {
for (
int i=
0; i<
ARRLEN; i++) {
for (
int i=
0; i<
ARRLEN; i++) {
for (
int i=
0; i<
ARRLEN; i++) {
// Reset for opposite stride for (
int i=
0; i<
ARRLEN; i++) {
for (
int i=
0; i<
ARRLEN; i++) {
for (
int i=
0; i<
ARRLEN; i++) {
for (
int i=
0; i<
ARRLEN; i++) {
// Reset for 2 arrays with relative aligned offset for (
int i=
0; i<
ARRLEN; i++) {
for (
int i=
0; i<
ARRLEN; i++) {
errn +=
verify(
"test_cp_alnsrc: a1", i,
a1[i], (
short)-
123);
for (
int i=
0; i<
ARRLEN; i++) {
for (
int i=
0; i<
ARRLEN; i++) {
// Reset for 2 arrays with relative unaligned offset for (
int i=
0; i<
ARRLEN; i++) {
errn +=
verify(
"test_cp_unalndst: a1", i,
a1[i], (
short)-
1);
errn +=
verify(
"test_cp_unalndst: a1", i,
a1[i], (
short)
123);
for (
int i=
0; i<
ARRLEN; i++) {
errn +=
verify(
"test_cp_unalnsrc: a1", i,
a1[i], (
short)-
123);
errn +=
verify(
"test_cp_unalnsrc: a1", i,
a1[i], (
short)
123);
for (
int i=
0; i<
ARRLEN; i++) {
for (
int i=
0; i<
ARRLEN; i++) {
// Reset for aligned overlap initialization for (
int i=
0; i<
ARRLEN; i++) {
errn +=
verify(
"test_cp_alndst_overlap: a1", i,
a1[i], (
short)v);
errn +=
verify(
"test_cp_alndst_overlap: b1", i,
b1[i], (
float)v);
errn +=
verify(
"test_cp_alnsrc_overlap: a1", i,
a1[i], (
short)-
1);
errn +=
verify(
"test_cp_alnsrc_overlap: b1", i,
b1[i], -
1.f);
errn +=
verify(
"test_cp_alnsrc_overlap: a1", i,
a1[i], (
short)v);
errn +=
verify(
"test_cp_alnsrc_overlap: b1", i,
b1[i], (
float)v);
// Reset for unaligned overlap initialization for (
int i=
0; i<
ARRLEN; i++) {
errn +=
verify(
"test_cp_unalndst_overlap: a1", i,
a1[i], (
short)v);
errn +=
verify(
"test_cp_unalndst_overlap: b1", i,
b1[i], (
float)v);
errn +=
verify(
"test_cp_unalnsrc_overlap: a1", i,
a1[i], (
short)-
1);
errn +=
verify(
"test_cp_unalnsrc_overlap: b1", i,
b1[i], -
1.f);
errn +=
verify(
"test_cp_unalnsrc_overlap: a1", i,
a1[i], (
short)v);
errn +=
verify(
"test_cp_unalnsrc_overlap: b1", i,
b1[i], (
float)v);
for (
int i=
0; i<
ITERS; i++) {
for (
int i=
0; i<
ITERS; i++) {
for (
int i=
0; i<
ITERS; i++) {
for (
int i=
0; i<
ITERS; i++) {
for (
int i=
0; i<
ITERS; i++) {
for (
int i=
0; i<
ITERS; i++) {
for (
int i=
0; i<
ITERS; i++) {
for (
int i=
0; i<
ITERS; i++) {
for (
int i=
0; i<
ITERS; i++) {
for (
int i=
0; i<
ITERS; i++) {
for (
int i=
0; i<
ITERS; i++) {
for (
int i=
0; i<
ITERS; i++) {
for (
int i=
0; i<
ITERS; i++) {
for (
int i=
0; i<
ITERS; i++) {
for (
int i=
0; i<
ITERS; i++) {
for (
int i=
0; i<
ITERS; i++) {
for (
int i=
0; i<
ITERS; i++) {
static void test_ci(
short[] a,
float[] b) {
for (
int i =
0; i < a.
length; i+=
1) {
static void test_vi(
short[] a,
float[] b,
short c,
float d) {
for (
int i =
0; i < a.
length; i+=
1) {
static void test_cp(
short[] a,
short[] b,
float[] c,
float[] d) {
for (
int i =
0; i < a.
length; i+=
1) {
for (
int i = a.
length-
1; i >=
0; i-=
1) {
static void test_vi_neg(
short[] a,
float[] b,
short c,
float d) {
for (
int i = a.
length-
1; i >=
0; i-=
1) {
static void test_cp_neg(
short[] a,
short[] b,
float[] c,
float[] d) {
for (
int i = a.
length-
1; i >=
0; i-=
1) {
for (
int i =
0; i < a.
length; i+=
1) {
static void test_vi_oppos(
short[] a,
float[] b,
short c,
float d) {
for (
int i = a.
length-
1; i >=
0; i-=
1) {
static void test_cp_oppos(
short[] a,
short[] b,
float[] c,
float[] d) {
for (
int i =
0; i < a.
length; i+=
1) {
static void test_vi_aln(
short[] a,
float[] b,
short c,
float d) {
static void test_cp_alndst(
short[] a,
short[] b,
float[] c,
float[] d) {
static void test_cp_alnsrc(
short[] a,
short[] b,
float[] c,
float[] d) {
static void test_vi_unaln(
short[] a,
float[] b,
short c,
float d) {