Search in sources :

Example 1 with ForkJoinPool

use of jsr166y.ForkJoinPool in project h2o-2 by h2oai.

the class CholTest method test.

public void test() {
    Log.info("CholTest::test enter");
    for (int sz = 6000; sz < 10000; sz += 2000) {
        Log.info("CholTest::test sz is " + sz);
        DataSetup data = new DataSetup(sz, 12345);
        long start = System.currentTimeMillis();
        CholeskyDecomposition jamaChol = new Matrix(data.xx).chol();
        Log.info("JAMA CHOLESKY [N = " + sz + "] TAKES " + (System.currentTimeMillis() - start) + " MILLISECONDS.");
        if (!jamaChol.isSPD())
            continue;
        ForkJoinPool fjp = new ForkJoinPool(32);
        for (int t = 2; t <= 32; t += 2) {
            for (int step : STEPS) fjp.invoke(new TestSetup(new DataSetup(data.xx), jamaChol.getL().getArray(), step, t));
        }
    }
    Log.info("CholTest::test exit");
}
Also used : CholeskyDecomposition(Jama.CholeskyDecomposition) Matrix(Jama.Matrix) ForkJoinPool(jsr166y.ForkJoinPool)

Aggregations

CholeskyDecomposition (Jama.CholeskyDecomposition)1 Matrix (Jama.Matrix)1 ForkJoinPool (jsr166y.ForkJoinPool)1