hotspot/test/compiler/7119644/TestIntDoubleVect.java
author kvn
Fri, 15 Jun 2012 01:25:19 -0700
changeset 13104 657b387034fb
permissions -rw-r--r--
7119644: Increase superword's vector size up to 256 bits Summary: Increase vector size up to 256-bits for YMM AVX registers on x86. Reviewed-by: never, twisti, roland
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     1
/*
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     2
 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     4
 *
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     7
 * published by the Free Software Foundation.
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     8
 *
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    13
 * accompanied this code).
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    14
 *
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    18
 *
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    21
 * questions.
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    22
 *
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    23
 */
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    24
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    25
/**
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    26
 * @test
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    27
 * @bug 7119644
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    28
 * @summary Increase superword's vector size up to 256 bits
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    29
 *
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    30
 * @run main/othervm/timeout=300 -Xbatch -XX:+IgnoreUnrecognizedVMOptions -XX:-TieredCompilation -XX:-OptimizeFill TestIntDoubleVect
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    31
 */
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    32
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    33
public class TestIntDoubleVect {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    34
  private static final int ARRLEN = 997;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    35
  private static final int ITERS  = 11000;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    36
  private static final int OFFSET = 3;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    37
  private static final int SCALE = 2;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    38
  private static final int ALIGN_OFF = 8;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    39
  private static final int UNALIGN_OFF = 5;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    40
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    41
  public static void main(String args[]) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    42
    System.out.println("Testing Integer + Double vectors");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    43
    int errn = test();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    44
    if (errn > 0) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    45
      System.err.println("FAILED: " + errn + " errors");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    46
      System.exit(97);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    47
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    48
    System.out.println("PASSED");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    49
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    50
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    51
  static int test() {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    52
    int[] a1 = new int[ARRLEN];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    53
    int[] a2 = new int[ARRLEN];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    54
    double[] b1 = new double[ARRLEN];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    55
    double[] b2 = new double[ARRLEN];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    56
    System.out.println("Warmup");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    57
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    58
      test_ci(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    59
      test_vi(a2, b2, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    60
      test_cp(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    61
      test_ci_neg(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    62
      test_vi_neg(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    63
      test_cp_neg(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    64
      test_ci_oppos(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    65
      test_vi_oppos(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    66
      test_cp_oppos(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    67
      test_ci_aln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    68
      test_vi_aln(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    69
      test_cp_alndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    70
      test_cp_alnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    71
      test_ci_unaln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    72
      test_vi_unaln(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    73
      test_cp_unalndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    74
      test_cp_unalnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    75
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    76
    // Initialize
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    77
    for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    78
      a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    79
      a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    80
      b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    81
      b2[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    82
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    83
    // Test and verify results
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    84
    System.out.println("Verification");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    85
    int errn = 0;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    86
    {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    87
      test_ci(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    88
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    89
        errn += verify("test_ci: a1", i, a1[i], (int)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    90
        errn += verify("test_ci: b1", i, b1[i], -103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    91
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    92
      test_vi(a2, b2, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    93
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    94
        errn += verify("test_vi: a2", i, a2[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    95
        errn += verify("test_vi: b2", i, b2[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    96
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    97
      test_cp(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    98
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    99
        errn += verify("test_cp: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   100
        errn += verify("test_cp: b1", i, b1[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   101
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   102
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   103
      // Reset for negative stride
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   104
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   105
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   106
        a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   107
        b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   108
        b2[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   109
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   110
      test_ci_neg(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   111
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   112
        errn += verify("test_ci_neg: a1", i, a1[i], (int)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   113
        errn += verify("test_ci_neg: b1", i, b1[i], -103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   114
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   115
      test_vi_neg(a2, b2, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   116
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   117
        errn += verify("test_vi_neg: a2", i, a2[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   118
        errn += verify("test_vi_neg: b2", i, b2[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   119
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   120
      test_cp_neg(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   121
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   122
        errn += verify("test_cp_neg: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   123
        errn += verify("test_cp_neg: b1", i, b1[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   124
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   125
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   126
      // Reset for opposite stride
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   127
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   128
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   129
        a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   130
        b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   131
        b2[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   132
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   133
      test_ci_oppos(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   134
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   135
        errn += verify("test_ci_oppos: a1", i, a1[i], (int)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   136
        errn += verify("test_ci_oppos: b1", i, b1[i], -103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   137
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   138
      test_vi_oppos(a2, b2, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   139
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   140
        errn += verify("test_vi_oppos: a2", i, a2[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   141
        errn += verify("test_vi_oppos: b2", i, b2[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   142
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   143
      test_cp_oppos(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   144
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   145
        errn += verify("test_cp_oppos: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   146
        errn += verify("test_cp_oppos: b1", i, b1[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   147
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   148
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   149
      // Reset for 2 arrays with relative aligned offset
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   150
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   151
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   152
        a2[i] = 123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   153
        b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   154
        b2[i] = 123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   155
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   156
      test_cp_alndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   157
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   158
        errn += verify("test_cp_alndst: a1", i, a1[i], (int)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   159
        errn += verify("test_cp_alndst: b1", i, b1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   160
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   161
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   162
        errn += verify("test_cp_alndst: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   163
        errn += verify("test_cp_alndst: b1", i, b1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   164
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   165
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   166
        a2[i] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   167
        b2[i] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   168
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   169
      test_cp_alnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   170
      for (int i=0; i<ARRLEN-ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   171
        errn += verify("test_cp_alnsrc: a1", i, a1[i], (int)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   172
        errn += verify("test_cp_alnsrc: b1", i, b1[i], -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   173
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   174
      for (int i=ARRLEN-ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   175
        errn += verify("test_cp_alnsrc: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   176
        errn += verify("test_cp_alnsrc: b1", i, b1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   177
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   178
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   179
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   180
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   181
        b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   182
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   183
      test_ci_aln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   184
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   185
        errn += verify("test_ci_aln: a1", i, a1[i], (int)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   186
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   187
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   188
        errn += verify("test_ci_aln: a1", i, a1[i], (int)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   189
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   190
      for (int i=0; i<ARRLEN-ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   191
        errn += verify("test_ci_aln: b1", i, b1[i], -103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   192
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   193
      for (int i=ARRLEN-ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   194
        errn += verify("test_ci_aln: b1", i, b1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   195
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   196
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   197
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   198
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   199
        b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   200
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   201
      test_vi_aln(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   202
      for (int i=0; i<ARRLEN-ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   203
        errn += verify("test_vi_aln: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   204
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   205
      for (int i=ARRLEN-ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   206
        errn += verify("test_vi_aln: a1", i, a1[i], (int)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   207
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   208
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   209
        errn += verify("test_vi_aln: b1", i, b1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   210
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   211
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   212
        errn += verify("test_vi_aln: b1", i, b1[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   213
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   214
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   215
      // Reset for 2 arrays with relative unaligned offset
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   216
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   217
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   218
        a2[i] = 123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   219
        b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   220
        b2[i] = 123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   221
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   222
      test_cp_unalndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   223
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   224
        errn += verify("test_cp_unalndst: a1", i, a1[i], (int)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   225
        errn += verify("test_cp_unalndst: b1", i, b1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   226
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   227
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   228
        errn += verify("test_cp_unalndst: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   229
        errn += verify("test_cp_unalndst: b1", i, b1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   230
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   231
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   232
        a2[i] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   233
        b2[i] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   234
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   235
      test_cp_unalnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   236
      for (int i=0; i<ARRLEN-UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   237
        errn += verify("test_cp_unalnsrc: a1", i, a1[i], (int)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   238
        errn += verify("test_cp_unalnsrc: b1", i, b1[i], -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   239
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   240
      for (int i=ARRLEN-UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   241
        errn += verify("test_cp_unalnsrc: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   242
        errn += verify("test_cp_unalnsrc: b1", i, b1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   243
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   244
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   245
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   246
        b1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   247
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   248
      test_ci_unaln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   249
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   250
        errn += verify("test_ci_unaln: a1", i, a1[i], (int)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   251
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   252
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   253
        errn += verify("test_ci_unaln: a1", i, a1[i], (int)-123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   254
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   255
      for (int i=0; i<ARRLEN-UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   256
        errn += verify("test_ci_unaln: b1", i, b1[i], -103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   257
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   258
      for (int i=ARRLEN-UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   259
        errn += verify("test_ci_unaln: b1", i, b1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   260
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   261
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   262
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   263
        b1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   264
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   265
      test_vi_unaln(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   266
      for (int i=0; i<ARRLEN-UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   267
        errn += verify("test_vi_unaln: a1", i, a1[i], (int)123);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   268
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   269
      for (int i=ARRLEN-UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   270
        errn += verify("test_vi_unaln: a1", i, a1[i], (int)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   271
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   272
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   273
        errn += verify("test_vi_unaln: b1", i, b1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   274
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   275
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   276
        errn += verify("test_vi_unaln: b1", i, b1[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   277
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   278
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   279
      // Reset for aligned overlap initialization
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   280
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   281
        a1[i] = (int)i;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   282
        b1[i] = (double)i;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   283
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   284
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   285
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   286
        b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   287
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   288
      test_cp_alndst(a1, a1, b1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   289
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   290
        int v = i%ALIGN_OFF;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   291
        errn += verify("test_cp_alndst_overlap: a1", i, a1[i], (int)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   292
        errn += verify("test_cp_alndst_overlap: b1", i, b1[i], (double)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   293
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   294
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   295
        a1[i+ALIGN_OFF] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   296
        b1[i+ALIGN_OFF] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   297
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   298
      test_cp_alnsrc(a1, a1, b1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   299
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   300
        errn += verify("test_cp_alnsrc_overlap: a1", i, a1[i], (int)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   301
        errn += verify("test_cp_alnsrc_overlap: b1", i, b1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   302
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   303
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   304
        int v = i%ALIGN_OFF;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   305
        errn += verify("test_cp_alnsrc_overlap: a1", i, a1[i], (int)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   306
        errn += verify("test_cp_alnsrc_overlap: b1", i, b1[i], (double)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   307
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   308
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   309
      // Reset for unaligned overlap initialization
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   310
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   311
        a1[i] = (int)i;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   312
        b1[i] = (double)i;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   313
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   314
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   315
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   316
        b1[i] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   317
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   318
      test_cp_unalndst(a1, a1, b1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   319
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   320
        int v = i%UNALIGN_OFF;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   321
        errn += verify("test_cp_unalndst_overlap: a1", i, a1[i], (int)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   322
        errn += verify("test_cp_unalndst_overlap: b1", i, b1[i], (double)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   323
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   324
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   325
        a1[i+UNALIGN_OFF] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   326
        b1[i+UNALIGN_OFF] = -1.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   327
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   328
      test_cp_unalnsrc(a1, a1, b1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   329
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   330
        errn += verify("test_cp_unalnsrc_overlap: a1", i, a1[i], (int)-1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   331
        errn += verify("test_cp_unalnsrc_overlap: b1", i, b1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   332
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   333
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   334
        int v = i%UNALIGN_OFF;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   335
        errn += verify("test_cp_unalnsrc_overlap: a1", i, a1[i], (int)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   336
        errn += verify("test_cp_unalnsrc_overlap: b1", i, b1[i], (double)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   337
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   338
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   339
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   340
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   341
    if (errn > 0)
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   342
      return errn;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   343
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   344
    System.out.println("Time");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   345
    long start, end;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   346
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   347
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   348
      test_ci(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   349
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   350
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   351
    System.out.println("test_ci: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   352
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   353
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   354
      test_vi(a2, b2, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   355
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   356
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   357
    System.out.println("test_vi: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   358
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   359
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   360
      test_cp(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   361
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   362
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   363
    System.out.println("test_cp: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   364
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   365
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   366
      test_ci_neg(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   367
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   368
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   369
    System.out.println("test_ci_neg: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   370
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   371
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   372
      test_vi_neg(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   373
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   374
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   375
    System.out.println("test_vi_neg: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   376
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   377
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   378
      test_cp_neg(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   379
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   380
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   381
    System.out.println("test_cp_neg: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   382
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   383
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   384
      test_ci_oppos(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   385
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   386
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   387
    System.out.println("test_ci_oppos: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   388
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   389
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   390
      test_vi_oppos(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   391
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   392
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   393
    System.out.println("test_vi_oppos: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   394
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   395
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   396
      test_cp_oppos(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   397
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   398
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   399
    System.out.println("test_cp_oppos: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   400
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   401
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   402
      test_ci_aln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   403
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   404
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   405
    System.out.println("test_ci_aln: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   406
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   407
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   408
      test_vi_aln(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   409
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   410
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   411
    System.out.println("test_vi_aln: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   412
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   413
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   414
      test_cp_alndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   415
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   416
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   417
    System.out.println("test_cp_alndst: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   418
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   419
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   420
      test_cp_alnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   421
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   422
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   423
    System.out.println("test_cp_alnsrc: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   424
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   425
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   426
      test_ci_unaln(a1, b1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   427
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   428
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   429
    System.out.println("test_ci_unaln: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   430
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   431
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   432
      test_vi_unaln(a1, b1, (int)123, 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   433
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   434
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   435
    System.out.println("test_vi_unaln: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   436
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   437
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   438
      test_cp_unalndst(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   439
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   440
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   441
    System.out.println("test_cp_unalndst: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   442
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   443
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   444
      test_cp_unalnsrc(a1, a2, b1, b2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   445
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   446
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   447
    System.out.println("test_cp_unalnsrc: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   448
    return errn;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   449
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   450
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   451
  static void test_ci(int[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   452
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   453
      a[i] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   454
      b[i] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   455
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   456
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   457
  static void test_vi(int[] a, double[] b, int c, double d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   458
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   459
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   460
      b[i] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   461
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   462
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   463
  static void test_cp(int[] a, int[] b, double[] c, double[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   464
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   465
      a[i] = b[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   466
      c[i] = d[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   467
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   468
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   469
  static void test_ci_neg(int[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   470
    for (int i = a.length-1; i >= 0; i-=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   471
      a[i] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   472
      b[i] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   473
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   474
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   475
  static void test_vi_neg(int[] a, double[] b, int c, double d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   476
    for (int i = a.length-1; i >= 0; i-=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   477
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   478
      b[i] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   479
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   480
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   481
  static void test_cp_neg(int[] a, int[] b, double[] c, double[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   482
    for (int i = a.length-1; i >= 0; i-=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   483
      a[i] = b[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   484
      c[i] = d[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   485
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   486
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   487
  static void test_ci_oppos(int[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   488
    int limit = a.length-1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   489
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   490
      a[limit-i] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   491
      b[i] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   492
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   493
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   494
  static void test_vi_oppos(int[] a, double[] b, int c, double d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   495
    int limit = a.length-1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   496
    for (int i = a.length-1; i >= 0; i-=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   497
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   498
      b[limit-i] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   499
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   500
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   501
  static void test_cp_oppos(int[] a, int[] b, double[] c, double[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   502
    int limit = a.length-1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   503
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   504
      a[i] = b[limit-i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   505
      c[limit-i] = d[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   506
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   507
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   508
  static void test_ci_aln(int[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   509
    for (int i = 0; i < a.length-ALIGN_OFF; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   510
      a[i+ALIGN_OFF] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   511
      b[i] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   512
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   513
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   514
  static void test_vi_aln(int[] a, double[] b, int c, double d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   515
    for (int i = 0; i < a.length-ALIGN_OFF; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   516
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   517
      b[i+ALIGN_OFF] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   518
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   519
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   520
  static void test_cp_alndst(int[] a, int[] b, double[] c, double[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   521
    for (int i = 0; i < a.length-ALIGN_OFF; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   522
      a[i+ALIGN_OFF] = b[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   523
      c[i+ALIGN_OFF] = d[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   524
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   525
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   526
  static void test_cp_alnsrc(int[] a, int[] b, double[] c, double[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   527
    for (int i = 0; i < a.length-ALIGN_OFF; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   528
      a[i] = b[i+ALIGN_OFF];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   529
      c[i] = d[i+ALIGN_OFF];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   530
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   531
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   532
  static void test_ci_unaln(int[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   533
    for (int i = 0; i < a.length-UNALIGN_OFF; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   534
      a[i+UNALIGN_OFF] = -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   535
      b[i] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   536
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   537
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   538
  static void test_vi_unaln(int[] a, double[] b, int c, double d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   539
    for (int i = 0; i < a.length-UNALIGN_OFF; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   540
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   541
      b[i+UNALIGN_OFF] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   542
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   543
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   544
  static void test_cp_unalndst(int[] a, int[] b, double[] c, double[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   545
    for (int i = 0; i < a.length-UNALIGN_OFF; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   546
      a[i+UNALIGN_OFF] = b[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   547
      c[i+UNALIGN_OFF] = d[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   548
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   549
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   550
  static void test_cp_unalnsrc(int[] a, int[] b, double[] c, double[] d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   551
    for (int i = 0; i < a.length-UNALIGN_OFF; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   552
      a[i] = b[i+UNALIGN_OFF];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   553
      c[i] = d[i+UNALIGN_OFF];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   554
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   555
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   556
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   557
  static int verify(String text, int i, int elem, int val) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   558
    if (elem != val) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   559
      System.err.println(text + "[" + i + "] = " + elem + " != " + val);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   560
      return 1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   561
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   562
    return 0;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   563
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   564
  static int verify(String text, int i, double elem, double val) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   565
    if (elem != val) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   566
      System.err.println(text + "[" + i + "] = " + elem + " != " + val);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   567
      return 1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   568
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   569
    return 0;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   570
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   571
}