IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26172 for trunk/psModules


Ignore:
Timestamp:
Nov 17, 2009, 1:56:15 PM (17 years ago)
Author:
Paul Price
Message:

Fix "variable used uninitialised".

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/objects/pmSourceGroups.c

    r26162 r26172  
    6363    int nCells = nThreads * 2*2;        // number of cells in a single set
    6464    int C = sqrt(nCells) + 0.5;
    65     int Cx, Cy;                         // Number of cells in x and y
     65    int Cx = 1, Cy = 1;                 // Number of cells in x and y
    6666
    6767    // we need to assign Cx and Cy based on the dimensionality of the image
    6868    // crude way to find most evenly balanced factors of nCells:
    69     if (C <= 1) {
    70         Cx = Cy = 1;
    71     } else {
    72         for (int i = C; i >= 1; i--) {
    73             int C1 = nCells / C;
    74             int C2 = nCells / C1;
    75             if (C1*C2 != nCells) continue;
     69    for (int i = C; i >= 1; i--) {
     70        int C1 = nCells / C;
     71        int C2 = nCells / C1;
     72        if (C1*C2 != nCells) continue;
    7673
    77             if (readout->image->numRows > readout->image->numCols) {
    78                 Cx = PS_MAX(C1, C2);
    79                 Cy = PS_MIN(C1, C2);
    80             } else {
    81                 Cx = PS_MAX(C1, C2);
    82                 Cy = PS_MIN(C1, C2);
    83             }
     74        if (readout->image->numRows > readout->image->numCols) {
     75            Cx = PS_MAX(C1, C2);
     76            Cy = PS_MIN(C1, C2);
     77        } else {
     78            Cx = PS_MAX(C1, C2);
     79            Cy = PS_MIN(C1, C2);
    8480        }
    8581    }
Note: See TracChangeset for help on using the changeset viewer.