hotspot/test/compiler/codegen/TestDoubleVect.java
author tpivovarova
Tue, 12 Jul 2016 18:24:48 +0300
changeset 40059 c2304140ed64
parent 27699 hotspot/test/compiler/codegen/7119644/TestDoubleVect.java@9913b19c0948
child 41705 332239c052cc
permissions -rw-r--r--
8132919: Put compiler tests in packages Reviewed-by: vlivanov, dpochepk Contributed-by: igor.ignatyev@oracle.com
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
 *
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    30
 * @run main/othervm/timeout=300 -Xbatch -XX:+IgnoreUnrecognizedVMOptions
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    31
 *    -XX:-TieredCompilation -XX:-OptimizeFill
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    32
 *    compiler.codegen.TestDoubleVect
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    33
 */
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    34
40059
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    35
package compiler.codegen;
c2304140ed64 8132919: Put compiler tests in packages
tpivovarova
parents: 27699
diff changeset
    36
13104
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    37
public class TestDoubleVect {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    38
  private static final int ARRLEN = 997;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    39
  private static final int ITERS  = 11000;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    40
  private static final int OFFSET = 3;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    41
  private static final int SCALE = 2;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    42
  private static final int ALIGN_OFF = 8;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    43
  private static final int UNALIGN_OFF = 5;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    44
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    45
  public static void main(String args[]) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    46
    System.out.println("Testing Double vectors");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    47
    int errn = test();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    48
    if (errn > 0) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    49
      System.err.println("FAILED: " + errn + " errors");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    50
      System.exit(97);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    51
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    52
    System.out.println("PASSED");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    53
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    54
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    55
  static int test() {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    56
    double[] a1 = new double[ARRLEN];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    57
    double[] a2 = new double[ARRLEN];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    58
    System.out.println("Warmup");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    59
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    60
      test_ci(a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    61
      test_vi(a2, 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    62
      test_cp(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    63
      test_2ci(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    64
      test_2vi(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    65
      test_ci_neg(a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    66
      test_vi_neg(a2, 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    67
      test_cp_neg(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    68
      test_2ci_neg(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    69
      test_2vi_neg(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    70
      test_ci_oppos(a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    71
      test_vi_oppos(a2, 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    72
      test_cp_oppos(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    73
      test_2ci_oppos(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    74
      test_2vi_oppos(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    75
      test_ci_off(a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    76
      test_vi_off(a2, 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    77
      test_cp_off(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    78
      test_2ci_off(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    79
      test_2vi_off(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    80
      test_ci_inv(a1, OFFSET);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    81
      test_vi_inv(a2, 123., OFFSET);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    82
      test_cp_inv(a1, a2, OFFSET);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    83
      test_2ci_inv(a1, a2, OFFSET);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    84
      test_2vi_inv(a1, a2, 123., 103., OFFSET);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    85
      test_ci_scl(a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    86
      test_vi_scl(a2, 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    87
      test_cp_scl(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    88
      test_2ci_scl(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    89
      test_2vi_scl(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    90
      test_cp_alndst(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    91
      test_cp_alnsrc(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    92
      test_2ci_aln(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    93
      test_2vi_aln(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    94
      test_cp_unalndst(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    95
      test_cp_unalnsrc(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    96
      test_2ci_unaln(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    97
      test_2vi_unaln(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    98
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
    99
    // Initialize
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   100
    for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   101
      a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   102
      a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   103
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   104
    // Test and verify results
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   105
    System.out.println("Verification");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   106
    int errn = 0;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   107
    {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   108
      test_ci(a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   109
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   110
        errn += verify("test_ci: a1", i, a1[i], -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   111
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   112
      test_vi(a2, 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   113
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   114
        errn += verify("test_vi: a2", i, a2[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   115
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   116
      test_cp(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   117
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   118
        errn += verify("test_cp: a1", i, a1[i], 123.);
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_2ci(a1, a2);
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_2ci: a1", i, a1[i], -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   123
        errn += verify("test_2ci: a2", i, a2[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
      test_2vi(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   126
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   127
        errn += verify("test_2vi: a1", i, a1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   128
        errn += verify("test_2vi: a2", i, a2[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   129
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   130
      // Reset for negative stride
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   131
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   132
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   133
        a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   134
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   135
      test_ci_neg(a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   136
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   137
        errn += verify("test_ci_neg: a1", i, a1[i], -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   138
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   139
      test_vi_neg(a2, 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   140
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   141
        errn += verify("test_vi_neg: a2", i, a2[i], 123.);
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_neg(a1, a2);
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_neg: a1", i, a1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   146
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   147
      test_2ci_neg(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   148
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   149
        errn += verify("test_2ci_neg: a1", i, a1[i], -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   150
        errn += verify("test_2ci_neg: a2", i, a2[i], -103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   151
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   152
      test_2vi_neg(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   153
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   154
        errn += verify("test_2vi_neg: a1", i, a1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   155
        errn += verify("test_2vi_neg: a2", i, a2[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   156
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   157
      // Reset for opposite stride
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   158
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   159
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   160
        a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   161
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   162
      test_ci_oppos(a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   163
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   164
        errn += verify("test_ci_oppos: a1", i, a1[i], -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   165
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   166
      test_vi_oppos(a2, 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   167
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   168
        errn += verify("test_vi_oppos: a2", i, a2[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   169
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   170
      test_cp_oppos(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   171
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   172
        errn += verify("test_cp_oppos: a1", i, a1[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
      test_2ci_oppos(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   175
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   176
        errn += verify("test_2ci_oppos: a1", i, a1[i], -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   177
        errn += verify("test_2ci_oppos: a2", i, a2[i], -103.);
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
      test_2vi_oppos(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   180
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   181
        errn += verify("test_2vi_oppos: a1", i, a1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   182
        errn += verify("test_2vi_oppos: a2", i, a2[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   183
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   184
      // Reset for indexing with offset
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   185
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   186
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   187
        a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   188
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   189
      test_ci_off(a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   190
      for (int i=OFFSET; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   191
        errn += verify("test_ci_off: a1", i, a1[i], -123.);
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
      test_vi_off(a2, 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   194
      for (int i=OFFSET; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   195
        errn += verify("test_vi_off: a2", i, a2[i], 123.);
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
      test_cp_off(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   198
      for (int i=OFFSET; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   199
        errn += verify("test_cp_off: a1", i, a1[i], 123.);
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_2ci_off(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   202
      for (int i=OFFSET; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   203
        errn += verify("test_2ci_off: a1", i, a1[i], -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   204
        errn += verify("test_2ci_off: a2", i, a2[i], -103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   205
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   206
      test_2vi_off(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   207
      for (int i=OFFSET; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   208
        errn += verify("test_2vi_off: a1", i, a1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   209
        errn += verify("test_2vi_off: a2", i, a2[i], 103.);
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=0; i<OFFSET; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   212
        errn += verify("test_2vi_off: a1", i, a1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   213
        errn += verify("test_2vi_off: a2", i, a2[i], -1.);
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 indexing with invariant 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] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   219
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   220
      test_ci_inv(a1, OFFSET);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   221
      for (int i=OFFSET; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   222
        errn += verify("test_ci_inv: a1", i, a1[i], -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   223
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   224
      test_vi_inv(a2, 123., OFFSET);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   225
      for (int i=OFFSET; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   226
        errn += verify("test_vi_inv: a2", i, a2[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   227
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   228
      test_cp_inv(a1, a2, OFFSET);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   229
      for (int i=OFFSET; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   230
        errn += verify("test_cp_inv: a1", i, a1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   231
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   232
      test_2ci_inv(a1, a2, OFFSET);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   233
      for (int i=OFFSET; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   234
        errn += verify("test_2ci_inv: a1", i, a1[i], -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   235
        errn += verify("test_2ci_inv: a2", i, a2[i], -103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   236
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   237
      test_2vi_inv(a1, a2, 123., 103., OFFSET);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   238
      for (int i=OFFSET; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   239
        errn += verify("test_2vi_inv: a1", i, a1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   240
        errn += verify("test_2vi_inv: a2", i, a2[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   241
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   242
      for (int i=0; i<OFFSET; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   243
        errn += verify("test_2vi_inv: a1", i, a1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   244
        errn += verify("test_2vi_inv: a2", i, a2[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   245
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   246
      // Reset for indexing with scale
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   247
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   248
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   249
        a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   250
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   251
      test_ci_scl(a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   252
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   253
        int val = (i%SCALE != 0) ? -1 : -123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   254
        errn += verify("test_ci_scl: a1", i, a1[i], (double)val);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   255
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   256
      test_vi_scl(a2, 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   257
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   258
        int val = (i%SCALE != 0) ? -1 : 123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   259
        errn += verify("test_vi_scl: a2", i, a2[i], (double)val);
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
      test_cp_scl(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   262
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   263
        int val = (i%SCALE != 0) ? -1 : 123;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   264
        errn += verify("test_cp_scl: a1", i, a1[i], (double)val);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   265
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   266
      test_2ci_scl(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   267
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   268
        if (i%SCALE != 0) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   269
          errn += verify("test_2ci_scl: a1", i, a1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   270
        } else if (i*SCALE < ARRLEN) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   271
          errn += verify("test_2ci_scl: a1", i*SCALE, a1[i*SCALE], -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   272
        }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   273
        if (i%SCALE != 0) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   274
          errn += verify("test_2ci_scl: a2", i, a2[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   275
        } else if (i*SCALE < ARRLEN) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   276
          errn += verify("test_2ci_scl: a2", i*SCALE, a2[i*SCALE], -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
      test_2vi_scl(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   280
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   281
        if (i%SCALE != 0) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   282
          errn += verify("test_2vi_scl: a1", i, a1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   283
        } else if (i*SCALE < ARRLEN) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   284
          errn += verify("test_2vi_scl: a1", i*SCALE, a1[i*SCALE], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   285
        }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   286
        if (i%SCALE != 0) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   287
          errn += verify("test_2vi_scl: a2", i, a2[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   288
        } else if (i*SCALE < ARRLEN) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   289
          errn += verify("test_2vi_scl: a2", i*SCALE, a2[i*SCALE], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   290
        }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   291
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   292
      // Reset for 2 arrays with relative aligned offset
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   293
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   294
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   295
        a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   296
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   297
      test_vi(a2, 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   298
      test_cp_alndst(a1, a2);
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_alndst: a1", i, a1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   301
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   302
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   303
        errn += verify("test_cp_alndst: a1", i, a1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   304
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   305
      test_vi(a2, -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   306
      test_cp_alnsrc(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   307
      for (int i=0; i<ARRLEN-ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   308
        errn += verify("test_cp_alnsrc: a1", i, a1[i], -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   309
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   310
      for (int i=ARRLEN-ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   311
        errn += verify("test_cp_alnsrc: a1", i, a1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   312
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   313
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   314
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   315
        a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   316
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   317
      test_2ci_aln(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   318
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   319
        errn += verify("test_2ci_aln: a1", i, a1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   320
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   321
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   322
        errn += verify("test_2ci_aln: a1", i, a1[i], -123.);
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<ARRLEN-ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   325
        errn += verify("test_2ci_aln: a2", i, a2[i], -103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   326
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   327
      for (int i=ARRLEN-ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   328
        errn += verify("test_2ci_aln: a2", i, a2[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   329
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   330
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   331
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   332
        a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   333
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   334
      test_2vi_aln(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   335
      for (int i=0; i<ARRLEN-ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   336
        errn += verify("test_2vi_aln: a1", i, a1[i], 123.);
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
      for (int i=ARRLEN-ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   339
        errn += verify("test_2vi_aln: a1", i, a1[i], -1.);
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
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   342
        errn += verify("test_2vi_aln: a2", i, a2[i], -1.);
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
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   345
        errn += verify("test_2vi_aln: a2", i, a2[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   346
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   347
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   348
      // Reset for 2 arrays with relative unaligned offset
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   349
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   350
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   351
        a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   352
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   353
      test_vi(a2, 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   354
      test_cp_unalndst(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   355
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   356
        errn += verify("test_cp_unalndst: a1", i, a1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   357
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   358
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   359
        errn += verify("test_cp_unalndst: a1", i, a1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   360
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   361
      test_vi(a2, -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   362
      test_cp_unalnsrc(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   363
      for (int i=0; i<ARRLEN-UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   364
        errn += verify("test_cp_unalnsrc: a1", i, a1[i], -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   365
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   366
      for (int i=ARRLEN-UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   367
        errn += verify("test_cp_unalnsrc: a1", i, a1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   368
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   369
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   370
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   371
        a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   372
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   373
      test_2ci_unaln(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   374
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   375
        errn += verify("test_2ci_unaln: a1", i, a1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   376
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   377
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   378
        errn += verify("test_2ci_unaln: a1", i, a1[i], -123.);
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
      for (int i=0; i<ARRLEN-UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   381
        errn += verify("test_2ci_unaln: a2", i, a2[i], -103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   382
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   383
      for (int i=ARRLEN-UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   384
        errn += verify("test_2ci_unaln: a2", i, a2[i], -1.);
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
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   387
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   388
        a2[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   389
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   390
      test_2vi_unaln(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   391
      for (int i=0; i<ARRLEN-UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   392
        errn += verify("test_2vi_unaln: a1", i, a1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   393
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   394
      for (int i=ARRLEN-UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   395
        errn += verify("test_2vi_unaln: a1", i, a1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   396
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   397
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   398
        errn += verify("test_2vi_unaln: a2", i, a2[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   399
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   400
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   401
        errn += verify("test_2vi_unaln: a2", i, a2[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   402
      }
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
      // Reset for aligned overlap initialization
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   405
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   406
        a1[i] = (double)i;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   407
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   408
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   409
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   410
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   411
      test_cp_alndst(a1, a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   412
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   413
        int v = i%ALIGN_OFF;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   414
        errn += verify("test_cp_alndst_overlap: a1", i, a1[i], (double)v);
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
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   417
        a1[i+ALIGN_OFF] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   418
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   419
      test_cp_alnsrc(a1, a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   420
      for (int i=0; i<ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   421
        errn += verify("test_cp_alnsrc_overlap: a1", i, a1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   422
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   423
      for (int i=ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   424
        int v = i%ALIGN_OFF;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   425
        errn += verify("test_cp_alnsrc_overlap: a1", i, a1[i], (double)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   426
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   427
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   428
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   429
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   430
      test_2ci_aln(a1, a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   431
      for (int i=0; i<ARRLEN-ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   432
        errn += verify("test_2ci_aln_overlap: a1", i, a1[i], -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
      for (int i=ARRLEN-ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   435
        errn += verify("test_2ci_aln_overlap: a1", i, a1[i], -123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   436
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   437
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   438
        a1[i] = -1;
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
      test_2vi_aln(a1, a1, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   441
      for (int i=0; i<ARRLEN-ALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   442
        errn += verify("test_2vi_aln_overlap: a1", i, a1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   443
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   444
      for (int i=ARRLEN-ALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   445
        errn += verify("test_2vi_aln_overlap: a1", i, a1[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   446
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   447
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   448
      // Reset for unaligned overlap initialization
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   449
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   450
        a1[i] = (double)i;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   451
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   452
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   453
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   454
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   455
      test_cp_unalndst(a1, a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   456
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   457
        int v = i%UNALIGN_OFF;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   458
        errn += verify("test_cp_unalndst_overlap: a1", i, a1[i], (double)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   459
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   460
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   461
        a1[i+UNALIGN_OFF] = -1;
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
      test_cp_unalnsrc(a1, a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   464
      for (int i=0; i<UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   465
        errn += verify("test_cp_unalnsrc_overlap: a1", i, a1[i], -1.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   466
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   467
      for (int i=UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   468
        int v = i%UNALIGN_OFF;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   469
        errn += verify("test_cp_unalnsrc_overlap: a1", i, a1[i], (double)v);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   470
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   471
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   472
        a1[i] = -1;
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
      test_2ci_unaln(a1, a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   475
      for (int i=0; i<ARRLEN-UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   476
        errn += verify("test_2ci_unaln_overlap: a1", i, a1[i], -103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   477
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   478
      for (int i=ARRLEN-UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   479
        errn += verify("test_2ci_unaln_overlap: a1", i, a1[i], -123.);
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
      for (int i=0; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   482
        a1[i] = -1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   483
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   484
      test_2vi_unaln(a1, a1, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   485
      for (int i=0; i<ARRLEN-UNALIGN_OFF; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   486
        errn += verify("test_2vi_unaln_overlap: a1", i, a1[i], 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   487
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   488
      for (int i=ARRLEN-UNALIGN_OFF; i<ARRLEN; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   489
        errn += verify("test_2vi_unaln_overlap: a1", i, a1[i], 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   490
      }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   491
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
    if (errn > 0)
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   495
      return errn;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   496
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   497
    System.out.println("Time");
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   498
    long start, end;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   499
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   500
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   501
      test_ci(a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   502
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   503
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   504
    System.out.println("test_ci: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   505
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   506
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   507
      test_vi(a2, 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   508
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   509
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   510
    System.out.println("test_vi: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   511
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   512
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   513
      test_cp(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   514
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   515
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   516
    System.out.println("test_cp: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   517
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   518
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   519
      test_2ci(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   520
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   521
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   522
    System.out.println("test_2ci: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   523
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   524
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   525
      test_2vi(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   526
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   527
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   528
    System.out.println("test_2vi: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   529
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   530
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   531
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   532
      test_ci_neg(a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   533
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   534
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   535
    System.out.println("test_ci_neg: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   536
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   537
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   538
      test_vi_neg(a2, 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   539
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   540
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   541
    System.out.println("test_vi_neg: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   542
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   543
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   544
      test_cp_neg(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   545
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   546
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   547
    System.out.println("test_cp_neg: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   548
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   549
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   550
      test_2ci_neg(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   551
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   552
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   553
    System.out.println("test_2ci_neg: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   554
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   555
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   556
      test_2vi_neg(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   557
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   558
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   559
    System.out.println("test_2vi_neg: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   560
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   561
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   562
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   563
      test_ci_oppos(a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   564
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   565
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   566
    System.out.println("test_ci_oppos: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   567
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   568
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   569
      test_vi_oppos(a2, 123.);
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
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   572
    System.out.println("test_vi_oppos: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   573
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   574
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   575
      test_cp_oppos(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   576
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   577
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   578
    System.out.println("test_cp_oppos: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   579
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   580
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   581
      test_2ci_oppos(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   582
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   583
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   584
    System.out.println("test_2ci_oppos: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   585
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   586
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   587
      test_2vi_oppos(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   588
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   589
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   590
    System.out.println("test_2vi_oppos: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   591
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   592
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   593
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   594
      test_ci_off(a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   595
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   596
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   597
    System.out.println("test_ci_off: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   598
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   599
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   600
      test_vi_off(a2, 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   601
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   602
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   603
    System.out.println("test_vi_off: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   604
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   605
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   606
      test_cp_off(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   607
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   608
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   609
    System.out.println("test_cp_off: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   610
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   611
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   612
      test_2ci_off(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   613
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   614
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   615
    System.out.println("test_2ci_off: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   616
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   617
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   618
      test_2vi_off(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   619
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   620
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   621
    System.out.println("test_2vi_off: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   622
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   623
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   624
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   625
      test_ci_inv(a1, OFFSET);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   626
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   627
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   628
    System.out.println("test_ci_inv: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   629
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   630
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   631
      test_vi_inv(a2, 123., OFFSET);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   632
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   633
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   634
    System.out.println("test_vi_inv: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   635
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   636
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   637
      test_cp_inv(a1, a2, OFFSET);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   638
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   639
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   640
    System.out.println("test_cp_inv: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   641
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   642
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   643
      test_2ci_inv(a1, a2, OFFSET);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   644
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   645
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   646
    System.out.println("test_2ci_inv: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   647
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   648
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   649
      test_2vi_inv(a1, a2, 123., 103., OFFSET);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   650
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   651
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   652
    System.out.println("test_2vi_inv: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   653
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   654
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   655
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   656
      test_ci_scl(a1);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   657
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   658
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   659
    System.out.println("test_ci_scl: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   660
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   661
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   662
      test_vi_scl(a2, 123.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   663
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   664
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   665
    System.out.println("test_vi_scl: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   666
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   667
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   668
      test_cp_scl(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   669
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   670
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   671
    System.out.println("test_cp_scl: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   672
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   673
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   674
      test_2ci_scl(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   675
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   676
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   677
    System.out.println("test_2ci_scl: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   678
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   679
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   680
      test_2vi_scl(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   681
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   682
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   683
    System.out.println("test_2vi_scl: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   684
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   685
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   686
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   687
      test_cp_alndst(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   688
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   689
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   690
    System.out.println("test_cp_alndst: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   691
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   692
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   693
      test_cp_alnsrc(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   694
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   695
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   696
    System.out.println("test_cp_alnsrc: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   697
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   698
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   699
      test_2ci_aln(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   700
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   701
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   702
    System.out.println("test_2ci_aln: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   703
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   704
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   705
      test_2vi_aln(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   706
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   707
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   708
    System.out.println("test_2vi_aln: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   709
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   710
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   711
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   712
      test_cp_unalndst(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   713
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   714
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   715
    System.out.println("test_cp_unalndst: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   716
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   717
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   718
      test_cp_unalnsrc(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   719
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   720
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   721
    System.out.println("test_cp_unalnsrc: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   722
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   723
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   724
      test_2ci_unaln(a1, a2);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   725
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   726
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   727
    System.out.println("test_2ci_unaln: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   728
    start = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   729
    for (int i=0; i<ITERS; i++) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   730
      test_2vi_unaln(a1, a2, 123., 103.);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   731
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   732
    end = System.currentTimeMillis();
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   733
    System.out.println("test_2vi_unaln: " + (end - start));
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   734
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   735
    return errn;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   736
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   737
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   738
  static void test_ci(double[] a) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   739
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   740
      a[i] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   741
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   742
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   743
  static void test_vi(double[] a, double b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   744
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   745
      a[i] = b;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   746
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   747
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   748
  static void test_cp(double[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   749
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   750
      a[i] = b[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   751
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   752
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   753
  static void test_2ci(double[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   754
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   755
      a[i] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   756
      b[i] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   757
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   758
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   759
  static void test_2vi(double[] a, double[] b, double c, double d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   760
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   761
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   762
      b[i] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   763
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   764
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   765
  static void test_ci_neg(double[] a) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   766
    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
   767
      a[i] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   768
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   769
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   770
  static void test_vi_neg(double[] a, double b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   771
    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
   772
      a[i] = b;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   773
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   774
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   775
  static void test_cp_neg(double[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   776
    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
   777
      a[i] = b[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   778
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   779
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   780
  static void test_2ci_neg(double[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   781
    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
   782
      a[i] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   783
      b[i] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   784
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   785
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   786
  static void test_2vi_neg(double[] a, double[] b, double c, double d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   787
    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
   788
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   789
      b[i] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   790
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   791
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   792
  static void test_ci_oppos(double[] a) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   793
    int limit = a.length-1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   794
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   795
      a[limit-i] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   796
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   797
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   798
  static void test_vi_oppos(double[] a, double b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   799
    int limit = a.length-1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   800
    for (int i = limit; i >= 0; i-=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   801
      a[limit-i] = b;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   802
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   803
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   804
  static void test_cp_oppos(double[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   805
    int limit = a.length-1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   806
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   807
      a[i] = b[limit-i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   808
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   809
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   810
  static void test_2ci_oppos(double[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   811
    int limit = a.length-1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   812
    for (int i = 0; i < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   813
      a[limit-i] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   814
      b[i] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   815
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   816
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   817
  static void test_2vi_oppos(double[] a, double[] b, double c, double d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   818
    int limit = a.length-1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   819
    for (int i = limit; i >= 0; i-=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   820
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   821
      b[limit-i] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   822
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   823
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   824
  static void test_ci_off(double[] a) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   825
    for (int i = 0; i < a.length-OFFSET; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   826
      a[i+OFFSET] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   827
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   828
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   829
  static void test_vi_off(double[] a, double b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   830
    for (int i = 0; i < a.length-OFFSET; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   831
      a[i+OFFSET] = b;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   832
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   833
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   834
  static void test_cp_off(double[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   835
    for (int i = 0; i < a.length-OFFSET; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   836
      a[i+OFFSET] = b[i+OFFSET];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   837
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   838
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   839
  static void test_2ci_off(double[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   840
    for (int i = 0; i < a.length-OFFSET; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   841
      a[i+OFFSET] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   842
      b[i+OFFSET] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   843
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   844
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   845
  static void test_2vi_off(double[] a, double[] b, double c, double d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   846
    for (int i = 0; i < a.length-OFFSET; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   847
      a[i+OFFSET] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   848
      b[i+OFFSET] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   849
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   850
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   851
  static void test_ci_inv(double[] a, int k) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   852
    for (int i = 0; i < a.length-k; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   853
      a[i+k] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   854
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   855
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   856
  static void test_vi_inv(double[] a, double b, int k) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   857
    for (int i = 0; i < a.length-k; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   858
      a[i+k] = b;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   859
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   860
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   861
  static void test_cp_inv(double[] a, double[] b, int k) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   862
    for (int i = 0; i < a.length-k; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   863
      a[i+k] = b[i+k];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   864
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   865
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   866
  static void test_2ci_inv(double[] a, double[] b, int k) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   867
    for (int i = 0; i < a.length-k; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   868
      a[i+k] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   869
      b[i+k] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   870
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   871
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   872
  static void test_2vi_inv(double[] a, double[] b, double c, double d, int k) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   873
    for (int i = 0; i < a.length-k; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   874
      a[i+k] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   875
      b[i+k] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   876
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   877
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   878
  static void test_ci_scl(double[] a) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   879
    for (int i = 0; i*SCALE < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   880
      a[i*SCALE] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   881
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   882
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   883
  static void test_vi_scl(double[] a, double b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   884
    for (int i = 0; i*SCALE < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   885
      a[i*SCALE] = b;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   886
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   887
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   888
  static void test_cp_scl(double[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   889
    for (int i = 0; i*SCALE < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   890
      a[i*SCALE] = b[i*SCALE];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   891
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   892
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   893
  static void test_2ci_scl(double[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   894
    for (int i = 0; i*SCALE < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   895
      a[i*SCALE] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   896
      b[i*SCALE] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   897
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   898
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   899
  static void test_2vi_scl(double[] a, double[] b, double c, double d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   900
    for (int i = 0; i*SCALE < a.length; i+=1) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   901
      a[i*SCALE] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   902
      b[i*SCALE] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   903
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   904
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   905
  static void test_cp_alndst(double[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   906
    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
   907
      a[i+ALIGN_OFF] = b[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   908
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   909
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   910
  static void test_cp_alnsrc(double[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   911
    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
   912
      a[i] = b[i+ALIGN_OFF];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   913
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   914
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   915
  static void test_2ci_aln(double[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   916
    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
   917
      a[i+ALIGN_OFF] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   918
      b[i] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   919
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   920
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   921
  static void test_2vi_aln(double[] a, double[] b, double c, double d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   922
    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
   923
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   924
      b[i+ALIGN_OFF] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   925
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   926
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   927
  static void test_cp_unalndst(double[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   928
    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
   929
      a[i+UNALIGN_OFF] = b[i];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   930
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   931
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   932
  static void test_cp_unalnsrc(double[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   933
    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
   934
      a[i] = b[i+UNALIGN_OFF];
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   935
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   936
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   937
  static void test_2ci_unaln(double[] a, double[] b) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   938
    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
   939
      a[i+UNALIGN_OFF] = -123.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   940
      b[i] = -103.;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   941
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   942
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   943
  static void test_2vi_unaln(double[] a, double[] b, double c, double d) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   944
    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
   945
      a[i] = c;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   946
      b[i+UNALIGN_OFF] = d;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   947
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   948
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   949
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   950
  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
   951
    if (elem != val) {
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   952
      System.err.println(text + "[" + i + "] = " + elem + " != " + val);
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   953
      return 1;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   954
    }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   955
    return 0;
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   956
  }
657b387034fb 7119644: Increase superword's vector size up to 256 bits
kvn
parents:
diff changeset
   957
}