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.6 by jsr166, Wed Jul 4 20:07:02 2012 UTC vs.
Revision 1.8 by jsr166, Thu Jan 15 18:34:19 2015 UTC

# Line 6 | Line 6
6  
7   //import jsr166y.*;
8   import java.util.concurrent.*;
9 import java.util.concurrent.TimeUnit;
10
9  
10   /**
11   * LU matrix decomposition demo
# Line 74 | Line 72 | public final class LU {
72          pool.shutdown();
73      }
74  
77
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 105 | Line 102 | public final class LU {
102          System.out.println("Max difference = " + maxDiff);
103      }
104  
108
105      // Blocks record underlying matrix, and offsets into current block
106      static final class Block {
107          final double[][] m;
# Line 218 | 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  
221
217                  Seq3 s1 =
218                      seq(new Lower(h, L00, M00),
219                          new Schur(h, L10, M00, M10),
# Line 234 | Line 229 | public final class LU {
229          }
230      }
231  
237
232      static final class Upper extends RecursiveAction {
233          final int size;
234          final Block U;
# Line 258 | Line 252 | public final class LU {
252              }
253          }
254  
261
255          public void compute() {
256              if (size == BLOCK_SIZE) {
257                  upper();
# Line 291 | Line 284 | public final class LU {
284          }
285      }
286  
294
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