Changeset 1385 for trunk/psLib/src/dataManip/psMatrixVectorArithmetic.c
- Timestamp:
- Aug 4, 2004, 1:37:39 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/psLib/src/dataManip/psMatrixVectorArithmetic.c
r1246 r1385 29 29 * @author Ross Harman, MHPCC 30 30 * 31 * @version $Revision: 1.1 8$ $Name: not supported by cvs2svn $32 * @date $Date: 2004-0 7-21 00:09:11$31 * @version $Revision: 1.19 $ $Name: not supported by cvs2svn $ 32 * @date $Date: 2004-08-04 23:37:39 $ 33 33 * 34 34 * Copyright 2004 Maui High Performance Computing Center, University of Hawaii … … 445 445 psError(__func__, ": Line %d - Vector contains zero elements"); 446 446 } 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 } 450 452 } 451 }452 453 453 454 if(dim2 == PS_DIMEN_VECTOR) { … … 455 456 psError(__func__, ": Line %d - Vector contains zero elements"); 456 457 } 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 } 460 463 } 461 }462 464 463 465 if(dim1 == PS_DIMEN_SCALAR) { 464 466 if(dim2 == PS_DIMEN_SCALAR) { 465 467 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 } 496 506 497 507 return out; … … 748 758 psError(__func__, ": Line %d - Vector contains zero elements"); 749 759 } 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 } 753 765 } 754 }755 766 756 767 if(dimOut == PS_DIMEN_VECTOR) { … … 758 769 psError(__func__, ": Line %d - Vector contains zero elements"); 759 770 } 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 } 763 776 } 764 }765 777 766 778 if(dimIn == PS_DIMEN_SCALAR) { 767 779 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 } 775 789 776 790 return out;
Note:
See TracChangeset
for help on using the changeset viewer.
