FileDocCategorySizeDatePackage
GuidedLoopInterchanged.javaAPI DocExample1776Thu Mar 11 20:55:24 GMT 2004javathreads.examples.ch15.example11

GuidedLoopInterchanged

public class GuidedLoopInterchanged extends Object implements ScaleTester

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

        GuidedLoopInterchangedHandler loop =
                    new GuidedLoopInterchangedHandler(nCols, nThreads);
        loop.loopProcess();
	lookupValues[0][0] += sumValue;
        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];
        }