IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 9, 2004, 1:34:58 PM (22 years ago)
Author:
desonia
Message:

cleanup of some indent-induced madness.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/dataManip/psMatrixVectorArithmetic.c

    r1407 r1440  
    3030 *  @author Ross Harman, MHPCC
    3131 *
    32  *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
    33  *  @date $Date: 2004-08-07 00:06:06 $
     32 *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
     33 *  @date $Date: 2004-08-09 23:34:57 $
    3434 *
    3535 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    114114    ps##TYPE *i1 = NULL;                                                                                     \
    115115    ps##TYPE *i2 = NULL;                                                                                     \
    116     o  = &((psScalar*)OUT)->data.TYPE;                                                                       \
    117     i1 = &((psScalar*)IN1)->data.TYPE;                                                                       \
    118     i2 = &((psScalar*)IN2)->data.TYPE;                                                                       \
     116    o  = &((psScalar* )OUT)->data.TYPE;                                                                       \
     117    i1 = &((psScalar* )IN1)->data.TYPE;                                                                       \
     118    i2 = &((psScalar* )IN2)->data.TYPE;                                                                       \
    119119    *o = OP;                                                                                                 \
    120120}
     
    127127    ps##TYPE *i1 = NULL;                                                                                     \
    128128    ps##TYPE *i2 = NULL;                                                                                     \
    129     npt  = ((psVector*)IN1)->n;                                                                              \
    130     o  = ((psVector*)OUT)->data.TYPE;                                                                        \
    131     i1 = &((psScalar*)IN1)->data.TYPE;                                                                       \
    132     i2 = ((psVector*)IN2)->data.TYPE;                                                                        \
     129    npt  = ((psVector* )IN1)->n;                                                                              \
     130    o  = ((psVector* )OUT)->data.TYPE;                                                                        \
     131    i1 = &((psScalar* )IN1)->data.TYPE;                                                                       \
     132    i2 = ((psVector* )IN2)->data.TYPE;                                                                        \
    133133    for (i=0; i < npt; i++, o++, i2++) {                                                                     \
    134134        *o = OP;                                                                                             \
     
    145145    ps##TYPE *i1 = NULL;                                                                                     \
    146146    ps##TYPE *i2 = NULL;                                                                                     \
    147     numRows = ((psImage*)IN1)->numRows;                                                                      \
    148     numCols = ((psImage*)IN1)->numCols;                                                                      \
     147    numRows = ((psImage* )IN1)->numRows;                                                                      \
     148    numCols = ((psImage* )IN1)->numCols;                                                                      \
    149149    for(j = 0; j < numCols; j++) {                                                                           \
    150         o  = ((psImage*)OUT)->data.TYPE[j];                                                                  \
    151         i1 = &((psScalar*)IN1)->data.TYPE;                                                                   \
    152         i2 = ((psImage*)IN2)->data.TYPE[j];                                                                  \
     150        o  = ((psImage* )OUT)->data.TYPE[j];                                                                  \
     151        i1 = &((psScalar* )IN1)->data.TYPE;                                                                   \
     152        i2 = ((psImage* )IN2)->data.TYPE[j];                                                                  \
    153153        for(i = 0; i < numRows; i++, o++, i2++) {                                                            \
    154154            *o = OP;                                                                                         \
     
    165165    ps##TYPE *i1 = NULL;                                                                                     \
    166166    ps##TYPE *i2 = NULL;                                                                                     \
    167     n1  = ((psVector*)IN1)->n;                                                                               \
    168     o  = ((psVector*)OUT)->data.TYPE;                                                                        \
    169     i1 = ((psVector*)IN1)->data.TYPE;                                                                        \
    170     i2 = &((psScalar*)IN2)->data.TYPE;                                                                       \
     167    n1  = ((psVector* )IN1)->n;                                                                               \
     168    o  = ((psVector* )OUT)->data.TYPE;                                                                        \
     169    i1 = ((psVector* )IN1)->data.TYPE;                                                                        \
     170    i2 = &((psScalar* )IN2)->data.TYPE;                                                                       \
    171171    for (i=0; i < n1; i++, o++, i1++) {                                                                      \
    172172        *o = OP;                                                                                             \
     
    182182    ps##TYPE *i1 = NULL;                                                                                     \
    183183    ps##TYPE *i2 = NULL;                                                                                     \
    184     n1  = ((psVector*)IN1)->n;                                                                               \
    185     n2  = ((psVector*)IN2)->n;                                                                               \
     184    n1  = ((psVector* )IN1)->n;                                                                               \
     185    n2  = ((psVector* )IN2)->n;                                                                               \
    186186    if(n1 != n2) {                                                                                           \
    187187        psError(__func__, ": Inconsistent element count: %d vs %d", n1, n2);                                 \
    188188        return OUT;                                                                                          \
    189189    }                                                                                                        \
    190     o  = ((psVector*)OUT)->data.TYPE;                                                                        \
    191     i1 = ((psVector*)IN1)->data.TYPE;                                                                        \
    192     i2 = ((psVector*)IN2)->data.TYPE;                                                                        \
     190    o  = ((psVector* )OUT)->data.TYPE;                                                                        \
     191    i1 = ((psVector* )IN1)->data.TYPE;                                                                        \
     192    i2 = ((psVector* )IN2)->data.TYPE;                                                                        \
    193193    for (i=0; i < n1; i++, o++, i1++, i2++) {                                                                \
    194194        *o = OP;                                                                                             \
     
    207207    ps##TYPE *i1 = NULL;                                                                                     \
    208208    ps##TYPE *i2 = NULL;                                                                                     \
    209     n1  = ((psVector*)IN1)->n;                                                                               \
    210     dim1 = ((psVector*)IN1)->type.dimen;                                                                     \
    211     numRows2 = ((psImage*)IN2)->numRows;                                                                     \
    212     numCols2 = ((psImage*)IN2)->numCols;                                                                     \
     209    n1  = ((psVector* )IN1)->n;                                                                               \
     210    dim1 = ((psVector* )IN1)->type.dimen;                                                                     \
     211    numRows2 = ((psImage* )IN2)->numRows;                                                                     \
     212    numCols2 = ((psImage* )IN2)->numCols;                                                                     \
    213213    \
    214214    if(dim1 == PS_DIMEN_VECTOR) { /* Regular vectors */                                                      \
     
    218218        }                                                                                                    \
    219219        \
    220         i1 = ((psVector*)IN1)->data.TYPE;                                                                    \
     220        i1 = ((psVector* )IN1)->data.TYPE;                                                                    \
    221221        for(j = 0; j < numRows2; j++, i1++) {                                                                \
    222             o  = ((psImage*)OUT)->data.TYPE[j];                                                              \
    223             i2 = ((psImage*)IN2)->data.TYPE[j];                                                              \
     222            o  = ((psImage* )OUT)->data.TYPE[j];                                                              \
     223            i2 = ((psImage* )IN2)->data.TYPE[j];                                                              \
    224224            for(i = 0; i < numCols2; i++, o++, i2++) {                                                       \
    225225                *o = OP;                                                                                     \
     
    233233        \
    234234        for(j = 0; j < numRows2; j++) {                                                                      \
    235             o  = ((psImage*)OUT)->data.TYPE[j];                                                              \
    236             i1 = ((psVector*)IN1)->data.TYPE;                                                                \
    237             i2 = ((psImage*)IN2)->data.TYPE[j];                                                              \
     235            o  = ((psImage* )OUT)->data.TYPE[j];                                                              \
     236            i1 = ((psVector* )IN1)->data.TYPE;                                                                \
     237            i2 = ((psImage* )IN2)->data.TYPE[j];                                                              \
    238238            for(i = 0; i < numCols2; i++, o++, i1++, i2++) {                                                 \
    239239                *o = OP;                                                                                     \
     
    253253    ps##TYPE *i1 = NULL;                                                                                     \
    254254    ps##TYPE *i2 = NULL;                                                                                     \
    255     numRows = ((psImage*)IN1)->numRows;                                                                      \
    256     numCols = ((psImage*)IN1)->numCols;                                                                      \
     255    numRows = ((psImage* )IN1)->numRows;                                                                      \
     256    numCols = ((psImage* )IN1)->numCols;                                                                      \
    257257    for(j = 0; j < numRows; j++) {                                                                           \
    258         o  = ((psImage*)OUT)->data.TYPE[j];                                                                  \
    259         i1 = ((psImage*)IN1)->data.TYPE[j];                                                                  \
    260         i2 = &((psScalar*)IN2)->data.TYPE;                                                                   \
     258        o  = ((psImage* )OUT)->data.TYPE[j];                                                                  \
     259        i1 = ((psImage* )IN1)->data.TYPE[j];                                                                  \
     260        i2 = &((psScalar* )IN2)->data.TYPE;                                                                   \
    261261        for(i = 0; i < numCols; i++, o++, i1++) {                                                            \
    262262            *o = OP;                                                                                         \
     
    276276    ps##TYPE *i1 = NULL;                                                                                     \
    277277    ps##TYPE *i2 = NULL;                                                                                     \
    278     n2  = ((psVector*)IN2)->n;                                                                               \
    279     dim2 = ((psVector*)IN2)->type.dimen;                                                                     \
    280     numRows1 = ((psImage*)IN1)->numRows;                                                                     \
    281     numCols1 = ((psImage*)IN1)->numCols;                                                                     \
     278    n2  = ((psVector* )IN2)->n;                                                                               \
     279    dim2 = ((psVector* )IN2)->type.dimen;                                                                     \
     280    numRows1 = ((psImage* )IN1)->numRows;                                                                     \
     281    numCols1 = ((psImage* )IN1)->numCols;                                                                     \
    282282    \
    283283    if(dim2 == PS_DIMEN_VECTOR) { /* Regular vectors */                                                      \
     
    287287        }                                                                                                    \
    288288        \
    289         i2 = ((psVector*)IN2)->data.TYPE;                                                                    \
     289        i2 = ((psVector* )IN2)->data.TYPE;                                                                    \
    290290        for(j = 0; j < numRows1; j++, i1++) {                                                                \
    291             o  = ((psImage*)OUT)->data.TYPE[j];                                                              \
    292             i1 = ((psImage*)IN1)->data.TYPE[j];                                                              \
     291            o  = ((psImage* )OUT)->data.TYPE[j];                                                              \
     292            i1 = ((psImage* )IN1)->data.TYPE[j];                                                              \
    293293            for(i = 0; i < numCols1; i++, o++, i1++) {                                                       \
    294294                *o = OP;                                                                                     \
     
    302302        \
    303303        for(j = 0; j < numRows1; j++) {                                                                      \
    304             o  = ((psImage*)OUT)->data.TYPE[j];                                                              \
    305             i1 = ((psVector*)IN2)->data.TYPE;                                                                \
    306             i2 = ((psImage*)IN1)->data.TYPE[j];                                                              \
     304            o  = ((psImage* )OUT)->data.TYPE[j];                                                              \
     305            i1 = ((psVector* )IN2)->data.TYPE;                                                                \
     306            i2 = ((psImage* )IN1)->data.TYPE[j];                                                              \
    307307            for(i = 0; i < numCols1; i++, o++, i2++, i1++) {                                                 \
    308308                *o = OP;                                                                                     \
     
    323323    ps##TYPE *i1 = NULL;                                                                                     \
    324324    ps##TYPE *i2 = NULL;                                                                                     \
    325     numRows1 = ((psImage*)IN1)->numRows;                                                                     \
    326     numCols1 = ((psImage*)IN1)->numCols;                                                                     \
    327     numRows2 = ((psImage*)IN2)->numRows;                                                                     \
    328     numCols2 = ((psImage*)IN2)->numCols;                                                                     \
     325    numRows1 = ((psImage* )IN1)->numRows;                                                                     \
     326    numCols1 = ((psImage* )IN1)->numCols;                                                                     \
     327    numRows2 = ((psImage* )IN2)->numRows;                                                                     \
     328    numCols2 = ((psImage* )IN2)->numCols;                                                                     \
    329329    if(numRows1!=numRows2 || numCols1!=numCols2) {                                                           \
    330330        psError(__func__, ": Inconsistent element count: numRows: %d vs %d numCols: %d vs %d", numRows1,     \
     
    333333    }                                                                                                        \
    334334    for(j = 0; j < numRows1; j++) {                                                                          \
    335         o  = ((psImage*)OUT)->data.TYPE[j];                                                                  \
    336         i1 = ((psImage*)IN1)->data.TYPE[j];                                                                  \
    337         i2 = ((psImage*)IN2)->data.TYPE[j];                                                                  \
     335        o  = ((psImage* )OUT)->data.TYPE[j];                                                                  \
     336        i1 = ((psImage* )IN1)->data.TYPE[j];                                                                  \
     337        i2 = ((psImage* )IN2)->data.TYPE[j];                                                                  \
    338338        for(i = 0; i < numCols1; i++, o++, i1++, i2++) {                                                     \
    339339            *o = OP;                                                                                         \
     
    409409    psElemType elType2 = 0;
    410410    psElemType elTypeOut = 0;
    411     psType *psType1 = NULL;
    412     psType *psType2 = NULL;
    413     psType *psTypeOut = NULL;
    414 
    415     psTypeOut = (psType *) out;
     411    psType* psType1 = NULL;
     412    psType* psType2 = NULL;
     413    psType* psTypeOut = NULL;
     414
     415    psTypeOut = (psType* ) out;
    416416    if (psTypeOut == NULL) {
    417417        psError(__func__, ": Line %d - Null out argument", __LINE__);
     
    419419    }
    420420
    421     psType1 = (psType *) in1;
     421    psType1 = (psType* ) in1;
    422422    if (psType1 == NULL) {
    423423        psError(__func__, ": Line %d - Null in1 argument", __LINE__);
     
    425425    }
    426426
    427     psType2 = (psType *) in2;
     427    psType2 = (psType* ) in2;
    428428    if (psType2 == NULL) {
    429429        psError(__func__, ": Line %d - Null in2 argument", __LINE__);
     
    456456
    457457    if (dim1 == PS_DIMEN_VECTOR) {
    458         if (((psVector *) in1)->n == 0) {
     458        if (((psVector* ) in1)->n == 0) {
    459459            psError(__func__, ": Line %d - Vector contains zero elements");
    460460        }
    461461    } else if (dim1 == PS_DIMEN_IMAGE) {
    462         if (((psImage *) in1)->numCols == 0 || ((psImage *) in1)->numRows == 0) {
     462        if (((psImage* ) in1)->numCols == 0 || ((psImage* ) in1)->numRows == 0) {
    463463            psError(__func__, ": Line %d - Image contains zero length row or cols");
    464464        }
     
    466466
    467467    if (dim2 == PS_DIMEN_VECTOR) {
    468         if (((psVector *) in2)->n == 0) {
     468        if (((psVector* ) in2)->n == 0) {
    469469            psError(__func__, ": Line %d - Vector contains zero elements");
    470470        }
    471471    } else if (dim2 == PS_DIMEN_IMAGE) {
    472         if (((psImage *) in2)->numCols == 0 || ((psImage *) in2)->numRows == 0) {
     472        if (((psImage* ) in2)->numCols == 0 || ((psImage* ) in2)->numRows == 0) {
    473473            psError(__func__, ": Line %d - Image contains zero length row or cols");
    474474        }
     
    517517    ps##TYPE *o = NULL;                                                                                      \
    518518    ps##TYPE *i1 = NULL;                                                                                     \
    519     o  = &((psScalar*)OUT)->data.TYPE;                                                                       \
    520     i1 = &((psScalar*)IN)->data.TYPE;                                                                        \
     519    o  = &((psScalar* )OUT)->data.TYPE;                                                                       \
     520    i1 = &((psScalar* )IN)->data.TYPE;                                                                        \
    521521    *o = OP;                                                                                                 \
    522522}
     
    530530    ps##TYPE *o = NULL;                                                                                      \
    531531    ps##TYPE *i1 = NULL;                                                                                     \
    532     nIn = ((psVector*)IN)->n;                                                                                \
    533     nOut = ((psVector*)OUT)->n;                                                                              \
     532    nIn = ((psVector* )IN)->n;                                                                                \
     533    nOut = ((psVector* )OUT)->n;                                                                              \
    534534    if(nIn != nOut) {                                                                                        \
    535535        psError(__func__, ": Inconsistent element count: %d vs %d", nIn, nOut);                              \
    536536        return OUT;                                                                                          \
    537537    }                                                                                                        \
    538     o  = ((psVector*)OUT)->data.TYPE;                                                                        \
    539     i1 = ((psVector*)IN)->data.TYPE;                                                                         \
     538    o  = ((psVector* )OUT)->data.TYPE;                                                                        \
     539    i1 = ((psVector* )IN)->data.TYPE;                                                                         \
    540540    for(i = 0; i < nIn; i++, o++, i1++) {                                                                    \
    541541        *o = OP;                                                                                             \
     
    554554    ps##TYPE *o = NULL;                                                                                      \
    555555    ps##TYPE *i1 = NULL;                                                                                     \
    556     numRowsIn = ((psImage*)IN)->numRows;                                                                     \
    557     numColsIn = ((psImage*)IN)->numCols;                                                                     \
    558     numRowsOut = ((psImage*)OUT)->numRows;                                                                   \
    559     numColsOut = ((psImage*)OUT)->numCols;                                                                   \
     556    numRowsIn = ((psImage* )IN)->numRows;                                                                     \
     557    numColsIn = ((psImage* )IN)->numCols;                                                                     \
     558    numRowsOut = ((psImage* )OUT)->numRows;                                                                   \
     559    numColsOut = ((psImage* )OUT)->numCols;                                                                   \
    560560    if(numRowsIn!=numRowsOut || numColsIn!=numColsOut) {                                                     \
    561561        psError(__func__, ": Inconsistent element count: numRows: %d vs %d numCols: %d vs %d", numRowsIn,    \
     
    564564    }                                                                                                        \
    565565    for(j = 0; j < numRowsIn; j++) {                                                                         \
    566         o  = ((psImage*)OUT)->data.TYPE[j];                                                                  \
    567         i1 = ((psImage*)IN)->data.TYPE[j];                                                                   \
     566        o  = ((psImage* )OUT)->data.TYPE[j];                                                                  \
     567        i1 = ((psImage* )IN)->data.TYPE[j];                                                                   \
    568568        for(i = 0; i < numColsIn; i++, o++, i1++) {                                                          \
    569569            *o = OP;                                                                                         \
     
    713713    psElemType elTypeIn = 0;
    714714    psElemType elTypeOut = 0;
    715     psType *psTypeIn = NULL;
    716     psType *psTypeOut = NULL;
    717 
    718     psTypeOut = (psType *) out;
     715    psType* psTypeIn = NULL;
     716    psType* psTypeOut = NULL;
     717
     718    psTypeOut = (psType* ) out;
    719719    if (psTypeOut == NULL) {
    720720        psError(__func__, ": Line %d - Null out argument", __LINE__);
     
    722722    }
    723723
    724     psTypeIn = (psType *) in;
     724    psTypeIn = (psType* ) in;
    725725    if (psTypeIn == NULL) {
    726726        psError(__func__, ": Line %d - Null in argument", __LINE__);
     
    757757
    758758    if (dimIn == PS_DIMEN_VECTOR) {
    759         if (((psVector *) in)->n == 0) {
     759        if (((psVector* ) in)->n == 0) {
    760760            psError(__func__, ": Line %d - Vector contains zero elements");
    761761        }
    762762    } else if (dimIn == PS_DIMEN_IMAGE) {
    763         if (((psImage *) in)->numCols == 0 || ((psImage *) in)->numRows == 0) {
     763        if (((psImage* ) in)->numCols == 0 || ((psImage* ) in)->numRows == 0) {
    764764            psError(__func__, ": Line %d - Image contains zero length row or cols");
    765765        }
     
    767767
    768768    if (dimOut == PS_DIMEN_VECTOR) {
    769         if (((psVector *) out)->n == 0) {
     769        if (((psVector* ) out)->n == 0) {
    770770            psError(__func__, ": Line %d - Vector contains zero elements");
    771771        }
    772772    } else if (dimOut == PS_DIMEN_IMAGE) {
    773         if (((psImage *) out)->numCols == 0 || ((psImage *) out)->numRows == 0) {
     773        if (((psImage* ) out)->numCols == 0 || ((psImage* ) out)->numRows == 0) {
    774774            psError(__func__, ": Line %d - Image contains zero length row or cols");
    775775        }
Note: See TracChangeset for help on using the changeset viewer.