FileDocCategorySizeDatePackage
LoopInterchanged.javaAPI DocExample1510Thu Mar 11 19:51:46 GMT 2004javathreads.examples.ch15.example10

LoopInterchanged

public class LoopInterchanged extends Object implements ScaleTester

Fields Summary
private float[]
lookupValues
private int
nRows
private int
nCols
private int
nThreads
Constructors Summary
Methods Summary
public float[][]doCalc()

        LoopInterchangedHandler loop =
                    new LoopInterchangedHandler(nCols, nThreads);
        loop.loopProcess();
        return lookupValues;
    
public voidinit(int nRows, int nCols, int nThreads)

        this.nRows = nRows;
        this.nCols = nCols;
        this.nThreads = nThreads;
        lookupValues = new float[nRows][];
        for (int j = 0; j < nRows; j++) {
            lookupValues[j] = new float[nCols];
        }