benchmarks/matrix-multiplication/src/main/java/org/apidesign/benchmark/matrixmul/Main.java
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Thu, 13 Dec 2012 08:40:39 +0100
branchbenchmarks
changeset 314 1a3f102e5ea5
parent 268 e01b65623f72
permissions -rw-r--r--
Fixing licenses for benchmarks module, so it can be merged to default branch
     1 /**
     2  * Back 2 Browser Bytecode Translator
     3  * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     4  *
     5  * This program is free software: you can redistribute it and/or modify
     6  * it under the terms of the GNU General Public License as published by
     7  * the Free Software Foundation, version 2 of the License.
     8  *
     9  * This program is distributed in the hope that it will be useful,
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    12  * GNU General Public License for more details.
    13  *
    14  * You should have received a copy of the GNU General Public License
    15  * along with this program. Look for COPYING file in the top folder.
    16  * If not, see http://opensource.org/licenses/GPL-2.0.
    17  */
    18 package org.apidesign.benchmark.matrixmul;
    19 
    20 public class Main {
    21 
    22     public static final int ITERATION_COUNT = 100000;
    23     
    24     public static void main(String[] args) {
    25         Matrix m1 = new Matrix(5);
    26         Matrix m2 = new Matrix(5);
    27         
    28         m1.generateData();
    29         m2.generateData();
    30         
    31         //m1.printOn(System.out);
    32         //System.out.println("x");
    33         //m2.printOn(System.out);
    34         
    35         for (int i = 0; i < ITERATION_COUNT; i++) {
    36             m1.multiply(m2);
    37         }
    38         
    39         //System.out.println("=");
    40         //m1.printOn(System.out);
    41     }
    42 }