FileDocCategorySizeDatePackage
GuidedLoopInterchanged.javaAPI DocExample1507Thu Mar 11 19:52:22 GMT 2004javathreads.examples.ch15.example12

GuidedLoopInterchanged

public class GuidedLoopInterchanged extends Object implements ScaleTester

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

	for (int i = 0; i < nCols; i++)
	    lookupValues[0][i] = 0;
        GuidedLoopInterchangedHandler loop =
                    new GuidedLoopInterchangedHandler(nCols, nThreads);
	for (j = 1; j < nRows; j++)
	    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];
        }