IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 4, 2004, 1:37:39 PM (22 years ago)
Author:
desonia
Message:

found the server astyle upgrade was faulty, so the format was reset.

File:
1 edited

Legend:

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

    r1246 r1385  
    2929 *  @author Ross Harman, MHPCC
    3030 *
    31  *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
    32  *  @date $Date: 2004-07-21 00:09:11 $
     31 *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
     32 *  @date $Date: 2004-08-04 23:37:39 $
    3333 *
    3434 *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
     
    445445            psError(__func__, ": Line %d - Vector contains zero elements");
    446446        }
    447     } else if(dim1 == PS_DIMEN_IMAGE) {
    448         if(((psImage*)in1)->numCols==0 || ((psImage*)in1)->numRows==0) {
    449             psError(__func__, ": Line %d - Image contains zero length row or cols");
     447    } else
     448        if(dim1 == PS_DIMEN_IMAGE) {
     449            if(((psImage*)in1)->numCols==0 || ((psImage*)in1)->numRows==0) {
     450                psError(__func__, ": Line %d - Image contains zero length row or cols");
     451            }
    450452        }
    451     }
    452453
    453454    if(dim2 == PS_DIMEN_VECTOR) {
     
    455456            psError(__func__, ": Line %d - Vector contains zero elements");
    456457        }
    457     } else if(dim2 == PS_DIMEN_IMAGE) {
    458         if(((psImage*)in2)->numCols==0 || ((psImage*)in2)->numRows==0) {
    459             psError(__func__, ": Line %d - Image contains zero length row or cols");
     458    } else
     459        if(dim2 == PS_DIMEN_IMAGE) {
     460            if(((psImage*)in2)->numCols==0 || ((psImage*)in2)->numRows==0) {
     461                psError(__func__, ": Line %d - Image contains zero length row or cols");
     462            }
    460463        }
    461     }
    462464
    463465    if(dim1 == PS_DIMEN_SCALAR) {
    464466        if(dim2 == PS_DIMEN_SCALAR) {
    465467            BINARY_OP(SCALAR,SCALAR,out,psType1,op,psType2);               // scalar op scalar
    466         } else if(dim2==PS_DIMEN_VECTOR || dim2==PS_DIMEN_TRANSV) {
    467             BINARY_OP(SCALAR,VECTOR,out,psType1,op,psType2);               // scalar op vector
    468         } else if(dim2 == PS_DIMEN_IMAGE) {
    469             BINARY_OP(SCALAR,IMAGE,out,psType1,op,psType2);                // scalar op image
    470         } else {
    471             psError(__func__, ": Line %d - Invalid dimensionality for in2 arg: %d", __LINE__, dim2);
    472         }
    473     } else if(dim1==PS_DIMEN_VECTOR || dim1==PS_DIMEN_TRANSV) {
    474         if(dim2 == PS_DIMEN_SCALAR) {
    475             BINARY_OP(VECTOR,SCALAR,out,psType1,op,psType2);               // vector op scalar
    476         } else if(dim2==PS_DIMEN_VECTOR || dim2==PS_DIMEN_TRANSV) {
    477             BINARY_OP(VECTOR,VECTOR,out,psType1,op,psType2);               // vector op vector
    478         } else if(dim2 == PS_DIMEN_IMAGE) {
    479             BINARY_OP(VECTOR,IMAGE,out,psType1,op,psType2);                // vector op image
    480         } else {
    481             psError(__func__, ": Line %d - Invalid dimensionality for in2 arg: %d", __LINE__, dim2);
    482         }
    483     } else if(dim1 == PS_DIMEN_IMAGE) {
    484         if(dim2 == PS_DIMEN_SCALAR) {
    485             BINARY_OP(IMAGE,SCALAR,out,psType1,op,psType2);                // image op scalar
    486         } else if(dim2==PS_DIMEN_VECTOR || dim2==PS_DIMEN_TRANSV) {
    487             BINARY_OP(IMAGE,VECTOR,out,psType1,op,psType2);                // image op vector
    488         } else if(dim2 == PS_DIMEN_IMAGE) {
    489             BINARY_OP(IMAGE,IMAGE,out,psType1,op,psType2);                 // image op image
    490         } else {
    491             psError(__func__, ": Line %d - Invalid dimensionality for in2 arg: %d", __LINE__, dim2);
    492         }
    493     } else {
    494         psError(__func__, ": Line %d - Invalid dimensionality for in1 arg: %d", __LINE__, dim1);
    495     }
     468        } else
     469            if(dim2==PS_DIMEN_VECTOR || dim2==PS_DIMEN_TRANSV) {
     470                BINARY_OP(SCALAR,VECTOR,out,psType1,op,psType2);               // scalar op vector
     471            } else
     472                if(dim2 == PS_DIMEN_IMAGE) {
     473                    BINARY_OP(SCALAR,IMAGE,out,psType1,op,psType2);                // scalar op image
     474                } else {
     475                    psError(__func__, ": Line %d - Invalid dimensionality for in2 arg: %d", __LINE__, dim2);
     476                }
     477    } else
     478        if(dim1==PS_DIMEN_VECTOR || dim1==PS_DIMEN_TRANSV) {
     479            if(dim2 == PS_DIMEN_SCALAR) {
     480                BINARY_OP(VECTOR,SCALAR,out,psType1,op,psType2);               // vector op scalar
     481            } else
     482                if(dim2==PS_DIMEN_VECTOR || dim2==PS_DIMEN_TRANSV) {
     483                    BINARY_OP(VECTOR,VECTOR,out,psType1,op,psType2);               // vector op vector
     484                } else
     485                    if(dim2 == PS_DIMEN_IMAGE) {
     486                        BINARY_OP(VECTOR,IMAGE,out,psType1,op,psType2);                // vector op image
     487                    } else {
     488                        psError(__func__, ": Line %d - Invalid dimensionality for in2 arg: %d", __LINE__, dim2);
     489                    }
     490        } else
     491            if(dim1 == PS_DIMEN_IMAGE) {
     492                if(dim2 == PS_DIMEN_SCALAR) {
     493                    BINARY_OP(IMAGE,SCALAR,out,psType1,op,psType2);                // image op scalar
     494                } else
     495                    if(dim2==PS_DIMEN_VECTOR || dim2==PS_DIMEN_TRANSV) {
     496                        BINARY_OP(IMAGE,VECTOR,out,psType1,op,psType2);                // image op vector
     497                    } else
     498                        if(dim2 == PS_DIMEN_IMAGE) {
     499                            BINARY_OP(IMAGE,IMAGE,out,psType1,op,psType2);                 // image op image
     500                        } else {
     501                            psError(__func__, ": Line %d - Invalid dimensionality for in2 arg: %d", __LINE__, dim2);
     502                        }
     503            } else {
     504                psError(__func__, ": Line %d - Invalid dimensionality for in1 arg: %d", __LINE__, dim1);
     505            }
    496506
    497507    return out;
     
    748758            psError(__func__, ": Line %d - Vector contains zero elements");
    749759        }
    750     } else if(dimIn == PS_DIMEN_IMAGE) {
    751         if(((psImage*)in)->numCols==0 || ((psImage*)in)->numRows==0) {
    752             psError(__func__, ": Line %d - Image contains zero length row or cols");
     760    } else
     761        if(dimIn == PS_DIMEN_IMAGE) {
     762            if(((psImage*)in)->numCols==0 || ((psImage*)in)->numRows==0) {
     763                psError(__func__, ": Line %d - Image contains zero length row or cols");
     764            }
    753765        }
    754     }
    755766
    756767    if(dimOut == PS_DIMEN_VECTOR) {
     
    758769            psError(__func__, ": Line %d - Vector contains zero elements");
    759770        }
    760     } else if(dimOut == PS_DIMEN_IMAGE) {
    761         if(((psImage*)out)->numCols==0 || ((psImage*)out)->numRows==0) {
    762             psError(__func__, ": Line %d - Image contains zero length row or cols");
     771    } else
     772        if(dimOut == PS_DIMEN_IMAGE) {
     773            if(((psImage*)out)->numCols==0 || ((psImage*)out)->numRows==0) {
     774                psError(__func__, ": Line %d - Image contains zero length row or cols");
     775            }
    763776        }
    764     }
    765777
    766778    if(dimIn == PS_DIMEN_SCALAR) {
    767779        UNARY_OP(SCALAR,out,psTypeIn,op);                                 // scalar
    768     } else if(dimIn==PS_DIMEN_VECTOR || dimIn==PS_DIMEN_TRANSV) {
    769         UNARY_OP(VECTOR,out,psTypeIn,op);                                 // vector
    770     } else if(dimIn == PS_DIMEN_IMAGE) {
    771         UNARY_OP(IMAGE,out,psTypeIn,op);                                  // image
    772     } else {
    773         psError(__func__, ": Line %d - Invalid dimensionality for in arg: %d", __LINE__, dimIn);
    774     }
     780    } else
     781        if(dimIn==PS_DIMEN_VECTOR || dimIn==PS_DIMEN_TRANSV) {
     782            UNARY_OP(VECTOR,out,psTypeIn,op);                                 // vector
     783        } else
     784            if(dimIn == PS_DIMEN_IMAGE) {
     785                UNARY_OP(IMAGE,out,psTypeIn,op);                                  // image
     786            } else {
     787                psError(__func__, ": Line %d - Invalid dimensionality for in arg: %d", __LINE__, dimIn);
     788            }
    775789
    776790    return out;
Note: See TracChangeset for help on using the changeset viewer.