ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/LU.java
(Generate patch)

Comparing jsr166/src/test/loops/LU.java (file contents):
Revision 1.7 by jsr166, Wed Dec 31 16:44:01 2014 UTC vs.
Revision 1.8 by jsr166, Thu Jan 15 18:34:19 2015 UTC

# Line 7 | Line 7
7   //import jsr166y.*;
8   import java.util.concurrent.*;
9  
10
10   /**
11   * LU matrix decomposition demo
12   * Based on those in Cilk and Hood
# Line 73 | Line 72 | public final class LU {
72          pool.shutdown();
73      }
74  
76
75      static void randomInit(double[][] M, int n) {
76          java.util.Random rng = new java.util.Random();
77          for (int i = 0; i < n; ++i)
# Line 104 | Line 102 | public final class LU {
102          System.out.println("Max difference = " + maxDiff);
103      }
104  
107
105      // Blocks record underlying matrix, and offsets into current block
106      static final class Block {
107          final double[][] m;
# Line 217 | Line 214 | public final class LU {
214                  Block L10 = new Block(L.m, L.loRow+h, L.loCol);
215                  Block L11 = new Block(L.m, L.loRow+h, L.loCol+h);
216  
220
217                  Seq3 s1 =
218                      seq(new Lower(h, L00, M00),
219                          new Schur(h, L10, M00, M10),
# Line 233 | Line 229 | public final class LU {
229          }
230      }
231  
236
232      static final class Upper extends RecursiveAction {
233          final int size;
234          final Block U;
# Line 257 | Line 252 | public final class LU {
252              }
253          }
254  
260
255          public void compute() {
256              if (size == BLOCK_SIZE) {
257                  upper();
# Line 290 | Line 284 | public final class LU {
284          }
285      }
286  
293
287      static final class LowerUpper extends RecursiveAction {
288          final int size;
289          final Block M;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines