hotspot/test/compiler/7192963/TestDoubleVect.java
author katleman
Thu, 13 Jun 2013 09:48:22 -0700
changeset 18035 0664c494ac98
parent 13490 d19348851d2e
permissions -rw-r--r--
Added tag jdk8-b94 for changeset 1921ac5090fc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
13490
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
     1
/*
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
     2
 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
     4
 *
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
     7
 * published by the Free Software Foundation.
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
     8
 *
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    13
 * accompanied this code).
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    14
 *
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    18
 *
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    21
 * questions.
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    22
 *
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    23
 */
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    24
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    25
/**
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    26
 * @test
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    27
 * @bug 7192963
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    28
 * @summary assert(_in[req-1] == this) failed: Must pass arg count to 'new'
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    29
 *
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    30
 * @run main/othervm/timeout=400 -Xbatch -Xmx64m TestDoubleVect
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    31
 */
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    32
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    33
public class TestDoubleVect {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    34
  private static final int ARRLEN = 997;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    35
  private static final int ITERS  = 11000;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    36
  public static void main(String args[]) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    37
    System.out.println("Testing Double vectors");
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    38
    int errn = test();
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    39
    if (errn > 0) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    40
      System.err.println("FAILED: " + errn + " errors");
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    41
      System.exit(97);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    42
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    43
    System.out.println("PASSED");
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    44
  }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    45
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    46
  static int test() {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    47
    double[] a0 = new double[ARRLEN];
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    48
    double[] a1 = new double[ARRLEN];
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    49
    // Initialize
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    50
    for (int i=0; i<ARRLEN; i++) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    51
      a1[i] = (double)i;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    52
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    53
    System.out.println("Warmup");
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    54
    for (int i=0; i<ITERS; i++) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    55
      test_init(a0);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    56
      test_addi(a0, a1);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    57
      test_divi(a0, a1);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    58
      test_unrl_init(a0);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    59
      test_unrl_addi(a0, a1);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    60
      test_unrl_divi(a0, a1);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    61
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    62
    // Test and verify results
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    63
    System.out.println("Verification");
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    64
    int errn = 0;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    65
    {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    66
      test_init(a0);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    67
      for (int i=0; i<ARRLEN; i++) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    68
        errn += verify("test_init: ", i, a0[i], (double)(i&3));
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    69
      }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    70
      test_addi(a0, a1);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    71
      for (int i=0; i<ARRLEN; i++) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    72
        errn += verify("test_addi: ", i, a0[i], (double)(i+(i&3)));
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    73
      }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    74
      test_divi(a0, a1);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    75
      for (int i=0; i<ARRLEN; i++) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    76
        errn += verify("test_divi: ", i, a0[i], (double)i/(double)((i&3)+1));
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    77
      }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    78
      test_unrl_init(a0);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    79
      for (int i=0; i<ARRLEN; i++) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    80
        errn += verify("test_unrl_init: ", i, a0[i], (double)(i&3));
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    81
      }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    82
      test_unrl_addi(a0, a1);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    83
      for (int i=0; i<ARRLEN; i++) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    84
        errn += verify("test_unrl_addi: ", i, a0[i], (double)(i+(i&3)));
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    85
      }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    86
      test_unrl_divi(a0, a1);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    87
      for (int i=0; i<ARRLEN; i++) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    88
        errn += verify("test_unrl_divi: ", i, a0[i], (double)i/(double)((i&3)+1));
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    89
      }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    90
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    91
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    92
    if (errn > 0)
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    93
      return errn;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    94
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    95
    System.out.println("Time");
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    96
    long start, end;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    97
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    98
    start = System.currentTimeMillis();
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
    99
    for (int i=0; i<ITERS; i++) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   100
      test_init(a0);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   101
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   102
    end = System.currentTimeMillis();
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   103
    System.out.println("test_init: " + (end - start));
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   104
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   105
    start = System.currentTimeMillis();
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   106
    for (int i=0; i<ITERS; i++) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   107
      test_addi(a0, a1);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   108
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   109
    end = System.currentTimeMillis();
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   110
    System.out.println("test_addi: " + (end - start));
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   111
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   112
    start = System.currentTimeMillis();
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   113
    for (int i=0; i<ITERS; i++) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   114
      test_divi(a0, a1);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   115
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   116
    end = System.currentTimeMillis();
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   117
    System.out.println("test_divi: " + (end - start));
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   118
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   119
    start = System.currentTimeMillis();
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   120
    for (int i=0; i<ITERS; i++) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   121
      test_unrl_init(a0);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   122
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   123
    end = System.currentTimeMillis();
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   124
    System.out.println("test_unrl_init: " + (end - start));
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   125
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   126
    start = System.currentTimeMillis();
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   127
    for (int i=0; i<ITERS; i++) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   128
      test_unrl_addi(a0, a1);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   129
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   130
    end = System.currentTimeMillis();
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   131
    System.out.println("test_unrl_addi: " + (end - start));
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   132
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   133
    start = System.currentTimeMillis();
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   134
    for (int i=0; i<ITERS; i++) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   135
      test_unrl_divi(a0, a1);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   136
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   137
    end = System.currentTimeMillis();
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   138
    System.out.println("test_unrl_divi: " + (end - start));
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   139
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   140
    return errn;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   141
  }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   142
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   143
  static void test_init(double[] a0) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   144
    for (int i = 0; i < a0.length; i+=1) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   145
      a0[i] = (double)(i&3);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   146
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   147
  }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   148
  static void test_addi(double[] a0, double[] a1) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   149
    for (int i = 0; i < a0.length; i+=1) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   150
      a0[i] = a1[i]+(double)(i&3);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   151
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   152
  }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   153
  static void test_divi(double[] a0, double[] a1) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   154
    for (int i = 0; i < a0.length; i+=1) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   155
      a0[i] = a1[i]/(double)((i&3)+1);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   156
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   157
  }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   158
  static void test_unrl_init(double[] a0) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   159
    int i = 0;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   160
    for (; i < a0.length-4; i+=4) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   161
      a0[i+0] = 0.;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   162
      a0[i+1] = 1.;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   163
      a0[i+2] = 2.;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   164
      a0[i+3] = 3.;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   165
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   166
    for (; i < a0.length; i++) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   167
      a0[i] = (double)(i&3);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   168
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   169
  }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   170
  static void test_unrl_addi(double[] a0, double[] a1) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   171
    int i = 0;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   172
    for (; i < a0.length-4; i+=4) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   173
      a0[i+0] = a1[i+0]+0.;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   174
      a0[i+1] = a1[i+1]+1.;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   175
      a0[i+2] = a1[i+2]+2.;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   176
      a0[i+3] = a1[i+3]+3.;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   177
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   178
    for (; i < a0.length; i++) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   179
      a0[i] = a1[i]+(double)(i&3);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   180
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   181
  }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   182
  static void test_unrl_divi(double[] a0, double[] a1) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   183
    int i = 0;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   184
    for (; i < a0.length-4; i+=4) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   185
      a0[i+0] = a1[i+0]/1.;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   186
      a0[i+1] = a1[i+1]/2.;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   187
      a0[i+2] = a1[i+2]/3.;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   188
      a0[i+3] = a1[i+3]/4.;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   189
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   190
    for (; i < a0.length; i++) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   191
      a0[i] = a1[i]/(double)((i&3)+1);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   192
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   193
  }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   194
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   195
  static int verify(String text, int i, double elem, double val) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   196
    if (elem != val) {
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   197
      System.err.println(text + "[" + i + "] = " + elem + " != " + val);
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   198
      return 1;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   199
    }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   200
    return 0;
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   201
  }
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   202
}
d19348851d2e 7192963: assert(_in[req-1] == this) failed: Must pass arg count to 'new'
kvn
parents:
diff changeset
   203