Index: trunk/psLib/src/dataManip/psMatrixVectorArithmetic.c
===================================================================
--- trunk/psLib/src/dataManip/psMatrixVectorArithmetic.c	(revision 1407)
+++ trunk/psLib/src/dataManip/psMatrixVectorArithmetic.c	(revision 1440)
@@ -30,6 +30,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.21 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-08-07 00:06:06 $
+ *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2004-08-09 23:34:57 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -114,7 +114,7 @@
     ps##TYPE *i1 = NULL;                                                                                     \
     ps##TYPE *i2 = NULL;                                                                                     \
-    o  = &((psScalar*)OUT)->data.TYPE;                                                                       \
-    i1 = &((psScalar*)IN1)->data.TYPE;                                                                       \
-    i2 = &((psScalar*)IN2)->data.TYPE;                                                                       \
+    o  = &((psScalar* )OUT)->data.TYPE;                                                                       \
+    i1 = &((psScalar* )IN1)->data.TYPE;                                                                       \
+    i2 = &((psScalar* )IN2)->data.TYPE;                                                                       \
     *o = OP;                                                                                                 \
 }
@@ -127,8 +127,8 @@
     ps##TYPE *i1 = NULL;                                                                                     \
     ps##TYPE *i2 = NULL;                                                                                     \
-    npt  = ((psVector*)IN1)->n;                                                                              \
-    o  = ((psVector*)OUT)->data.TYPE;                                                                        \
-    i1 = &((psScalar*)IN1)->data.TYPE;                                                                       \
-    i2 = ((psVector*)IN2)->data.TYPE;                                                                        \
+    npt  = ((psVector* )IN1)->n;                                                                              \
+    o  = ((psVector* )OUT)->data.TYPE;                                                                        \
+    i1 = &((psScalar* )IN1)->data.TYPE;                                                                       \
+    i2 = ((psVector* )IN2)->data.TYPE;                                                                        \
     for (i=0; i < npt; i++, o++, i2++) {                                                                     \
         *o = OP;                                                                                             \
@@ -145,10 +145,10 @@
     ps##TYPE *i1 = NULL;                                                                                     \
     ps##TYPE *i2 = NULL;                                                                                     \
-    numRows = ((psImage*)IN1)->numRows;                                                                      \
-    numCols = ((psImage*)IN1)->numCols;                                                                      \
+    numRows = ((psImage* )IN1)->numRows;                                                                      \
+    numCols = ((psImage* )IN1)->numCols;                                                                      \
     for(j = 0; j < numCols; j++) {                                                                           \
-        o  = ((psImage*)OUT)->data.TYPE[j];                                                                  \
-        i1 = &((psScalar*)IN1)->data.TYPE;                                                                   \
-        i2 = ((psImage*)IN2)->data.TYPE[j];                                                                  \
+        o  = ((psImage* )OUT)->data.TYPE[j];                                                                  \
+        i1 = &((psScalar* )IN1)->data.TYPE;                                                                   \
+        i2 = ((psImage* )IN2)->data.TYPE[j];                                                                  \
         for(i = 0; i < numRows; i++, o++, i2++) {                                                            \
             *o = OP;                                                                                         \
@@ -165,8 +165,8 @@
     ps##TYPE *i1 = NULL;                                                                                     \
     ps##TYPE *i2 = NULL;                                                                                     \
-    n1  = ((psVector*)IN1)->n;                                                                               \
-    o  = ((psVector*)OUT)->data.TYPE;                                                                        \
-    i1 = ((psVector*)IN1)->data.TYPE;                                                                        \
-    i2 = &((psScalar*)IN2)->data.TYPE;                                                                       \
+    n1  = ((psVector* )IN1)->n;                                                                               \
+    o  = ((psVector* )OUT)->data.TYPE;                                                                        \
+    i1 = ((psVector* )IN1)->data.TYPE;                                                                        \
+    i2 = &((psScalar* )IN2)->data.TYPE;                                                                       \
     for (i=0; i < n1; i++, o++, i1++) {                                                                      \
         *o = OP;                                                                                             \
@@ -182,13 +182,13 @@
     ps##TYPE *i1 = NULL;                                                                                     \
     ps##TYPE *i2 = NULL;                                                                                     \
-    n1  = ((psVector*)IN1)->n;                                                                               \
-    n2  = ((psVector*)IN2)->n;                                                                               \
+    n1  = ((psVector* )IN1)->n;                                                                               \
+    n2  = ((psVector* )IN2)->n;                                                                               \
     if(n1 != n2) {                                                                                           \
         psError(__func__, ": Inconsistent element count: %d vs %d", n1, n2);                                 \
         return OUT;                                                                                          \
     }                                                                                                        \
-    o  = ((psVector*)OUT)->data.TYPE;                                                                        \
-    i1 = ((psVector*)IN1)->data.TYPE;                                                                        \
-    i2 = ((psVector*)IN2)->data.TYPE;                                                                        \
+    o  = ((psVector* )OUT)->data.TYPE;                                                                        \
+    i1 = ((psVector* )IN1)->data.TYPE;                                                                        \
+    i2 = ((psVector* )IN2)->data.TYPE;                                                                        \
     for (i=0; i < n1; i++, o++, i1++, i2++) {                                                                \
         *o = OP;                                                                                             \
@@ -207,8 +207,8 @@
     ps##TYPE *i1 = NULL;                                                                                     \
     ps##TYPE *i2 = NULL;                                                                                     \
-    n1  = ((psVector*)IN1)->n;                                                                               \
-    dim1 = ((psVector*)IN1)->type.dimen;                                                                     \
-    numRows2 = ((psImage*)IN2)->numRows;                                                                     \
-    numCols2 = ((psImage*)IN2)->numCols;                                                                     \
+    n1  = ((psVector* )IN1)->n;                                                                               \
+    dim1 = ((psVector* )IN1)->type.dimen;                                                                     \
+    numRows2 = ((psImage* )IN2)->numRows;                                                                     \
+    numCols2 = ((psImage* )IN2)->numCols;                                                                     \
     \
     if(dim1 == PS_DIMEN_VECTOR) { /* Regular vectors */                                                      \
@@ -218,8 +218,8 @@
         }                                                                                                    \
         \
-        i1 = ((psVector*)IN1)->data.TYPE;                                                                    \
+        i1 = ((psVector* )IN1)->data.TYPE;                                                                    \
         for(j = 0; j < numRows2; j++, i1++) {                                                                \
-            o  = ((psImage*)OUT)->data.TYPE[j];                                                              \
-            i2 = ((psImage*)IN2)->data.TYPE[j];                                                              \
+            o  = ((psImage* )OUT)->data.TYPE[j];                                                              \
+            i2 = ((psImage* )IN2)->data.TYPE[j];                                                              \
             for(i = 0; i < numCols2; i++, o++, i2++) {                                                       \
                 *o = OP;                                                                                     \
@@ -233,7 +233,7 @@
         \
         for(j = 0; j < numRows2; j++) {                                                                      \
-            o  = ((psImage*)OUT)->data.TYPE[j];                                                              \
-            i1 = ((psVector*)IN1)->data.TYPE;                                                                \
-            i2 = ((psImage*)IN2)->data.TYPE[j];                                                              \
+            o  = ((psImage* )OUT)->data.TYPE[j];                                                              \
+            i1 = ((psVector* )IN1)->data.TYPE;                                                                \
+            i2 = ((psImage* )IN2)->data.TYPE[j];                                                              \
             for(i = 0; i < numCols2; i++, o++, i1++, i2++) {                                                 \
                 *o = OP;                                                                                     \
@@ -253,10 +253,10 @@
     ps##TYPE *i1 = NULL;                                                                                     \
     ps##TYPE *i2 = NULL;                                                                                     \
-    numRows = ((psImage*)IN1)->numRows;                                                                      \
-    numCols = ((psImage*)IN1)->numCols;                                                                      \
+    numRows = ((psImage* )IN1)->numRows;                                                                      \
+    numCols = ((psImage* )IN1)->numCols;                                                                      \
     for(j = 0; j < numRows; j++) {                                                                           \
-        o  = ((psImage*)OUT)->data.TYPE[j];                                                                  \
-        i1 = ((psImage*)IN1)->data.TYPE[j];                                                                  \
-        i2 = &((psScalar*)IN2)->data.TYPE;                                                                   \
+        o  = ((psImage* )OUT)->data.TYPE[j];                                                                  \
+        i1 = ((psImage* )IN1)->data.TYPE[j];                                                                  \
+        i2 = &((psScalar* )IN2)->data.TYPE;                                                                   \
         for(i = 0; i < numCols; i++, o++, i1++) {                                                            \
             *o = OP;                                                                                         \
@@ -276,8 +276,8 @@
     ps##TYPE *i1 = NULL;                                                                                     \
     ps##TYPE *i2 = NULL;                                                                                     \
-    n2  = ((psVector*)IN2)->n;                                                                               \
-    dim2 = ((psVector*)IN2)->type.dimen;                                                                     \
-    numRows1 = ((psImage*)IN1)->numRows;                                                                     \
-    numCols1 = ((psImage*)IN1)->numCols;                                                                     \
+    n2  = ((psVector* )IN2)->n;                                                                               \
+    dim2 = ((psVector* )IN2)->type.dimen;                                                                     \
+    numRows1 = ((psImage* )IN1)->numRows;                                                                     \
+    numCols1 = ((psImage* )IN1)->numCols;                                                                     \
     \
     if(dim2 == PS_DIMEN_VECTOR) { /* Regular vectors */                                                      \
@@ -287,8 +287,8 @@
         }                                                                                                    \
         \
-        i2 = ((psVector*)IN2)->data.TYPE;                                                                    \
+        i2 = ((psVector* )IN2)->data.TYPE;                                                                    \
         for(j = 0; j < numRows1; j++, i1++) {                                                                \
-            o  = ((psImage*)OUT)->data.TYPE[j];                                                              \
-            i1 = ((psImage*)IN1)->data.TYPE[j];                                                              \
+            o  = ((psImage* )OUT)->data.TYPE[j];                                                              \
+            i1 = ((psImage* )IN1)->data.TYPE[j];                                                              \
             for(i = 0; i < numCols1; i++, o++, i1++) {                                                       \
                 *o = OP;                                                                                     \
@@ -302,7 +302,7 @@
         \
         for(j = 0; j < numRows1; j++) {                                                                      \
-            o  = ((psImage*)OUT)->data.TYPE[j];                                                              \
-            i1 = ((psVector*)IN2)->data.TYPE;                                                                \
-            i2 = ((psImage*)IN1)->data.TYPE[j];                                                              \
+            o  = ((psImage* )OUT)->data.TYPE[j];                                                              \
+            i1 = ((psVector* )IN2)->data.TYPE;                                                                \
+            i2 = ((psImage* )IN1)->data.TYPE[j];                                                              \
             for(i = 0; i < numCols1; i++, o++, i2++, i1++) {                                                 \
                 *o = OP;                                                                                     \
@@ -323,8 +323,8 @@
     ps##TYPE *i1 = NULL;                                                                                     \
     ps##TYPE *i2 = NULL;                                                                                     \
-    numRows1 = ((psImage*)IN1)->numRows;                                                                     \
-    numCols1 = ((psImage*)IN1)->numCols;                                                                     \
-    numRows2 = ((psImage*)IN2)->numRows;                                                                     \
-    numCols2 = ((psImage*)IN2)->numCols;                                                                     \
+    numRows1 = ((psImage* )IN1)->numRows;                                                                     \
+    numCols1 = ((psImage* )IN1)->numCols;                                                                     \
+    numRows2 = ((psImage* )IN2)->numRows;                                                                     \
+    numCols2 = ((psImage* )IN2)->numCols;                                                                     \
     if(numRows1!=numRows2 || numCols1!=numCols2) {                                                           \
         psError(__func__, ": Inconsistent element count: numRows: %d vs %d numCols: %d vs %d", numRows1,     \
@@ -333,7 +333,7 @@
     }                                                                                                        \
     for(j = 0; j < numRows1; j++) {                                                                          \
-        o  = ((psImage*)OUT)->data.TYPE[j];                                                                  \
-        i1 = ((psImage*)IN1)->data.TYPE[j];                                                                  \
-        i2 = ((psImage*)IN2)->data.TYPE[j];                                                                  \
+        o  = ((psImage* )OUT)->data.TYPE[j];                                                                  \
+        i1 = ((psImage* )IN1)->data.TYPE[j];                                                                  \
+        i2 = ((psImage* )IN2)->data.TYPE[j];                                                                  \
         for(i = 0; i < numCols1; i++, o++, i1++, i2++) {                                                     \
             *o = OP;                                                                                         \
@@ -409,9 +409,9 @@
     psElemType elType2 = 0;
     psElemType elTypeOut = 0;
-    psType *psType1 = NULL;
-    psType *psType2 = NULL;
-    psType *psTypeOut = NULL;
-
-    psTypeOut = (psType *) out;
+    psType* psType1 = NULL;
+    psType* psType2 = NULL;
+    psType* psTypeOut = NULL;
+
+    psTypeOut = (psType* ) out;
     if (psTypeOut == NULL) {
         psError(__func__, ": Line %d - Null out argument", __LINE__);
@@ -419,5 +419,5 @@
     }
 
-    psType1 = (psType *) in1;
+    psType1 = (psType* ) in1;
     if (psType1 == NULL) {
         psError(__func__, ": Line %d - Null in1 argument", __LINE__);
@@ -425,5 +425,5 @@
     }
 
-    psType2 = (psType *) in2;
+    psType2 = (psType* ) in2;
     if (psType2 == NULL) {
         psError(__func__, ": Line %d - Null in2 argument", __LINE__);
@@ -456,9 +456,9 @@
 
     if (dim1 == PS_DIMEN_VECTOR) {
-        if (((psVector *) in1)->n == 0) {
+        if (((psVector* ) in1)->n == 0) {
             psError(__func__, ": Line %d - Vector contains zero elements");
         }
     } else if (dim1 == PS_DIMEN_IMAGE) {
-        if (((psImage *) in1)->numCols == 0 || ((psImage *) in1)->numRows == 0) {
+        if (((psImage* ) in1)->numCols == 0 || ((psImage* ) in1)->numRows == 0) {
             psError(__func__, ": Line %d - Image contains zero length row or cols");
         }
@@ -466,9 +466,9 @@
 
     if (dim2 == PS_DIMEN_VECTOR) {
-        if (((psVector *) in2)->n == 0) {
+        if (((psVector* ) in2)->n == 0) {
             psError(__func__, ": Line %d - Vector contains zero elements");
         }
     } else if (dim2 == PS_DIMEN_IMAGE) {
-        if (((psImage *) in2)->numCols == 0 || ((psImage *) in2)->numRows == 0) {
+        if (((psImage* ) in2)->numCols == 0 || ((psImage* ) in2)->numRows == 0) {
             psError(__func__, ": Line %d - Image contains zero length row or cols");
         }
@@ -517,6 +517,6 @@
     ps##TYPE *o = NULL;                                                                                      \
     ps##TYPE *i1 = NULL;                                                                                     \
-    o  = &((psScalar*)OUT)->data.TYPE;                                                                       \
-    i1 = &((psScalar*)IN)->data.TYPE;                                                                        \
+    o  = &((psScalar* )OUT)->data.TYPE;                                                                       \
+    i1 = &((psScalar* )IN)->data.TYPE;                                                                        \
     *o = OP;                                                                                                 \
 }
@@ -530,12 +530,12 @@
     ps##TYPE *o = NULL;                                                                                      \
     ps##TYPE *i1 = NULL;                                                                                     \
-    nIn = ((psVector*)IN)->n;                                                                                \
-    nOut = ((psVector*)OUT)->n;                                                                              \
+    nIn = ((psVector* )IN)->n;                                                                                \
+    nOut = ((psVector* )OUT)->n;                                                                              \
     if(nIn != nOut) {                                                                                        \
         psError(__func__, ": Inconsistent element count: %d vs %d", nIn, nOut);                              \
         return OUT;                                                                                          \
     }                                                                                                        \
-    o  = ((psVector*)OUT)->data.TYPE;                                                                        \
-    i1 = ((psVector*)IN)->data.TYPE;                                                                         \
+    o  = ((psVector* )OUT)->data.TYPE;                                                                        \
+    i1 = ((psVector* )IN)->data.TYPE;                                                                         \
     for(i = 0; i < nIn; i++, o++, i1++) {                                                                    \
         *o = OP;                                                                                             \
@@ -554,8 +554,8 @@
     ps##TYPE *o = NULL;                                                                                      \
     ps##TYPE *i1 = NULL;                                                                                     \
-    numRowsIn = ((psImage*)IN)->numRows;                                                                     \
-    numColsIn = ((psImage*)IN)->numCols;                                                                     \
-    numRowsOut = ((psImage*)OUT)->numRows;                                                                   \
-    numColsOut = ((psImage*)OUT)->numCols;                                                                   \
+    numRowsIn = ((psImage* )IN)->numRows;                                                                     \
+    numColsIn = ((psImage* )IN)->numCols;                                                                     \
+    numRowsOut = ((psImage* )OUT)->numRows;                                                                   \
+    numColsOut = ((psImage* )OUT)->numCols;                                                                   \
     if(numRowsIn!=numRowsOut || numColsIn!=numColsOut) {                                                     \
         psError(__func__, ": Inconsistent element count: numRows: %d vs %d numCols: %d vs %d", numRowsIn,    \
@@ -564,6 +564,6 @@
     }                                                                                                        \
     for(j = 0; j < numRowsIn; j++) {                                                                         \
-        o  = ((psImage*)OUT)->data.TYPE[j];                                                                  \
-        i1 = ((psImage*)IN)->data.TYPE[j];                                                                   \
+        o  = ((psImage* )OUT)->data.TYPE[j];                                                                  \
+        i1 = ((psImage* )IN)->data.TYPE[j];                                                                   \
         for(i = 0; i < numColsIn; i++, o++, i1++) {                                                          \
             *o = OP;                                                                                         \
@@ -713,8 +713,8 @@
     psElemType elTypeIn = 0;
     psElemType elTypeOut = 0;
-    psType *psTypeIn = NULL;
-    psType *psTypeOut = NULL;
-
-    psTypeOut = (psType *) out;
+    psType* psTypeIn = NULL;
+    psType* psTypeOut = NULL;
+
+    psTypeOut = (psType* ) out;
     if (psTypeOut == NULL) {
         psError(__func__, ": Line %d - Null out argument", __LINE__);
@@ -722,5 +722,5 @@
     }
 
-    psTypeIn = (psType *) in;
+    psTypeIn = (psType* ) in;
     if (psTypeIn == NULL) {
         psError(__func__, ": Line %d - Null in argument", __LINE__);
@@ -757,9 +757,9 @@
 
     if (dimIn == PS_DIMEN_VECTOR) {
-        if (((psVector *) in)->n == 0) {
+        if (((psVector* ) in)->n == 0) {
             psError(__func__, ": Line %d - Vector contains zero elements");
         }
     } else if (dimIn == PS_DIMEN_IMAGE) {
-        if (((psImage *) in)->numCols == 0 || ((psImage *) in)->numRows == 0) {
+        if (((psImage* ) in)->numCols == 0 || ((psImage* ) in)->numRows == 0) {
             psError(__func__, ": Line %d - Image contains zero length row or cols");
         }
@@ -767,9 +767,9 @@
 
     if (dimOut == PS_DIMEN_VECTOR) {
-        if (((psVector *) out)->n == 0) {
+        if (((psVector* ) out)->n == 0) {
             psError(__func__, ": Line %d - Vector contains zero elements");
         }
     } else if (dimOut == PS_DIMEN_IMAGE) {
-        if (((psImage *) out)->numCols == 0 || ((psImage *) out)->numRows == 0) {
+        if (((psImage* ) out)->numCols == 0 || ((psImage* ) out)->numRows == 0) {
             psError(__func__, ": Line %d - Image contains zero length row or cols");
         }
